SIMLIB/C++  3.07
Classes | Public Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
simlib3::List Class Reference

list of Link* items, uses data from Link More...

#include <simlib.h>

Inheritance diagram for simlib3::List:
Inheritance graph
[legend]
Collaboration diagram for simlib3::List:
Collaboration graph
[legend]

Classes

class  iterator
 

Public Member Functions

 List ()
 
 List (const char *_name)
 
 ~List ()
 
virtual void Output () const override
 print object to default output More...
 
void InsFirst (Link *e)
 
void InsLast (Link *e)
 
void PredIns (Link *e, iterator pos)
 
void PostIns (Link *e, iterator pos)
 
LinkGetFirst ()
 remove first More...
 
LinkGetLast ()
 remove last More...
 
virtual LinkGet (iterator pos)
 remove at position More...
 
unsigned size () const
 
iterator begin ()
 
iterator end ()
 
Linkfront ()
 
Linkback ()
 
bool empty ()
 
void clear ()
 
- 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...
 

Static Private Member Functions

static Linknext (Link *p)
 
static Linkprevious (Link *p)
 

Private Attributes

unsigned n
 

Friends

class iterator
 

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

list of Link* items, uses data from Link

Definition at line 630 of file simlib.h.

Constructor & Destructor Documentation

◆ List() [1/2]

simlib3::List::List ( )

Definition at line 33 of file list.cc.

References Dprintf.

◆ List() [2/2]

simlib3::List::List ( const char *  _name)
explicit

Definition at line 38 of file list.cc.

References Dprintf, and simlib3::SimObject::SetName().

◆ ~List()

simlib3::List::~List ( )

Definition at line 47 of file list.cc.

References clear(), Dprintf, simlib3::Link::head, and simlib3::SimObject::Name().

Member Function Documentation

◆ back()

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

Definition at line 675 of file simlib.h.

References simlib3::Link::pred.

Referenced by simlib3::Queue::back().

◆ begin()

iterator simlib3::List::begin ( )
inline

Definition at line 672 of file simlib.h.

References simlib3::Link::succ.

Referenced by simlib3::Queue::begin(), and GetFirst().

◆ clear()

void simlib3::List::clear ( )

Definition at line 159 of file list.cc.

References empty(), GetFirst(), and simlib3::SimObject::isAllocated().

Referenced by simlib3::Queue::clear(), and ~List().

◆ empty()

bool simlib3::List::empty ( )
inline

Definition at line 676 of file simlib.h.

References simlib3::Link::succ.

Referenced by clear(), Get(), simlib3::Store::Leave(), and simlib3::Facility::Release().

◆ end()

iterator simlib3::List::end ( )
inline

Definition at line 673 of file simlib.h.

Referenced by simlib3::Queue::end(), Get(), GetLast(), and PostIns().

◆ front()

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

Definition at line 674 of file simlib.h.

References simlib3::Link::succ.

Referenced by simlib3::Queue::front().

◆ Get()

Link * simlib3::List::Get ( iterator  pos)
virtual

◆ GetFirst()

Link * simlib3::List::GetFirst ( )

remove first

Definition at line 124 of file list.cc.

References begin(), and Get().

Referenced by clear().

◆ GetLast()

Link * simlib3::List::GetLast ( )

remove last

Definition at line 132 of file list.cc.

References end(), and Get().

◆ InsFirst()

void simlib3::List::InsFirst ( Link e)

◆ InsLast()

void simlib3::List::InsLast ( Link e)

◆ next()

static Link* simlib3::List::next ( Link p)
inlinestaticprivate

Definition at line 631 of file simlib.h.

References simlib3::Link::succ.

Referenced by simlib3::List::iterator::operator++().

◆ Output()

void simlib3::List::Output ( ) const
overridevirtual

print object to default output

Reimplemented from simlib3::SimObject.

Reimplemented in simlib3::Queue.

Definition at line 44 of file output1.cc.

References simlib3::Event::Name(), and simlib3::Print().

◆ PostIns()

void simlib3::List::PostIns ( Link e,
iterator  pos 
)

◆ PredIns()

void simlib3::List::PredIns ( Link e,
iterator  pos 
)

◆ previous()

static Link* simlib3::List::previous ( Link p)
inlinestaticprivate

Definition at line 632 of file simlib.h.

References simlib3::Link::pred.

Referenced by simlib3::List::iterator::operator--().

◆ size()

unsigned simlib3::List::size ( ) const
inline

Friends And Related Function Documentation

◆ iterator

friend class iterator
friend

Definition at line 654 of file simlib.h.

Member Data Documentation

◆ n

unsigned simlib3::List::n
private

Definition at line 633 of file simlib.h.

Referenced by Get(), InsFirst(), InsLast(), PostIns(), and PredIns().


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