cbp2make
Makefile generation tool for Code::Blocks IDE
Public Member Functions | Private Attributes | List of all members
CGlobalVariableSet Class Reference

Manages a set of global compiler variables. More...

#include <cbglobalvar.h>

Public Member Functions

CStringName (void)
 Name of the set. More...
 
bool & Active (void)
 Indicates that this variable set should be defined in makefile. More...
 
void Clear (void)
 Resets the set of variables to the initial state. More...
 
size_t Count (void) const
 Returns number of variables. More...
 
CGlobalVariableGet (const size_t Index)
 Returns a variable by index. More...
 
CGlobalVariableFind (const CString &Name)
 Returns a variable by name. More...
 
CGlobalVariableAdd (const CString &Name, const CString &Description="")
 Adds new variable with name Name and description Description. More...
 
void Remove (const CString &Name)
 Removes variable with name Name. More...
 
void Read (const TiXmlElement *GlobalVariableSetRoot)
 Reads the global variable set settings from an XML document. More...
 
void Write (TiXmlElement *GlobalVariableSetRoot)
 Writes the global variable set settings to an XML document. More...
 
void Show (void)
 Prints the global compiler variable set contents to standard output. More...
 
 CGlobalVariableSet (void)
 Creates global compiler variable set. More...
 
 ~CGlobalVariableSet (void)
 Destroys global compiler variable set. More...
 

Private Attributes

CString m_Name
 Name of the variable set. More...
 
std::vector< CGlobalVariable * > m_Variables
 List of global compiler variables. More...
 
bool m_Active
 Indicates that this variable set should be defined in makefile. More...
 

Detailed Description

Manages a set of global compiler variables.

Constructor & Destructor Documentation

◆ CGlobalVariableSet()

CGlobalVariableSet::CGlobalVariableSet ( void  )

Creates global compiler variable set.

◆ ~CGlobalVariableSet()

CGlobalVariableSet::~CGlobalVariableSet ( void  )

Destroys global compiler variable set.

Member Function Documentation

◆ Active()

CGlobalVariableSet::Active ( void  )
inline

Indicates that this variable set should be defined in makefile.

Returns
CGlobalVariableSet::m_Active.

◆ Add()

CGlobalVariableSet::Add ( const CString Name,
const CString Description = "" 
)

Adds new variable with name Name and description Description.

Parameters
Namename of the variable.
Descriptiondescription of the variable (optional).
Returns
pointer to global compiler variable.

If a variable with name Name already exists, new variable will not be created.

◆ Clear()

CGlobalVariableSet::Clear ( void  )

Resets the set of variables to the initial state.

◆ Count()

CGlobalVariableSet::Count ( void  ) const
inline

Returns number of variables.

Returns
number of variables.

◆ Find()

CGlobalVariableSet::Find ( const CString Name)

Returns a variable by name.

Parameters
Namename of a variable.
Returns
pointer to the variable or NULL if variable with index Index does not exist.

◆ Get()

CGlobalVariableSet::Get ( const size_t  Index)

Returns a variable by index.

Parameters
Indexindex of a variable.
Returns
pointer to a variable or NULL if a variable with index Index does not exist.

◆ Name()

CGlobalVariableSet::Name ( void  )
inline

Name of the set.

Returns
reference to CGlobalVariableSet::m_Name.

◆ Read()

CGlobalVariableSet::Read ( const TiXmlElement *  GlobalVariableSetRoot)

Reads the global variable set settings from an XML document.

Parameters
GlobalVariableSetRootan element of XML document.

◆ Remove()

CGlobalVariableSet::Remove ( const CString Name)

Removes variable with name Name.

Parameters
Namename of a variable.

◆ Show()

CGlobalVariableSet::Show ( void  )

Prints the global compiler variable set contents to standard output.

◆ Write()

CGlobalVariableSet::Write ( TiXmlElement *  GlobalVariableSetRoot)

Writes the global variable set settings to an XML document.

Parameters
GlobalVariableSetRootan element of XML document.

Member Data Documentation

◆ m_Active

CGlobalVariableSet::m_Active
private

Indicates that this variable set should be defined in makefile.

◆ m_Name

CGlobalVariableSet::m_Name
private

Name of the variable set.

◆ m_Variables

CGlobalVariableSet::m_Variables
private

List of global compiler variables.


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