SIMLIB/C++ 3.09
Loading...
Searching...
No Matches
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
 
void InsFirst (Link *e)
 
void InsLast (Link *e)
 
void PredIns (Link *e, iterator pos)
 
void PostIns (Link *e, iterator pos)
 
Link * GetFirst ()
 remove first
 
Link * GetLast ()
 remove last
 
virtual Link * Get (iterator pos)
 remove at position
 
unsigned size () const
 
iterator begin ()
 
iterator end ()
 
Link * front ()
 
Link * back ()
 
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
 
 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
 

Static Private Member Functions

static Link * next (Link *p)
 
static Link * previous (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?)
 

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::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 empty(), and 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(), GetFirst(), and Output().

◆ 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

◆ end()

iterator simlib3::List::end ( )
inline

Definition at line 673 of file simlib.h.

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

◆ front()

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

Definition at line 674 of file simlib.h.

References empty(), and 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 begin(), end(), simlib3::SimObject::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(), PredIns(), and size().


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