![]() |
This class manages components and constants in a given context. More...
#include <arcscontext.h>

Public Types | |
| typedef bool(ARCSContext::* | AddPoolMethod) (QString, QString, QString) |
Public Member Functions | |
| ARCSContext () | |
| Constructor. | |
| ARCSContext (const ARCSContext &ctx) | |
| Copy constructor. | |
| void | reset () |
| Resets the component and constant lists. | |
| bool | addComponent (QString name, QString className, QString contents=QString::null) |
| Adds a component to the list. More... | |
| bool | renameComponent (QString oldName, QString newName) |
| ARCSAbstractComponent * | createComponent (QString name, QString className) |
| void | removeComponent (QString name) |
| Removes a component from the component pool. More... | |
| ARCSAbstractComponent * | getComponent (QString name) |
| Retrieves a component by its id. More... | |
| QStringList | getComponentList () |
| QStringList | getConstantList () |
| bool | addConstant (QString name, QString type, QString representation) |
| Adds a constant to the list. More... | |
| bool | modifyConstant (QString name, QString representation) |
| Modifies a constant of the list. More... | |
| bool | modifyConstant (QString name, QString type, QString representation) |
| void | removeConstant (QString name) |
| Removes a constant from the constant pool. More... | |
| bool | isInstanciated () |
| QVariant | getConstant (QString name) |
| Retrieves a constant by its id. More... | |
| bool | instanciatePool () |
| Instanciates the whole pool of components inside the context. | |
| QVariant | createValue (QString type, QString representation) |
| QStringList | computeLibraryList () |
| bool | serializeConstant (QString name, QString &type, QString &representation) |
| Serializes constants. More... | |
This class manages components and constants in a given context.
This class encapsulates a component pool as well as a constant pool.
Definition at line 45 of file arcscontext.h.
| bool ARCSContext::addComponent | ( | QString | name, |
| QString | className, | ||
| QString | contents = QString::null |
||
| ) |
Adds a component to the list.
A component is characterized by its name and its class name.
| name | id of the component. Should be unique inside a context. |
| className | class name of the component. |
| contents | a string representing a component. |
Definition at line 171 of file arcscontext.cpp.


| bool ARCSContext::addConstant | ( | QString | name, |
| QString | type, | ||
| QString | representation | ||
| ) |
Adds a constant to the list.
| name | id of the constant |
| type | type of the constant |
| representation | string representing a constant. |
Definition at line 225 of file arcscontext.cpp.


| QStringList ARCSContext::computeLibraryList | ( | ) |
Computes the list of libraries needed by this context
Definition at line 65 of file arcscontext.cpp.

| ARCSAbstractComponent * ARCSContext::getComponent | ( | QString | name | ) |
Retrieves a component by its id.
| name | id of the component. |
Definition at line 217 of file arcscontext.cpp.

| QStringList ARCSContext::getComponentList | ( | ) |
Returns the list of components (their Id's)
Definition at line 102 of file arcscontext.cpp.

| QVariant ARCSContext::getConstant | ( | QString | name | ) |
Retrieves a constant by its id.
| name | id of the constant to retrieve. |
Definition at line 249 of file arcscontext.cpp.

| QStringList ARCSContext::getConstantList | ( | ) |
Returns the list of constants (their Id's)
Definition at line 95 of file arcscontext.cpp.
| bool ARCSContext::modifyConstant | ( | QString | name, |
| QString | representation | ||
| ) |
Modifies a constant of the list.
| name | id of the constant |
| representation | string representing a constant. |
Definition at line 275 of file arcscontext.cpp.


| void ARCSContext::removeComponent | ( | QString | name | ) |
Removes a component from the component pool.
| name | id of the component to remove |
Definition at line 207 of file arcscontext.cpp.

| void ARCSContext::removeConstant | ( | QString | name | ) |
Removes a constant from the constant pool.
| name | id of the constant |
Definition at line 243 of file arcscontext.cpp.

| bool ARCSContext::serializeConstant | ( | QString | name, |
| QString & | type, | ||
| QString & | representation | ||
| ) |
Serializes constants.
| name | Constant name |
| type | Type of the constant |
| representation | Representation of the constant |
true if serialization could be achieved, false otherwise Definition at line 263 of file arcscontext.cpp.

1.8.9.1