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

base class for all double-linked list items
item can be at single place only (identified by where() method)
used for Queue implementation More...

#include <simlib.h>

Inheritance diagram for simlib3::Link:
Collaboration diagram for simlib3::Link:

Public Member Functions

 Link ()
virtual ~Link ()
virtual void Into (List *l)
 insert last
virtual void Out ()
 remove from list
List * Where ()
 where is linked
virtual bool isInQueue ()
 present in queue
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

 Link (Link *p, Link *s, List *h)

Private Attributes

Link * pred
 previous object in List
Link * succ
 next object in List
List * head
 pointer to List (if any)

Friends

class List

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 }
Protected Attributes inherited from simlib3::SimObject
unsigned _flags
 bool flags for internal use (TODO bitfield?)

Detailed Description

base class for all double-linked list items
item can be at single place only (identified by where() method)
used for Queue implementation

Definition at line 341 of file simlib.h.

Constructor & Destructor Documentation

◆ Link() [1/2]

◆ Link() [2/2]

simlib3::Link::Link ( )

Definition at line 32 of file link.cc.

References head, pred, and succ.

◆ ~Link()

simlib3::Link::~Link ( )
virtual

Definition at line 45 of file link.cc.

References head, simlib3::LinkDelError, and simlib3::SIMLIB_error().

Member Function Documentation

◆ Into()

void simlib3::Link::Into ( List * l)
virtual

insert last

Definition at line 53 of file link.cc.

References head, simlib3::List::InsLast(), List, and Out().

Referenced by simlib3::Process::Behavior(), and List.

◆ isInQueue()

virtual bool simlib3::Link::isInQueue ( )
inlinevirtual

present in queue

Definition at line 354 of file simlib.h.

References Where().

◆ Out()

void simlib3::Link::Out ( )
virtual

remove from list

Reimplemented in simlib3::Entity.

Definition at line 63 of file link.cc.

References simlib3::List::Get(), head, simlib3::LinkOutError, and simlib3::SIMLIB_error().

Referenced by Into(), List, and simlib3::Entity::Out().

◆ Where()

List * simlib3::Link::Where ( )
inline

where is linked

Definition at line 353 of file simlib.h.

References head, and List.

Referenced by simlib3::Process::_Run(), simlib3::Process::Into(), isInQueue(), simlib3::Process::Terminate(), and simlib3::Process::~Process().

◆ List

friend class List
friend

Definition at line 345 of file simlib.h.

References Into(), Link(), List, and Out().

Referenced by Into(), Link(), List, and Where().

Member Data Documentation

◆ head

◆ pred

◆ succ


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