Base class for the dynamic system blocks
Inheritance:
Public Methods
-
CBlock()
- Constructor
-
CBlock(const CBlock* pBlock, const CDSLibComponent* pContainer = NULL)
- Copy-constructor.
-
virtual ~CBlock()
- Destructor
-
virtual bool AcceptsContainer(const CDSLibComponent* pContainer)
- If the argument is a CSuperBlock or any descendant class, sets the argument as the container and returns true.
-
virtual bool AddComponent(CDSLibComponent* pComponent)
- Calls CDSLibComponent::AddComponent() with the same argument, and returns the result.
-
CBlockVariable* BlockVariable(const std::string & strIdentifier) const
- Returns the block variable with the identifier indicated by the argument.
-
CBlockVariable* BlockVariable(unsigned int uIndex) const
- Returns the block variable at the position of the list of block variables indicated by the argument.
-
virtual bool DescendantOf(const std::string & strClassName) const
- Returns if the argument is "CBlock" or the name of one of its base classes.
-
virtual const std::string GlobalIdentifier() const
- Returns the global identifier of the block in the realtime code
-
CInput* Input(const std::string & strName) const
- Returns the input with the identifier indicated by the argument.
-
CInput* Input(unsigned int uIndex) const
- Returns the input at the position of the list of inputs indicated by the argument.
-
virtual unsigned int NumberOfBlockVariables() const
- Returns the number of block variables in the block
-
virtual unsigned int NumberOfInputs() const
- Returns the number of inputs in the block
-
virtual unsigned int NumberOfOutputs() const
- Returns the number of outputs in the block
-
COutput* Output(const std::string & strName) const
- Returns the output with the identifier indicated by the argument.
-
COutput* Output(unsigned int uIndex) const
- Returns the output at the position of the list of outputs indicated by the argument.
-
bool SchedulerContainsReader() const
- Returns if the scheduler of this block contains CReader components
-
bool SchedulerContainsWriter() const
- Returns if the scheduler of this block contains CWriter components
-
virtual std::string Value(const std::string & strValueName) const
- Returns a string to be inserted in the generated code instead of a <value.
Public Methods
-
bool AllArrange()
-
void AllGenerateCode(const std::string &strTemplatesPath, CCodeSection* pCodeSection) const
-
virtual bool AllRepeatedValue(const CDSLibComponent* pCaller, const std::string & strValueName, const std::string & strValue) const
-
void AllReportMessages(CMessages* pMessagesReport)
-
virtual std::string Class() const
-
virtual CDSLibComponent* Clone( const CDSLibComponent* pContainer = NULL) const
-
const CDSLibComponent* Component(const std::string & strIdentifier, const std::string & strClass) const
-
const CDSLibComponentPointers& Components() const
-
const CDSLibComponent* Container( const std::string & strClass = "", unsigned int uSkip = 0) const
-
void DeleteObjects()
-
const std::string& Identifier() const
-
int ComponentIndex() const
-
const CMessages& Messages() const
-
virtual bool RepeatedValue(const std::string &, const std::string &) const
-
bool SetIdentifier(const std::string & strIdentifier)
Protected Methods
-
virtual void AddMessage(unsigned int uNumber)
-
virtual void Arrange()
-
CDSLibComponentPointers& Components()
-
virtual void ComponentsGenerateCode(const std::string &strTemplatesPath, CCodeSection* pCodeSection) const
-
virtual void GenerateCode(const std::string & strTemplatesPath, CCodeSection* pCodeSection) const
-
std::string LongLongToString(long long llNumber) const
-
CMessages& Messages()
-
bool ParseTemplate(const std::string & strTemplatesPath, const std::string & strTemplate, CCodeSection* pOutputSection) const
-
void SetContainer(const CDSLibComponent* pContainer)
-
long long StringToLongLong(const std::string &strNumber) const
-
std::string DoubleToString(double dNumber) const
Documentation
Base class for the dynamic system blocks
CBlock()
- Constructor
CBlock(const CBlock* pBlock, const CDSLibComponent* pContainer = NULL)
- Copy-constructor. Copies all the attributes of CBlock and calls
the copy-constructor of CDSLibComponent.
- Parameters:
- pBlock - Object to copy from
pContainer - Container for this new object
virtual ~CBlock()
- Destructor
virtual bool AcceptsContainer(const CDSLibComponent* pContainer)
- If the argument is a CSuperBlock or any descendant class, sets the
argument as the container and returns true. Otherwise, it
generates the message NON_SUITABLE_CONTAINER_ERROR and retun false.
- Parameters:
- pContainer - Container candidate
virtual bool AddComponent(CDSLibComponent* pComponent)
- Calls CDSLibComponent::AddComponent() with the same argument, and
returns the result. If the component is CInput or a descendant, adds a
pointer to it to m_Inputs. If the component is COutput or a descendant,
adds a pointer to it to m_Outputs. If the component is CBlockVariable or
a descendant, adds a pointer to it to m_BlockVariables.
- Parameters:
- pComponent - New component
CBlockVariable* BlockVariable(const std::string & strIdentifier) const
- Returns the block variable with the identifier indicated by the
argument.
- Parameters:
- strIdentifier - Identifier of the block variable
CBlockVariable* BlockVariable(unsigned int uIndex) const
- Returns the block variable at the position of the list of block
variables indicated by the argument.
- Parameters:
- uIndex - Index for the list of block variables, starting with 0
virtual bool DescendantOf(const std::string & strClassName) const
- Returns if the argument is "CBlock" or the name of one of
its base classes.
- Parameters:
- strClassName - Class name
virtual const std::string GlobalIdentifier() const
- Returns the global identifier of the block in the realtime code
CInput* Input(const std::string & strName) const
- Returns the input with the identifier indicated by the argument.
- Parameters:
- strName - Indentifier of the input
CInput* Input(unsigned int uIndex) const
- Returns the input at the position of the list of inputs indicated by
the argument.
- Parameters:
- uIndex - Index for the list of inputs, starting with 0
virtual unsigned int NumberOfBlockVariables() const
- Returns the number of block variables in the block
virtual unsigned int NumberOfInputs() const
- Returns the number of inputs in the block
virtual unsigned int NumberOfOutputs() const
- Returns the number of outputs in the block
COutput* Output(const std::string & strName) const
- Returns the output with the identifier indicated by the argument.
- Parameters:
- strName - Identifier of the output
COutput* Output(unsigned int uIndex) const
- Returns the output at the position of the list of outputs indicated by
the argument.
- Parameters:
- uIndex - Index for the list of inputs, starting with 0
bool SchedulerContainsReader() const
- Returns if the scheduler of this block contains CReader components
bool SchedulerContainsWriter() const
- Returns if the scheduler of this block contains CWriter components
virtual std::string Value(const std::string & strValueName) const
- Returns a string to be inserted in the generated code instead of a
<value. > template command.
- Parameters:
- strValueName - "name" argument of the template command
- Direct child classes:
- CSuperBlock
CFunction
Alphabetic index HTML hierarchy of classes or Java
This page was generated with the help of DOC++.