SIMLIB/C++ 3.09
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | Private Member Functions | List of all members
simlib3::aContiBlock Class Referenceabstract

abstract base for continuous blocks with single output suitable for expression-tree building and evaluation More...

#include <simlib.h>

Inheritance diagram for simlib3::aContiBlock:
Inheritance graph
[legend]
Collaboration diagram for simlib3::aContiBlock:
Collaboration graph
[legend]

Public Member Functions

 aContiBlock ()
 
virtual void _Eval ()
 evaluate block (with loop detection)
 
virtual double Value ()=0
 get block output value
this method should be defined in classes derived from aContiBlock
 
- Public Member Functions inherited from simlib3::SimObject
bool TestAndSetFlag (bool new_value, unsigned n)
 internal method for flag manipulation is used for algebraic loop checking in continuous blocks
 
 SimObject ()
 constructor
 
virtual ~SimObject ()
 virtual destructor
 
void * operator new (size_t size)
 allocate object, set _flags
 
void operator delete (void *ptr)
 deallocate object
 
void * operator new[] (size_t size)=delete
 
void operator delete[] (void *ptr)=delete
 
bool isAllocated () const
 
virtual std::string Name () const
 get object name
 
bool HasName () const
 
void SetName (const std::string &name)
 assign the name
 
virtual void Output () const
 print object to default output
 

Protected Attributes

bool isEvaluated
 
- Protected Attributes inherited from simlib3::SimObject
unsigned _flags
 bool flags for internal use (TODO bitfield?)
 

Private Member Functions

virtual void Eval ()
 evaluate without loop detection
 

Additional Inherited Members

- Public Types inherited from simlib3::SimObject
enum  _Flags { _CLEAR_ALL_FLAGS = 0 , _ALLOCATED_FLAG = 1<<0 , _EVAL_FLAG = 1<<1 , _HAS_NAME_FLAG = 1<<2 }
 

Detailed Description

abstract base for continuous blocks with single output suitable for expression-tree building and evaluation

Definition at line 832 of file simlib.h.

Constructor & Destructor Documentation

◆ aContiBlock()

simlib3::aContiBlock::aContiBlock ( )
inline

Definition at line 838 of file simlib.h.

Member Function Documentation

◆ _Eval()

void simlib3::aContiBlock::_Eval ( )
virtual

◆ Eval()

virtual void simlib3::aContiBlock::Eval ( )
inlineprivatevirtual

evaluate without loop detection

Reimplemented in simlib3::_Add, simlib3::_Sub, simlib3::_Mul, simlib3::_Div, simlib3::_UMinus, simlib3::Integrator, simlib3::Status, simlib3::Hyst, simlib3::Blash, and simlib3::Relay.

Definition at line 834 of file simlib.h.

Referenced by _Eval().

◆ Value()

virtual double simlib3::aContiBlock::Value ( )
pure virtual

Member Data Documentation

◆ isEvaluated

bool simlib3::aContiBlock::isEvaluated
protected

Definition at line 836 of file simlib.h.

Referenced by _Eval().


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