SIMLIB/C++  3.07
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) More...
 
virtual double Value ()=0
 get block output value
this method should be defined in classes derived from aContiBlock More...
 
- 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 More...
 
 SimObject ()
 constructor More...
 
virtual ~SimObject ()
 virtual destructor More...
 
void * operator new (size_t size)
 allocate object, set _flags More...
 
void operator delete (void *ptr)
 deallocate object More...
 
void * operator new[] (size_t size)=delete
 
void operator delete[] (void *ptr)=delete
 
bool isAllocated () const
 
virtual std::string Name () const
 get object name More...
 
bool HasName () const
 
void SetName (const std::string &name)
 assign the name More...
 
virtual void Output () const
 print object to default output More...
 

Protected Attributes

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

Private Member Functions

virtual void Eval ()
 evaluate without loop detection More...
 

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::Relay, simlib3::Blash, simlib3::Hyst, simlib3::Status, simlib3::Integrator, simlib3::_UMinus, simlib3::_Div, simlib3::_Mul, simlib3::_Sub, and simlib3::_Add.

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 834 of file simlib.h.

Referenced by _Eval().


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