SIMLIB/C++ 3.09
Loading...
Searching...
No Matches
simlib3::Condition Class Reference

change detector - Boolean version (int) More...

#include <simlib.h>

Inheritance diagram for simlib3::Condition:
Collaboration diagram for simlib3::Condition:

Public Member Functions

 Condition (Input i)
 ~Condition ()
bool Value ()
 boolean state of condition
Input SetInput (Input inp)
Public Member Functions inherited from simlib3::aCondition
 aCondition ()
 ~aCondition ()
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 Member Functions

virtual bool Test () override
 Condition::operator ().
bool Up ()
bool Down ()
bool Change ()

Private Member Functions

virtual void Init () override
 initialize
virtual void SetNewStatus () override
 update

Private Attributes

Input in
unsigned char cc
 state
unsigned char ccl
 old state

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 }
Static Public Member Functions inherited from simlib3::aCondition
static void InitAll ()
static void SetAll ()
static void TestAll ()
static void AllActions ()
static bool isAny ()
Protected Attributes inherited from simlib3::SimObject
unsigned _flags
 bool flags for internal use (TODO bitfield?)

Detailed Description

change detector - Boolean version (int)

Definition at line 1511 of file simlib.h.

Constructor & Destructor Documentation

◆ Condition()

simlib3::Condition::Condition ( Input i)
explicit

Definition at line 75 of file cond.cc.

References cc, ccl, and in.

Referenced by simlib3::ConditionDown::ConditionDown(), and simlib3::ConditionUp::ConditionUp().

◆ ~Condition()

simlib3::Condition::~Condition ( )

Definition at line 82 of file cond.cc.

Member Function Documentation

◆ Change()

bool simlib3::Condition::Change ( )
inlineprotected

Definition at line 1521 of file simlib.h.

References cc, and ccl.

Referenced by Test().

◆ Down()

bool simlib3::Condition::Down ( )
inlineprotected

Definition at line 1520 of file simlib.h.

References cc, and ccl.

Referenced by simlib3::ConditionDown::Test().

◆ Init()

void simlib3::Condition::Init ( )
overrideprivatevirtual

initialize

Implements simlib3::aCondition.

Definition at line 89 of file cond.cc.

References cc, and ccl.

◆ SetInput()

Input simlib3::Condition::SetInput ( Input inp)
inline

Definition at line 1526 of file simlib.h.

References in, and simlib3::Input::Set().

◆ SetNewStatus()

void simlib3::Condition::SetNewStatus ( )
overrideprivatevirtual

update

Implements simlib3::aCondition.

Definition at line 97 of file cond.cc.

References cc, and ccl.

◆ Test()

bool simlib3::Condition::Test ( )
overrideprotectedvirtual

◆ Up()

bool simlib3::Condition::Up ( )
inlineprotected

Definition at line 1519 of file simlib.h.

References cc, and ccl.

Referenced by simlib3::ConditionUp::Test().

◆ Value()

bool simlib3::Condition::Value ( )
inline

boolean state of condition

Definition at line 1525 of file simlib.h.

References cc.

Member Data Documentation

◆ cc

unsigned char simlib3::Condition::cc
private

state

Definition at line 1513 of file simlib.h.

Referenced by Change(), Condition(), Down(), Init(), SetNewStatus(), Test(), Up(), and Value().

◆ ccl

unsigned char simlib3::Condition::ccl
private

old state

Definition at line 1514 of file simlib.h.

Referenced by Change(), Condition(), Down(), Init(), SetNewStatus(), and Up().

◆ in

Input simlib3::Condition::in
private

Definition at line 1512 of file simlib.h.

Referenced by Condition(), SetInput(), and Test().


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