| |
libFAUDES
Sections
Index
|
faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr > Class Template Reference |
Public Member Functions | |
Constructor, Destructor and Copy-Methods | |
TmtcGenerator (void) | |
Creates an emtpy mtcGenerator. | |
TmtcGenerator (const TmtcGenerator &rOtherGen) | |
Creates an mtcgenerator from another mtcgenerator - copy constructor:. | |
TmtcGenerator (const vGenerator &rOtherGen) | |
Creates an mtcgenerator from another generator - copy constructor. | |
TmtcGenerator (const char *pFileName) | |
Constructs an mtcGenerator from file. | |
~TmtcGenerator (void) | |
Destructor for mtcGenerator. | |
virtual void | Copy (TmtcGenerator &rGen) const |
Copy to other mtcgenerator. | |
virtual void | Copy (vGenerator &rGen) const |
Copy to other generator. | |
Color Symbol Table | |
SymbolTable * | GlobalColorSymbolTablep (void) |
Get Pointer to global ColorSymbolTable. | |
SymbolTable * | ColorSymbolTablep (void) const |
Get Pointer to ColorSymbolTable currently used by this mtcGenerator. | |
void | ColorSymbolTable (SymbolTable *pSymTab) |
Set ColorSymbolTable to be used by this mtcGenerator. | |
void | ColorSymbolTable (const TmtcGenerator &rOtherGen) |
Set ColorSymbolTable as given by rOtherGen. | |
Handling Colored States | |
Idx | InsColoredState (const std::string &rStateName, const std::string &rColorName) |
Create a new named state and set the color rColorName. | |
Idx | InsColoredState (const std::string &rStateName, Idx colorIndex) |
Create a new named state and set the color colorIndex. | |
Idx | InsColoredState (const std::string &rStateName, const ColorSet &rColors) |
Create a new named state and set the colors from rColors. | |
Idx | InsColoredState (const ColorSet &rColors) |
Create a new unnamed state and set the colors from rColors. | |
Idx | InsColor (Idx stateIndex, const std::string &rColorName) |
Insert a color by name into an existing state. | |
void | InsColor (Idx stateIndex, Idx colorIndex) |
Insert a color by index into an existing state. | |
void | InsColors (Idx stateIndex, const ColorSet &rColors) |
Insert multiple colors from a color set into an existing state. | |
void | DelColor (Idx stateIndex, const std::string &rColorName) |
Remove color by name from an existing state specified by index. | |
void | DelColor (Idx stateIndex, Idx colorIndex) |
Remove color by index form an existing state specified by index. | |
void | DelColor (const std::string &rColorName) |
Remove color by name from all states. | |
void | DelColor (Idx colorIndex) |
Remove color by index from all states. | |
void | ClrStateColors (Idx stateIndex) |
Remove all colors from a particular state. | |
void | ClrStateAttributes () |
Clear all the generator's state attributes. | |
Analyse Colored States and State Colors | |
void | Colors (ColorSet &rColors) const |
Insert all colors used in the generator to a given ColorSet. | |
ColorSet | Colors (void) const |
Returns a color set containing all the generator's colors. | |
ColorSet | Colors (Idx stateIndex) const |
Return a color set which contains all colors of one state. | |
void | StateColors (Idx stateIndex, ColorSet &rColors) const |
Get color set of a given state of the generator. | |
ColorSet | StateColors (Idx stateIndex) const |
Get color set of a given state of the generator. | |
StateSet | ColoredStates (Idx colorIndex) const |
Returns a state set containing all states that are colored with the color given by index. | |
StateSet | ColoredStates (const std::string &rColorName) const |
Returns a state set containing all states that are colored with the color given by name. | |
StateSet | ColoredStates () const |
Returns a state set containing all colored states of the mtcGenerator. | |
StateSet | UncoloredStates () const |
Returns a state set containing all states that are not colored. | |
bool | ExistsColor (Idx colorIndex) const |
Check if color exists in generator. | |
bool | ExistsColor (const std::string &rColorName) const |
Check if color exists in generator. | |
bool | ExistsColor (Idx stateIndex, Idx colorIndex) const |
Check if color exists in a given state of the mtcGenerator. | |
bool | IsColored () const |
Check if there is at least one colored state in the mtcGenerator. | |
bool | IsColored (Idx stateIndex) const |
Check if the given state is colored or not. | |
Symbol Table | |
void | DelColorName (Idx colorIndex) |
Finally deletes a color name and its index from the currently used symbol table. | |
void | CheckSymbolTable (Idx colorIndex) |
Delete the given color from the symbol table if it is not used anymore in the generator by calling DelColorName. | |
void | CheckSymbolTable (ColorSet &rColors) |
Delete all colors from the given color set from the color symbol table by calling DelColorName if they are not used anymore. | |
std::string | ColorName (Idx colorIndex) const |
Look up the color name for a given color index. | |
Idx | ColorIndex (const std::string &rColorName) const |
Look up the color index for a given color name. | |
Output Methods | |
void | DotWrite (const std::string &rFileName) |
Writes generator to dot input format. | |
std::string | CStr (Idx index) const |
Return pretty printable color name for index. | |
Reachability | |
bool | Accessible (void) |
Make colored generator accessible. | |
bool | IsAccessible (void) const |
Check if the colored mtcGenerator is accessible. | |
StateSet | StronglyCoacSet (void) const |
Generate a state set with all strongly coaccessible states. | |
bool | StronglyCoac (void) |
Make generator strongly coaccessible. | |
bool | IsStronglyCoac (void) const |
Check if mtcGenerator is strongly coaccessible. | |
StateSet | StronglyTrimSet (void) const |
Generate a state set with all the strongly trim generator's states. | |
bool | StronglyTrim (void) |
Make generator strongly trim. | |
bool | IsStronglyTrim (void) const |
Check if the mtcGenerator is strongly trim. | |
Further Methods | |
StateAttr * | Attributep (Idx stateIndex) |
Get a state's attribute. | |
void | NewColorSymbolTable () |
Insert a new local color symbol table. | |
std::map< Idx, ColorSet > | StateColorMap (void) const |
Return a color map with state indices and their corresponding colors. | |
Protected Attributes | |
SymbolTable * | mpColorSymbolTable |
Pointer to currently used symbol table. |
faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::TmtcGenerator | ( | void | ) | [inline] |
Creates an emtpy mtcGenerator.
doxygen group
faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::TmtcGenerator | ( | const TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr > & | rOtherGen | ) | [inline] |
Creates an mtcgenerator from another mtcgenerator - copy constructor:.
If the other mtcGenerator uses a local color symbol table, the new generator also creates a local symbol table. This new one is empty! If you use a local symbol table, you should implement a copy mechanism for the entries of the original generator's symbol table.
rOtherGen | Other mtcgenerator to copy |
faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::TmtcGenerator | ( | const vGenerator & | rOtherGen | ) | [inline] |
Creates an mtcgenerator from another generator - copy constructor.
rOtherGen | Other generator to copy |
faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::TmtcGenerator | ( | const char * | pFileName | ) | [inline] |
Constructs an mtcGenerator from file.
Define FAUDES_CHECKED for consistency checks
pFileName | Filename |
Exception |
|
faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::~TmtcGenerator | ( | void | ) | [inline] |
Destructor for mtcGenerator.
void faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Copy | ( | TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr > & | rGen | ) | const [inline, virtual] |
Copy to other mtcgenerator.
rGen | mtcGenerator which will become the copy |
void faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Copy | ( | vGenerator & | rGen | ) | const [inline, virtual] |
Copy to other generator.
rGen | Generator which will become the copy |
Reimplemented from faudes::TaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >.
SymbolTable * faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::GlobalColorSymbolTablep | ( | void | ) | [inline] |
Get Pointer to global ColorSymbolTable.
doxygen group This is a static member of ColorSet and used as default for all derived classes and instantiated objects.
SymbolTable * faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ColorSymbolTablep | ( | void | ) | const [inline] |
Get Pointer to ColorSymbolTable currently used by this mtcGenerator.
void faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ColorSymbolTable | ( | SymbolTable * | pSymTab | ) | [inline] |
void faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ColorSymbolTable | ( | const TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr > & | rOtherGen | ) | [inline] |
Set ColorSymbolTable as given by rOtherGen.
rOtherGen | Other generator |
Idx faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::InsColoredState | ( | const std::string & | rStateName, | |
const std::string & | rColorName | |||
) | [inline] |
Create a new named state and set the color rColorName.
doxygen group Define FAUDES_CHECKED for consistency checks
rStateName | Name of the state to add | |
rColorName | Name of the state color |
Exception |
|
Idx faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::InsColoredState | ( | const std::string & | rStateName, | |
Idx | colorIndex | |||
) | [inline] |
Create a new named state and set the color colorIndex.
Define FAUDES_CHECKED for consistency checks
rStateName | Name of the state to add | |
colorIndex | Index of the state color, must already exist in symbol table |
Exception |
|
Idx faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::InsColoredState | ( | const std::string & | rStateName, | |
const ColorSet & | rColors | |||
) | [inline] |
Create a new named state and set the colors from rColors.
rStateName | Name of the state to add | |
rColors | Color set |
Idx faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::InsColoredState | ( | const ColorSet & | rColors | ) | [inline] |
Create a new unnamed state and set the colors from rColors.
rColors | Color set |
Idx faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::InsColor | ( | Idx | stateIndex, | |
const std::string & | rColorName | |||
) | [inline] |
Insert a color by name into an existing state.
Define FAUDES_CHECKED for consistency checks
stateIndex | Index of state to be set as colored state | |
rColorName | Name of state color to be added |
Exception |
|
void faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::InsColor | ( | Idx | stateIndex, | |
Idx | colorIndex | |||
) | [inline] |
Insert a color by index into an existing state.
Define FAUDES_CHECKED for consistency checks
stateIndex | Index of state to be set as colored state | |
colorIndex | Index of color to be added to state, must already exist in symbol table |
Exception |
|
void faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::InsColors | ( | Idx | stateIndex, | |
const ColorSet & | rColors | |||
) | [inline] |
Insert multiple colors from a color set into an existing state.
Define FAUDES_CHECKED for consistency checks
stateIndex | Index of state to be set as colored state | |
rColors | Reference to color set with colors to set for state, colors must already exist in symbol table |
Exception |
|
void faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::DelColor | ( | Idx | stateIndex, | |
const std::string & | rColorName | |||
) | [inline] |
void faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::DelColor | ( | Idx | stateIndex, | |
Idx | colorIndex | |||
) | [inline] |
Remove color by index form an existing state specified by index.
Define FAUDES_CHECKED for consistency checks.
stateIndex | State index | |
colorIndex | Index of the state color |
Exception |
|
void faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::DelColor | ( | const std::string & | rColorName | ) | [inline] |
Remove color by name from all states.
rColorName | Name of state color |
void faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::DelColor | ( | Idx | colorIndex | ) | [inline] |
Remove color by index from all states.
colorIndex | Index of state color |
void faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ClrStateColors | ( | Idx | stateIndex | ) | [inline] |
Remove all colors from a particular state.
If symbol table is local, unused colors are deleted from it, global symbol table stays untouched.
Define FAUDES_CHECKED for consistency checks
stateIndex | State where colors should be removed |
Exception |
|
void faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ClrStateAttributes | ( | ) | [inline] |
Clear all the generator's state attributes.
If symbol table is local, it is cleared, global symbol table stays untouched.
void faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Colors | ( | ColorSet & | rColors | ) | const [inline] |
ColorSet faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Colors | ( | void | ) | const [inline] |
Returns a color set containing all the generator's colors.
ColorSet faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Colors | ( | Idx | stateIndex | ) | const [inline] |
Return a color set which contains all colors of one state.
Exception |
|
void faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::StateColors | ( | Idx | stateIndex, | |
ColorSet & | rColors | |||
) | const [inline] |
Get color set of a given state of the generator.
Define FAUDES_CHECKED for consistency checks
stateIndex | State index for which the color set should be delivered | |
rColors | Color set to save result |
Exception |
|
ColorSet faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::StateColors | ( | Idx | stateIndex | ) | const [inline] |
Get color set of a given state of the generator.
Define FAUDES_CHECKED for consistency checks
stateIndex | State index for which the color set should be delivered |
Exception |
|
StateSet faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ColoredStates | ( | Idx | colorIndex | ) | const [inline] |
Returns a state set containing all states that are colored with the color given by index.
colorIndex | Color whose corresponding states shall be returned |
StateSet faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ColoredStates | ( | const std::string & | rColorName | ) | const [inline] |
Returns a state set containing all states that are colored with the color given by name.
rColorName | Color whose corresponding states shall be returned |
StateSet faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ColoredStates | ( | ) | const [inline] |
Returns a state set containing all colored states of the mtcGenerator.
StateSet faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::UncoloredStates | ( | ) | const [inline] |
Returns a state set containing all states that are not colored.
bool faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ExistsColor | ( | Idx | colorIndex | ) | const [inline] |
Check if color exists in generator.
colorIndex | Index which will be examined regarding existence in the generator |
bool faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ExistsColor | ( | const std::string & | rColorName | ) | const [inline] |
Check if color exists in generator.
Define FAUDES_CHECKED for consistency checks
rColorName | Color name which will be examined regarding existence in the generator |
Exception |
|
bool faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ExistsColor | ( | Idx | stateIndex, | |
Idx | colorIndex | |||
) | const [inline] |
Check if color exists in a given state of the mtcGenerator.
Define FAUDES_CHECKED for consistency checks
stateIndex | Index which determines the generator's state | |
colorIndex | Color index to look for in given state |
Exception |
|
bool faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::IsColored | ( | ) | const [inline] |
Check if there is at least one colored state in the mtcGenerator.
bool faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::IsColored | ( | Idx | stateIndex | ) | const [inline] |
Check if the given state is colored or not.
Define FAUDES_CHECKED for consistency checks
stateIndex | State to examine |
Exception |
|
void faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::DelColorName | ( | Idx | colorIndex | ) | [inline] |
Finally deletes a color name and its index from the currently used symbol table.
doxygen group
colorIndex | Index of color to delete from symbol table |
void faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::CheckSymbolTable | ( | Idx | colorIndex | ) | [inline] |
Delete the given color from the symbol table if it is not used anymore in the generator by calling DelColorName.
colorIndex | Color which will be deleted from symbol table if not used anymore |
void faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::CheckSymbolTable | ( | ColorSet & | rColors | ) | [inline] |
Delete all colors from the given color set from the color symbol table by calling DelColorName if they are not used anymore.
rColors must use the same symbol table as the mtcGenerator!
rColors | Color set with all colors that will be deleted from symbol table if not used anymore |
Exception |
|
std::string faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ColorName | ( | Idx | colorIndex | ) | const [inline] |
Look up the color name for a given color index.
colorIndex |
Idx faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ColorIndex | ( | const std::string & | rColorName | ) | const [inline] |
Look up the color index for a given color name.
rColorName |
void faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::DotWrite | ( | const std::string & | rFileName | ) | [inline] |
Writes generator to dot input format.
doxygen group
The dot file format is specified by the graphiz package; see http://www.graphviz.org. The package includes the dot command line tool to generate a graphical representation of the generators graph. See also vGenerator::GraphWrite(). This functions sets the re-indexing to minimal indices.
rFileName | Name of file to save result |
std::string faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::CStr | ( | Idx | index | ) | const [inline] |
Return pretty printable color name for index.
Primary meant for debugging messages.
index |
bool faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Accessible | ( | void | ) | [inline] |
Make colored generator accessible.
doxygen group States being not accessible are deleted.
| |||
|
Reimplemented from faudes::vGenerator.
bool faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::IsAccessible | ( | void | ) | const [inline] |
Check if the colored mtcGenerator is accessible.
Reimplemented from faudes::vGenerator.
StateSet faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::StronglyCoacSet | ( | void | ) | const [inline] |
Generate a state set with all strongly coaccessible states.
bool faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::StronglyCoac | ( | void | ) | [inline] |
Make generator strongly coaccessible.
Forbidden states are deleted.
| |||
|
bool faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::IsStronglyCoac | ( | void | ) | const [inline] |
Check if mtcGenerator is strongly coaccessible.
StateSet faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::StronglyTrimSet | ( | void | ) | const [inline] |
Generate a state set with all the strongly trim generator's states.
bool faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::StronglyTrim | ( | void | ) | [inline] |
Make generator strongly trim.
Therefore, the forbidden states are deleted.
| |||
|
bool faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::IsStronglyTrim | ( | void | ) | const [inline] |
Check if the mtcGenerator is strongly trim.
StateAttr * faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Attributep | ( | Idx | stateIndex | ) | [inline] |
Get a state's attribute.
doxygen group A new attribute will be inserted if necessary. The method uses a local symbol table if there is one and mpColorSymbolTable points to it.
Define FAUDES_CHECKED for consistency checks
stateIndex | State index |
Exception |
|
void faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::NewColorSymbolTable | ( | ) | [inline] |
Insert a new local color symbol table.
mpColorSymbolTable is reset. The color symbol table pointer in every state attribute's mColors is also reset to the new symbol table. If there already exist color entries in the current symbol table, they are copied to the new local one.
Define FAUDES_CHECKED for consistency checks
Exception |
|
std::map< Idx, ColorSet > faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::StateColorMap | ( | void | ) | const [inline] |
Return a color map with state indices and their corresponding colors.
Only states with asociated colors are part of this list.
SymbolTable* faudes::TmtcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::mpColorSymbolTable [protected] |
Pointer to currently used symbol table.
libFAUDES 2.13a c++ source docu by doxygen 1.5.6