Public Types | Public Member Functions | List of all members
ARCSContext Class Reference

This class manages components and constants in a given context. More...

#include <arcscontext.h>

Collaboration diagram for ARCSContext:
Collaboration graph

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)
 
ARCSAbstractComponentcreateComponent (QString name, QString className)
 
void removeComponent (QString name)
 Removes a component from the component pool. More...
 
ARCSAbstractComponentgetComponent (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...
 

Detailed Description

This class manages components and constants in a given context.

This class encapsulates a component pool as well as a constant pool.

Author
Jean-Yves Didier
Date
December, the 4th, 2008

Definition at line 45 of file arcscontext.h.

Member Function Documentation

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.

Parameters
nameid of the component. Should be unique inside a context.
classNameclass name of the component.
contentsa string representing a component.

Definition at line 171 of file arcscontext.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool ARCSContext::addConstant ( QString  name,
QString  type,
QString  representation 
)

Adds a constant to the list.

Parameters
nameid of the constant
typetype of the constant
representationstring representing a constant.

Definition at line 225 of file arcscontext.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

QStringList ARCSContext::computeLibraryList ( )

Computes the list of libraries needed by this context

Todo:
something not trivial is to do below in order to recover the good family.

Definition at line 65 of file arcscontext.cpp.

Here is the call graph for this function:

ARCSAbstractComponent * ARCSContext::getComponent ( QString  name)

Retrieves a component by its id.

Parameters
nameid of the component.

Definition at line 217 of file arcscontext.cpp.

Here is the caller graph for this function:

QStringList ARCSContext::getComponentList ( )

Returns the list of components (their Id's)

Definition at line 102 of file arcscontext.cpp.

Here is the caller graph for this function:

QVariant ARCSContext::getConstant ( QString  name)

Retrieves a constant by its id.

Parameters
nameid of the constant to retrieve.

Definition at line 249 of file arcscontext.cpp.

Here is the caller graph for this function:

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.

Parameters
nameid of the constant
representationstring representing a constant.

Definition at line 275 of file arcscontext.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void ARCSContext::removeComponent ( QString  name)

Removes a component from the component pool.

Parameters
nameid of the component to remove

Definition at line 207 of file arcscontext.cpp.

Here is the call graph for this function:

void ARCSContext::removeConstant ( QString  name)

Removes a constant from the constant pool.

Parameters
nameid of the constant

Definition at line 243 of file arcscontext.cpp.

Here is the caller graph for this function:

bool ARCSContext::serializeConstant ( QString  name,
QString &  type,
QString &  representation 
)

Serializes constants.

Parameters
nameConstant name
typeType of the constant
representationRepresentation of the constant
Returns
true if serialization could be achieved, false otherwise

Definition at line 263 of file arcscontext.cpp.

Here is the call graph for this function:


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