#include <CStateVariableCommand.h>
Public Methods | |
CStateVariableCommand () | |
Default constructor. | |
~CStateVariableCommand () | |
Destructor. | |
virtual int | operator() (CTCLInterpreter &rinterp, CTCLResult &rResult, int argc, char **argv) |
int | Create (CTCLInterpreter &rInterp, CTCLResult &rResult, int argc, char **argv) |
int | Delete (CTCLInterpreter &rInterp, CTCLResult &rResult, int argc, char **argv) |
int | List (CTCLInterpreter &rInterp, CTCLResult &rRestul, int argc, char **argv) |
CStateVariable * | Create (const string &rName) |
void | Delete (const string &rName) |
void | Delete (StateVariableIterator &rIter) |
StateVariableIterator | begin () |
StateVariableIterator | end () |
size_t | size () |
StateVariableIterator | find (const string &rName) |
Protected Methods | |
void | Usage (CTCLResult &rResult) |
Private Methods | |
CStateVariableCommand (const CStateVariableCommand &rhs) | |
Copy constructor. | |
CStateVariableCommand & | operator= (const CStateVariableCommand &rhs) |
Assignment. | |
int | operator== (const CStateVariableCommand &rhs) const |
Comparison for equality. | |
int | operator!= (const CStateVariableCommand &rhs) const |
Private Attributes | |
StateVariableMap | m_StateVariables |
|
Default constructor. Default constructor. This is called when declarations of the form e.g.:
Definition at line 314 of file CStateVariableCommand.cpp. |
|
Destructor. Destructor. Iterate through the state variable map, destroying each var. Definition at line 322 of file CStateVariableCommand.cpp. References begin(), end(), and StateVariableIterator. |
|
Copy constructor.
|
|
Returns a looping iterator which will, on repeated increments, traverse the set of state variables. Definition at line 532 of file CStateVariableCommand.cpp. References m_StateVariables. Referenced by List(), CInterpreterCore::RegisterExtensions(), CExperiment::TriggerStateVariableBuffer(), and ~CStateVariableCommand(). |
|
Create a new state variable given its name. This interface allows creating variable programmatically. It is also used by the command interface.
Definition at line 591 of file CStateVariableCommand.cpp. References m_StateVariables. |
|
Creates a new run variable. The optional parameters specify the name and the optional initial value for the variable. The syntax of this command is: statevar name Since the name can be an array base name, there's no mechanism to provide an initial value.
Definition at line 410 of file CStateVariableCommand.cpp. References Usage(). Referenced by operator()(), and CInterpreterCore::RegisterExtensions(). |
|
Delete a state variable given an iterator that points to it.
Definition at line 622 of file CStateVariableCommand.cpp. References m_StateVariables, and StateVariableIterator. |
|
Delete a state variable given its name. This function is a no-op if the name does not exist.
Definition at line 608 of file CStateVariableCommand.cpp. References Delete(), m_StateVariables, and StateVariableIterator. |
|
Deletes an existing state variable. If the underlying TCL variables are still defined, they will remain defined, but won't figure in the production of StateVariableBuffers, nor will readonly-ness be enforced if the run is not halted.
Definition at line 449 of file CStateVariableCommand.cpp. References m_StateVariables, StateVariableIterator, and Usage(). Referenced by Delete(), and operator()(). |
|
Returns an end of iteration sentinel iterator for the set of state variables being maintained. Definition at line 545 of file CStateVariableCommand.cpp. References m_StateVariables. Referenced by CExperiment::GetRunNumber(), CReadoutMain::getScalerPeriod(), CReadoutMain::getTitle(), List(), CInterpreterCore::RegisterExtensions(), CExperiment::TriggerStateVariableBuffer(), and ~CStateVariableCommand(). |
|
Locate the state variable that corresponds to the specified name.
Definition at line 637 of file CStateVariableCommand.cpp. References m_StateVariables. Referenced by CExperiment::GetRunNumber(), CReadoutMain::getScalerPeriod(), and CReadoutMain::getTitle(). |
|
Lists the set of state variables which glob match the pattern. This work is all done in the internal class: ListMatches which provides a function object to the STL for_each generic algorithm. Syntax: statevar -list pattern pattern can contain glob substitution special characters.
Definition at line 500 of file CStateVariableCommand.cpp. References begin(), end(), and Usage(). Referenced by operator()(). |
|
|
|
Provides the dispatching for the various subcommands of the statevariable core command. This command has the following forms and handlers:
Definition at line 354 of file CStateVariableCommand.cpp. |
|
Assignment.
|
|
Comparison for equality.
|
|
Returns the number of variables which have been defined.
Definition at line 557 of file CStateVariableCommand.cpp. References m_StateVariables. |
|
Append usage information to the result string. Definition at line 567 of file CStateVariableCommand.cpp. Referenced by Create(), Delete(), List(), and operator()(). |
|
Definition at line 318 of file CStateVariableCommand.h. Referenced by begin(), Create(), Delete(), end(), find(), and size(). |