KiCad PCB EDA Suite
Loading...
Searching...
No Matches
SEXPR::SEXPR Class Reference

#include <sexpr.h>

Inheritance diagram for SEXPR::SEXPR:
SEXPR::SEXPR_DOUBLE SEXPR::SEXPR_INTEGER SEXPR::SEXPR_LIST SEXPR::SEXPR_STRING SEXPR::SEXPR_SYMBOL

Public Member Functions

virtual ~SEXPR ()
 
bool IsList () const
 
bool IsSymbol () const
 
bool IsString () const
 
bool IsDouble () const
 
bool IsInteger () const
 
void AddChild (SEXPR *aChild)
 
SEXPR_VECTOR const * GetChildren () const
 
SEXPRGetChild (size_t aIndex) const
 
size_t GetNumberOfChildren () const
 
int64_t GetLongInteger () const
 
int32_t GetInteger () const
 
float GetFloat () const
 
double GetDouble () const
 
std::string const & GetString () const
 
std::string const & GetSymbol () const
 
SEXPR_LISTGetList ()
 
std::string AsString (size_t aLevel=0) const
 
size_t GetLineNumber () const
 

Protected Member Functions

 SEXPR (SEXPR_TYPE aType, size_t aLineNumber)
 
 SEXPR (SEXPR_TYPE aType)
 

Protected Attributes

SEXPR_TYPE m_type
 
size_t m_lineNumber
 

Detailed Description

Definition at line 45 of file sexpr.h.

Constructor & Destructor Documentation

◆ ~SEXPR()

virtual SEXPR::SEXPR::~SEXPR ( )
inlinevirtual

Definition at line 48 of file sexpr.h.

◆ SEXPR() [1/2]

SEXPR::SEXPR::SEXPR ( SEXPR_TYPE  aType,
size_t  aLineNumber 
)
protected

Definition at line 28 of file sexpr.cpp.

◆ SEXPR() [2/2]

SEXPR::SEXPR::SEXPR ( SEXPR_TYPE  aType)
protected

Definition at line 33 of file sexpr.cpp.

Member Function Documentation

◆ AddChild()

void SEXPR::SEXPR::AddChild ( SEXPR aChild)

◆ AsString()

std::string SEXPR::SEXPR::AsString ( size_t  aLevel = 0) const

Definition at line 151 of file sexpr.cpp.

Referenced by KI_TEST::SexprConvertsToString().

◆ GetChild()

SEXPR * SEXPR::SEXPR::GetChild ( size_t  aIndex) const

Definition at line 48 of file sexpr.cpp.

References SEXPR::SEXPR_TYPE_LIST.

Referenced by BOOST_AUTO_TEST_CASE(), SEXPR::SEXPR_LIST::doScan(), and traverseSEXPR().

◆ GetChildren()

SEXPR_VECTOR const * SEXPR::SEXPR::GetChildren ( ) const

Definition at line 38 of file sexpr.cpp.

References SEXPR::SEXPR_TYPE_LIST.

◆ GetDouble()

double SEXPR::SEXPR::GetDouble ( ) const

◆ GetFloat()

float SEXPR::SEXPR::GetFloat ( ) const

Definition at line 123 of file sexpr.cpp.

◆ GetInteger()

int32_t SEXPR::SEXPR::GetInteger ( ) const

Definition at line 90 of file sexpr.cpp.

◆ GetLineNumber()

size_t SEXPR::SEXPR::GetLineNumber ( ) const
inline

Definition at line 66 of file sexpr.h.

◆ GetList()

SEXPR_LIST * SEXPR::SEXPR::GetList ( )

Definition at line 141 of file sexpr.cpp.

References SEXPR::SEXPR_TYPE_LIST.

◆ GetLongInteger()

int64_t SEXPR::SEXPR::GetLongInteger ( ) const

Definition at line 95 of file sexpr.cpp.

References SEXPR::SEXPR_TYPE_ATOM_INTEGER.

Referenced by KI_TEST::SexprIsIntegerWithValue().

◆ GetNumberOfChildren()

size_t SEXPR::SEXPR::GetNumberOfChildren ( ) const

Definition at line 70 of file sexpr.cpp.

References SEXPR::SEXPR_TYPE_LIST.

Referenced by KI_TEST::SexprIsListOfLength(), and traverseSEXPR().

◆ GetString()

std::string const & SEXPR::SEXPR::GetString ( ) const

Definition at line 80 of file sexpr.cpp.

References SEXPR::SEXPR_TYPE_ATOM_STRING.

Referenced by KI_TEST::SexprIsStringWithValue().

◆ GetSymbol()

std::string const & SEXPR::SEXPR::GetSymbol ( ) const

Definition at line 128 of file sexpr.cpp.

References SEXPR::SEXPR_TYPE_ATOM_SYMBOL.

Referenced by KI_TEST::SexprIsSymbolWithValue().

◆ IsDouble()

bool SEXPR::SEXPR::IsDouble ( ) const
inline

Definition at line 52 of file sexpr.h.

References SEXPR::SEXPR_TYPE_ATOM_DOUBLE.

Referenced by KI_TEST::getType().

◆ IsInteger()

bool SEXPR::SEXPR::IsInteger ( ) const
inline

Definition at line 53 of file sexpr.h.

References SEXPR::SEXPR_TYPE_ATOM_INTEGER.

Referenced by KI_TEST::getType().

◆ IsList()

bool SEXPR::SEXPR::IsList ( ) const
inline

Definition at line 49 of file sexpr.h.

References SEXPR::SEXPR_TYPE_LIST.

Referenced by KI_TEST::getType(), and traverseSEXPR().

◆ IsString()

bool SEXPR::SEXPR::IsString ( ) const
inline

Definition at line 51 of file sexpr.h.

References SEXPR::SEXPR_TYPE_ATOM_STRING.

Referenced by KI_TEST::getType().

◆ IsSymbol()

bool SEXPR::SEXPR::IsSymbol ( ) const
inline

Definition at line 50 of file sexpr.h.

References SEXPR::SEXPR_TYPE_ATOM_SYMBOL.

Referenced by KI_TEST::getType().

Member Data Documentation

◆ m_lineNumber

size_t SEXPR::SEXPR::m_lineNumber
protected

Definition at line 72 of file sexpr.h.

◆ m_type

SEXPR_TYPE SEXPR::SEXPR::m_type
protected

Definition at line 69 of file sexpr.h.


The documentation for this class was generated from the following files: