SIMLIB/C++ 3.09
Loading...
Searching...
No Matches
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
 
 operator Queue * ()
 
iterator begin ()
 
iterator end ()
 
Entity * front ()
 
Entity * back ()
 
void clear ()
 initialize
 
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 Entity * Get (iterator pos)
 remove at position
 
Entity * GetFirst ()
 
Entity * GetLast ()
 
- Public Member Functions inherited from simlib3::List
 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
 

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

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::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 ( )

initialize

Definition at line 145 of file queue.cc.

References simlib3::Stat::Clear(), simlib3::List::clear(), simlib3::TStat::Clear(), Dprintf, simlib3::SimObject::Name(), StatDT, and StatN.

Referenced by Clear().

◆ Clear()

void simlib3::Queue::Clear ( )
inline

Definition at line 706 of file simlib.h.

References clear().

Referenced by simlib3::Facility::Clear(), simlib3::Store::Clear(), and simlib3::Semaphore::Clear().

◆ Empty()

bool simlib3::Queue::Empty ( )
inline

Definition at line 707 of file simlib.h.

References simlib3::List::empty().

◆ 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::List::size().

◆ operator Queue *()

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

Definition at line 698 of file simlib.h.

◆ Output()

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

◆ 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(), Get(), and Output().

◆ StatN

TStat simlib3::Queue::StatN

Definition at line 691 of file simlib.h.

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


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