クラス Onikiri::PriorityEventList

#include <PriorityEventList.h>

Onikiri::PriorityEventListのコラボレーション図

Collaboration graph
[凡例]
すべてのメンバ一覧

Public 型

typedef fixed_sized_buffer<
Entry, MAX_EVENT_IN_ONE_CYCLE,
MaxEvent
EventList
 MAX_EVENT_IN_ONE_CYCLE = 4096
 MAX_PRIORITY = RP_HIGHEST + 1
enum  MaxEvent { MAX_EVENT_IN_ONE_CYCLE = 4096 }
enum  MaxPriority { MAX_PRIORITY = RP_HIGHEST + 1 }
typedef fixed_sized_buffer<
EventList *, MAX_PRIORITY,
MaxPriority
PriorityList
typedef EventBaseImplementPtrType
typedef std::vector< TimeWheelBase * > TimeWheelList

Public メソッド

void BeginEvaluate ()
void BeginUpdate ()
void EndEvaluate ()
void EndUpdate ()
void ExtractEvent (TimeWheelList *timeWheels)
 PriorityEventList ()
void TriggerEvaluate (int priority)
void TriggerUpdate (int priority)
 ~PriorityEventList ()

構成

struct  Entry

説明

PriorityEventList.h43 行で定義されています。


型定義

typedef fixed_sized_buffer< Entry, MAX_EVENT_IN_ONE_CYCLE, MaxEvent > Onikiri::PriorityEventList::EventList

PriorityEventList.h87 行で定義されています。

typedef fixed_sized_buffer< EventList*, MAX_PRIORITY, MaxPriority > Onikiri::PriorityEventList::PriorityList

PriorityEventList.h90 行で定義されています。

typedef EventBaseImplement* Onikiri::PriorityEventList::PtrType

PriorityEventList.h65 行で定義されています。

typedef std::vector< TimeWheelBase* > Onikiri::PriorityEventList::TimeWheelList

PriorityEventList.h92 行で定義されています。


列挙型

enum Onikiri::PriorityEventList::MaxEvent

列挙型の値:
MAX_EVENT_IN_ONE_CYCLE 

PriorityEventList.h86 行で定義されています。

00086 { MAX_EVENT_IN_ONE_CYCLE = 4096 };

enum Onikiri::PriorityEventList::MaxPriority

列挙型の値:
MAX_PRIORITY 

PriorityEventList.h89 行で定義されています。

00089 { MAX_PRIORITY = RP_HIGHEST + 1 };


コンストラクタとデストラクタ

Onikiri::PriorityEventList::PriorityEventList (  )  [inline]

PriorityEventList.h46 行で定義されています。

参照先 Onikiri::fixed_sized_buffer< T, SIZE, Tag >::push_back()Onikiri::RP_HIGHESTOnikiri::RP_LOWEST.

00046                             :
00047             m_updatePriority( RP_LOWEST ),
00048             m_evaluatePriority( RP_LOWEST )
00049         {
00050             //m_eventList.resize( CRP_HIGHEST + 1 );
00051             for( int i = RP_LOWEST; i < RP_HIGHEST + 1; i++ ){
00052                 m_eventList.push_back( new EventList );
00053             }
00054         }

関数の呼び出しグラフ:

Onikiri::PriorityEventList::~PriorityEventList (  )  [inline]

PriorityEventList.h56 行で定義されています。

参照先 Onikiri::fixed_sized_buffer< T, SIZE, Tag >::begin()Onikiri::fixed_sized_buffer< T, SIZE, Tag >::clear()Onikiri::fixed_sized_buffer< T, SIZE, Tag >::end().

00057         {
00058             for( PriorityList::iterator i = m_eventList.begin(); i != m_eventList.end(); ++i ){
00059                 delete *i;
00060             }
00061             m_eventList.clear();
00062         }

関数の呼び出しグラフ:


関数

void Onikiri::PriorityEventList::BeginEvaluate (  )  [inline]

PriorityEventList.h119 行で定義されています。

参照先 Onikiri::RP_HIGHEST.

参照元 Onikiri::SimulationSystem::CycleEvaluate().

00120         {
00121             m_evaluatePriority = RP_HIGHEST;
00122         }

Here is the caller graph for this function:

void Onikiri::PriorityEventList::BeginUpdate (  )  [inline]

PriorityEventList.h143 行で定義されています。

参照先 Onikiri::RP_HIGHEST.

