RootComponent.cc Source File
Back to the index.
Go to the documentation of this file.
46 if (m_accuracy !=
"cycle" && m_accuracy !=
"sloppy") {
64 const string& name = var.
GetName();
66 if (name ==
"accuracy") {
84 static void Test_RootComponent_CreateComponent()
90 "should NOT be possible", component.
IsNULL() ==
true);
93 static void Test_RootComponent_InitialVariables()
106 static void Test_RootComponent_AccuracyValues()
125 UNITTEST(Test_RootComponent_CreateComponent);
126 UNITTEST(Test_RootComponent_InitialVariables);
127 UNITTEST(Test_RootComponent_AccuracyValues);
bool PreRunCheck(GXemul *gxemul)
Checks the state of this component and all its children, before starting execution.
bool IsNULL() const
Checks whether or not an object is referenced by the reference counted pointer.
bool AddVariable(const string &name, T *variablePointer)
Adds a state variable of type T to the Component.
virtual bool PreRunCheckForComponent(GXemul *gxemul)
Checks the state of this component, before starting execution.
StateVariables make up the persistent state of Component objects.
uint64_t ToInteger() const
Returns the variable as an unsignedinteger value.
#define UNITTESTS(class)
Helper for unit test case execution.
virtual bool CheckVariableWrite(StateVariable &var, const string &oldValue)
Checks whether a write to a variable is OK.
UI * GetUI()
Gets an UI reference for outputting debug messages during runtime.
RootComponent(GXemul *owner=NULL)
Constructs a RootComponent.
#define UNITTEST(functionname)
Helper for unit test case execution.
Base class for a User Interface.
static void Assert(const string &strFailMessage, bool condition)
Asserts that a boolean condition is correct.
virtual void ShowDebugMessage(const string &msg)=0
Shows a debug message.
bool SetValue(const string &expression)
Set the variable's value, using a string expression.
static refcount_ptr< Component > CreateComponent(const string &componentNameAndOptionalArgs, GXemul *gxemul=NULL)
Creates a component given a short component name.
string ToString() const
Returns the variable as a readable string.
bool SetVariableValue(const string &name, const string &expression)
Sets a variable to a new value.
A Component which is the default root node in the configuration.
virtual bool CheckVariableWrite(StateVariable &var, const string &oldValue)
Checks whether a write to a variable is OK.
UI * GetUI()
Gets a pointer to the GXemul instance' active UI.
const string & GetName() const
Gets the name of the variable.
A Component is a node in the configuration tree that makes up an emulation setup.
StateVariable * GetVariable(const string &name)
Gets a pointer to a state variable.
void SetOwner(GXemul *owner)
Generated on Tue Mar 24 2020 14:04:48 for GXemul by
1.8.17