SIMLIB/C++  3.07
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 More...
 
virtual void Out ()
 remove from list More...
 
ListWhere ()
 where is linked More...
 
virtual bool isInQueue ()
 present in queue 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 Member Functions

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

Private Attributes

Linkpred
 previous object in List More...
 
Linksucc
 next object in List More...
 
Listhead
 pointer to List (if any) More...
 

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?) More...
 

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

Referenced by simlib3::Entity::Passivate().

◆ isInQueue()

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

present in queue

Definition at line 349 of file simlib.h.

◆ Out()

void simlib3::Link::Out ( )
virtual

◆ Where()

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

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: