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

Manages a set of toolchains. More...

#include <toolchains.h>

Public Member Functions

void Lock (void)
 Locks the set of toolchains to prevent accidental modification. More...
 
void Unlock (void)
 Unlocks the set of toolchains to allow modifications. More...
 
void Clear (void)
 Resets the set of toolchains to the initial state. More...
 
size_t GetCount (const CPlatform::OS_Type OS) const
 Returns the number of toolchains in the set. More...
 
CToolChainToolChain (const CPlatform::OS_Type OS, const size_t Index) const
 Returns toolchain with number Index for OS platform. More...
 
CToolChainFind (const CPlatform::OS_Type OS, const CString &Alias)
 Searches toolchain with alias Alias for platform OS. More...
 
void AddDefault (void)
 Initializes the default set of GNU toolchains for all known platforms. More...
 
CToolChainAdd (const CPlatform::OS_Type OS, const CString &Alias)
 Creates new toolchain with alias Alias for platform OS. More...
 
void Remove (const CPlatform::OS_Type OS, const CString &Alias)
 Destroys a toolchain with alias Alias for platform OS. More...
 
void Read (const TiXmlElement *ConfigRoot)
 Reads the set of toolchains from an XML document. More...
 
void Write (TiXmlElement *ConfigRoot)
 Writes the set of toolchains to an XML document. More...
 
void Show (void)
 Prints contents of all toolchains to standard output. More...
 
 CToolChainSet (void)
 
 ~CToolChainSet (void)
 Destroys set of toolchains. More...
 

Protected Member Functions

void AddToolChain (const CToolChain *AToolChain)
 

Private Attributes

std::vector< std::vector< CToolChain * > > m_ToolChains
 List of toolchains. More...
 
bool m_Locked
 Indicates that the set of toolchains cannot be modified. More...
 
bool m_HaveDefaults
 

Detailed Description

Manages a set of toolchains.

Constructor & Destructor Documentation

◆ CToolChainSet()

CToolChainSet::CToolChainSet ( void  )

◆ ~CToolChainSet()

CToolChainSet::~CToolChainSet ( void  )

Destroys set of toolchains.

Member Function Documentation

◆ Add()

CToolChain * CToolChainSet::Add ( const CPlatform::OS_Type  OS,
const CString Alias 
)

Creates new toolchain with alias Alias for platform OS.

Parameters
Aliastoolchain name (alias).
OSplatform (operating system) identifier.
Returns
pointer to CToolChain.

If the desired toolchain already exists, new toolchain is not created.

◆ AddDefault()

void CToolChainSet::AddDefault ( void  )

Initializes the default set of GNU toolchains for all known platforms.

◆ AddToolChain()

void CToolChainSet::AddToolChain ( const CToolChain AToolChain)
protected

◆ Clear()

void CToolChainSet::Clear ( void  )

Resets the set of toolchains to the initial state.

◆ Find()

CToolChain * CToolChainSet::Find ( const CPlatform::OS_Type  OS,
const CString Alias 
)

Searches toolchain with alias Alias for platform OS.

Parameters
Aliastoolchain name (alias).
OSplatform (operating system) identifier.
Returns
pointer to CToolChain.

Returns NULL if no toolchain is found.

◆ GetCount()

size_t CToolChainSet::GetCount ( const CPlatform::OS_Type  OS) const

Returns the number of toolchains in the set.

Returns
number of toolchains in the set.

◆ Lock()

void CToolChainSet::Lock ( void  )

Locks the set of toolchains to prevent accidental modification.

◆ Read()

void CToolChainSet::Read ( const TiXmlElement *  ConfigRoot)

Reads the set of toolchains from an XML document.

Parameters
ConfigRootan element of XML document.

◆ Remove()

void CToolChainSet::Remove ( const CPlatform::OS_Type  OS,
const CString Alias 
)

Destroys a toolchain with alias Alias for platform OS.

Parameters
Aliastoolchain name (alias).
OSplatform (operating system) identifier.
Returns
.

◆ Show()

void CToolChainSet::Show ( void  )

Prints contents of all toolchains to standard output.

◆ ToolChain()

CToolChain * CToolChainSet::ToolChain ( const CPlatform::OS_Type  OS,
const size_t  Index 
) const

Returns toolchain with number Index for OS platform.

Parameters
Indextoolchain number.
OSplatform type.
Returns
pointer to CToolChain.

Returns NULL if a toolchain with number Index does not exist.

◆ Unlock()

void CToolChainSet::Unlock ( void  )

Unlocks the set of toolchains to allow modifications.

◆ Write()

void CToolChainSet::Write ( TiXmlElement *  ConfigRoot)

Writes the set of toolchains to an XML document.

Parameters
ConfigRootan element of XML document.

Member Data Documentation

◆ m_HaveDefaults

bool CToolChainSet::m_HaveDefaults
private

◆ m_Locked

CToolChainSet::m_Locked
private

Indicates that the set of toolchains cannot be modified.

This property should be set by CToolChainSet::Lock(void) to prevent accidental modification and unset by CToolChainSet::Unlock(void) to release the lock.

◆ m_ToolChains

CToolChainSet::m_ToolChains
private

List of toolchains.

Contains pointers to CToolChain objects and owns them (i.e. objects sould be destroyed before the list is cleared).


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