参照元 Onikiri::SimulationSystem::CycleUpdate().

00144         {
00145             m_updatePriority = RP_HIGHEST;
00146         }

Here is the caller graph for this function:

void Onikiri::PriorityEventList::EndEvaluate (  )  [inline]

PriorityEventList.h137 行で定義されています。

参照先 Onikiri::RP_LOWESTTriggerEvaluate().

参照元 Onikiri::SimulationSystem::CycleEvaluate().

00138         {
00139             TriggerEvaluate( RP_LOWEST );
00140         }

関数の呼び出しグラフ:

Here is the caller graph for this function:

void Onikiri::PriorityEventList::EndUpdate (  )  [inline]

PriorityEventList.h163 行で定義されています。

参照先 Onikiri::RP_LOWESTTriggerUpdate().

参照元 Onikiri::SimulationSystem::CycleUpdate().

00164         {
00165             TriggerUpdate( RP_LOWEST );
00166         }

関数の呼び出しグラフ:

Here is the caller graph for this function:

void Onikiri::PriorityEventList::ExtractEvent ( TimeWheelList timeWheels  )  [inline]

PriorityEventList.h96 行で定義されています。

参照先 Onikiri::EventList::begin()Onikiri::fixed_sized_buffer< T, SIZE, Tag >::begin()Onikiri::EventList::end()Onikiri::fixed_sized_buffer< T, SIZE, Tag >::end()Onikiri::fixed_sized_buffer< T, SIZE, Tag >::push_back().

参照元 Onikiri::SimulationSystem::CycleEvaluate().

00097         {
00098             for( PriorityList::iterator i = m_eventList.begin(); i != m_eventList.end(); ++i ){
00099                 (*i)->clear();
00100             }
00101 
00102             // Extract events triggered in this cycle.
00103             TimeWheelList::iterator timeEnd = timeWheels->end();
00104             for( TimeWheelList::iterator i = timeWheels->begin(); i != timeEnd; ++i ){
00105                 TimeWheelBase* wheel = *i;
00106                 const TimeWheelBase::ListType& events = wheel->CurrentEvents();
00107                 TimeWheelBase::ListType::ConstIteratorType end = events.end();
00108                 for( TimeWheelBase::ListType::ConstIteratorType e = events.begin(); e != end; ++e ){
00109                     PtrType event = &(*e->event);
00110                     if( !event->IsCanceled() ){
00111                         EventList* list = m_eventList[ event->GetPriority() ];
00112                         list->push_back( Entry( event, wheel ) );
00113                     }
00114                 }
00115             }
00116 
00117         }

関数の呼び出しグラフ:

Here is the caller graph for this function:

void Onikiri::PriorityEventList::TriggerEvaluate ( int  priority  )  [inline]

PriorityEventList.h124 行で定義されています。

参照元 Onikiri::SimulationSystem::CycleEvaluate()EndEvaluate().

00125         {
00126             int curPriority;
00127             for( curPriority = m_evaluatePriority; curPriority >= priority; curPriority-- ){
00128                 EventList* eventList = m_eventList[curPriority];
00129                 EventList::iterator eventEnd = eventList->end();
00130                 for( EventList::iterator i = eventList->begin(); i != eventEnd; ++i ){
00131                     i->event->TriggerEvaluate();
00132                 }
00133             }
00134             m_evaluatePriority = curPriority; 
00135         }

Here is the caller graph for this function:

void Onikiri::PriorityEventList::TriggerUpdate ( int  priority  )  [inline]

PriorityEventList.h148 行で定義されています。

参照元 Onikiri::SimulationSystem::CycleUpdate()EndUpdate().

00149         {
00150             int curPriority;
00151             for( curPriority = m_updatePriority; curPriority >= priority; curPriority-- ){
00152                 EventList* eventList = m_eventList[curPriority];
00153                 EventList::iterator eventEnd = eventList->end();
00154                 for( EventList::iterator i = eventList->begin(); i != eventEnd; ++i ){
00155                     if( !i->timeWheel->IsStalledThisCycle() ){
00156                         i->event->TriggerUpdate();
00157                     }
00158                 }
00159             }
00160             m_updatePriority = curPriority; 
00161         }

Here is the caller graph for this function:


このクラスの説明は次のファイルから生成されました:
Onikiri2に対してTue Jun 18 15:16:00 2013に生成されました。  doxygen 1.4.7