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

Makefile macro variable definition. More...

#include <makefile.h>

Public Member Functions

CStringName (void)
 Returns the name of the macro variable. More...
 
CStringListValues (void)
 Returns the value of the macro variable as a list of strings. More...
 
CString GetValue (const int Index=0)
 Returns a string number Index from the value strings. More...
 
void SetValue (const CString &NewValue, const int Index=0)
 Replaces a string number Index in the value strings with the NewValue string. More...
 
void AddValue (const CString &NewValue)
 Appends a list of value strings with the NewValue string. More...
 
bool & Multiline (void)
 Allows line-wrapping of variable's value text. More...
 
CString JoinValues (void)
 Returns the variable value as a single string. More...
 
void Clear (void)
 Resets the macro variable to the initial state. More...
 
void Show (void)
 Prints properties of the macro variable to the standard output. More...
 
 CMakefileVariable (void)
 Creates macro variable. More...
 
 ~CMakefileVariable (void)
 Destroys macro variable. More...
 

Private Attributes

CString m_Name
 Name of the makefile macro variable. More...
 
CStringList m_Values
 A list of strings which concatenation gives the actual value of the macro variable. More...
 
bool m_Multiline
 Allows line-wrapping of variable's value text. More...
 

Detailed Description

Makefile macro variable definition.

Manages variable properties and generates its text representation.

Constructor & Destructor Documentation

◆ CMakefileVariable()

CMakefileVariable::CMakefileVariable ( void  )

Creates macro variable.

◆ ~CMakefileVariable()

CMakefileVariable::~CMakefileVariable ( void  )

Destroys macro variable.

Member Function Documentation

◆ AddValue()

void CMakefileVariable::AddValue ( const CString NewValue)

Appends a list of value strings with the NewValue string.

Parameters
NewValuea new value string.

◆ Clear()

void CMakefileVariable::Clear ( void  )

Resets the macro variable to the initial state.

◆ GetValue()

CString CMakefileVariable::GetValue ( const int  Index = 0)

Returns a string number Index from the value strings.

Parameters
Indexa number of the value string.
Returns
a value string or an empty string.

◆ JoinValues()

CString CMakefileVariable::JoinValues ( void  )

Returns the variable value as a single string.

Returns
concatenation of value strings.

The value strings CMakefileVariable::m_Values are joined with space character if multiline mode is disabled or with ' \\\n\t' (space backslash eol tab) sequence otherwise.

◆ Multiline()

CMakefileVariable::Multiline ( void  )
inline

Allows line-wrapping of variable's value text.

Returns
reference to CMakefileVariable::m_Multiline.

◆ Name()

CMakefileVariable::Name ( void  )
inline

Returns the name of the macro variable.

Returns
referece to CMakefileVariable::m_Name.

◆ SetValue()

void CMakefileVariable::SetValue ( const CString NewValue,
const int  Index = 0 
)

Replaces a string number Index in the value strings with the NewValue string.

Parameters
NewValuea new value of the value string.
Indexa number of the value string.

◆ Show()

void CMakefileVariable::Show ( void  )

Prints properties of the macro variable to the standard output.

◆ Values()

CMakefileVariable::Values ( void  )
inline

Returns the value of the macro variable as a list of strings.

Returns
reference to CMakefileVariable::m_Values.

Member Data Documentation

◆ m_Multiline

CMakefileVariable::m_Multiline
private

Allows line-wrapping of variable's value text.

◆ m_Name

CMakefileVariable::m_Name
private

Name of the makefile macro variable.

◆ m_Values

CMakefileVariable::m_Values
private

A list of strings which concatenation gives the actual value of the macro variable.


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