SIMLIB/C++ 3.09
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Private Attributes | Friends | List of all members
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:
Inheritance graph
[legend]
Collaboration diagram for simlib3::Link:
Collaboration graph
[legend]

Public Member Functions

 Link ()
 
virtual ~Link ()
 
virtual void Into (List *l)
 insert last
 
virtual void Out ()
 remove from list
 
ListWhere ()
 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

Linkpred
 previous object in List
 
Linksucc
 next object in List
 
Listhead
 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 336 of file simlib.h.

Constructor & Destructor Documentation

◆ Link() [1/2]

simlib3::Link::Link ( Link p,
Link s,
List h 
)
protected

Definition at line 37 of file link.cc.

◆ Link() [2/2]

simlib3::Link::Link ( )

Definition at line 32 of file link.cc.

◆ ~Link()

simlib3::Link::~Link ( )
virtual

Definition at line 45 of file link.cc.

References head, 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(), and Out().

◆ isInQueue()

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

present in queue

Definition at line 349 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, LinkOutError, and simlib3::SIMLIB_error().

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

◆ Where()

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

where is linked

Definition at line 348 of file simlib.h.

References head.

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

Friends And Related Function Documentation

◆ List

friend class List
friend

Definition at line 340 of file simlib.h.

Member Data Documentation

◆ head

List* simlib3::Link::head
private

◆ pred

Link* simlib3::Link::pred
private

◆ succ

Link* simlib3::Link::succ
private

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