SIMLIB/C++  3.07
Public Types | Public Member Functions | Public Attributes | Friends | List of all members
simlib3::Queue Class Reference

priority queue More...

#include <simlib.h>

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

Public Types

typedef List::iterator iterator
 
- 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 }
 

Public Member Functions

 Queue ()
 
 Queue (const char *_name)
 
 ~Queue ()
 
virtual void Output () const override
 print statistics More...
 
 operator Queue * ()
 
iterator begin ()
 
iterator end ()
 
Entityfront ()
 
Entityback ()
 
void clear ()
 initialize More...
 
void Clear ()
 
bool Empty ()
 
unsigned Length ()
 
virtual void Insert (Entity *e)
 
void InsFirst (Entity *e)
 
void InsLast (Entity *e)
 
void PredIns (Entity *e, iterator pos)
 
void PostIns (Entity *e, iterator pos)
 
virtual EntityGet (iterator pos)
 remove at position More...
 
EntityGetFirst ()
 
EntityGetLast ()
 
- Public Member Functions inherited from simlib3::List
 List ()
 
 List (const char *_name)
 
 ~List ()
 
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...
 
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...
 

Public Attributes

TStat StatN
 
Stat StatDT
 

Friends

class Facility
 
class Store
 

Additional Inherited Members

- Protected Attributes inherited from simlib3::SimObject
unsigned _flags
 bool flags for internal use (TODO bitfield?) More...
 

Detailed Description

priority queue

Definition at line 685 of file simlib.h.

Member Typedef Documentation

◆ iterator

Definition at line 690 of file simlib.h.

Constructor & Destructor Documentation

◆ Queue() [1/2]

simlib3::Queue::Queue ( )

Definition at line 29 of file queue.cc.

References Dprintf.

◆ Queue() [2/2]

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

Definition at line 34 of file queue.cc.

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

◆ ~Queue()

simlib3::Queue::~Queue ( )

Definition at line 43 of file queue.cc.

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

Member Function Documentation

◆ back()

Entity* simlib3::Queue::back ( )
inline

Definition at line 702 of file simlib.h.

References simlib3::List::back().

◆ begin()

iterator simlib3::Queue::begin ( )
inline

◆ clear()

void simlib3::Queue::clear ( )

◆ Clear()

void simlib3::Queue::Clear ( )
inline

◆ Empty()

bool simlib3::Queue::Empty ( )
inline

Definition at line 707 of file simlib.h.

◆ end()

iterator simlib3::Queue::end ( )
inline

◆ front()

Entity* simlib3::Queue::front ( )
inline

Definition at line 701 of file simlib.h.

References simlib3::List::front().

Referenced by simlib3::Facility::Release(), and simlib3::Semaphore::V().

◆ Get()

Entity * simlib3::Queue::Get ( iterator  pos)
virtual

◆ GetFirst()

Entity * simlib3::Queue::GetFirst ( )

Definition at line 113 of file queue.cc.

References begin(), Dprintf, Get(), and simlib3::SimObject::Name().

Referenced by simlib3::Facility::Release().

◆ GetLast()

Entity * simlib3::Queue::GetLast ( )

Definition at line 123 of file queue.cc.

References Dprintf, end(), Get(), and simlib3::SimObject::Name().

◆ Insert()

void simlib3::Queue::Insert ( Entity e)
virtual

◆ InsFirst()

void simlib3::Queue::InsFirst ( Entity e)

Definition at line 73 of file queue.cc.

References begin(), Dprintf, simlib3::SimObject::Name(), and PredIns().

◆ InsLast()

void simlib3::Queue::InsLast ( Entity e)

Definition at line 82 of file queue.cc.

References Dprintf, end(), simlib3::SimObject::Name(), and PredIns().

◆ Length()

unsigned simlib3::Queue::Length ( )
inline

Definition at line 708 of file simlib.h.

References simlib3::SQS::Get(), and simlib3::SQS::GetFirst().

◆ operator Queue *()

simlib3::Queue::operator Queue * ( )
inline

Definition at line 698 of file simlib.h.

◆ Output()

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

print statistics

Reimplemented from simlib3::List.

Definition at line 116 of file output2.cc.

References simlib3::SimObject::Name(), simlib3::Print(), and simlib3::Time.

Referenced by simlib3::Facility::Output().

◆ PostIns()

void simlib3::Queue::PostIns ( Entity e,
iterator  pos 
)

Definition at line 91 of file queue.cc.

References Dprintf, end(), simlib3::SimObject::Name(), PredIns(), and SIMLIB_internal_error.

◆ PredIns()

void simlib3::Queue::PredIns ( Entity e,
iterator  pos 
)

Friends And Related Function Documentation

◆ Facility

friend class Facility
friend

Definition at line 687 of file simlib.h.

◆ Store

friend class Store
friend

Definition at line 688 of file simlib.h.

Member Data Documentation

◆ StatDT

Stat simlib3::Queue::StatDT

Definition at line 692 of file simlib.h.

Referenced by clear(), and Get().

◆ StatN

TStat simlib3::Queue::StatN

Definition at line 691 of file simlib.h.

Referenced by clear(), Get(), simlib3::Facility::Output(), and PredIns().


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