#include <module.h>

Public Types | |
| typedef void(UserModule::* | Method )() |
Public Member Functions | |
| Process (const Name &name, UserModule *module, Method method) | |
| void | restart (Method method) |
| SAMPA_PERSISTENT (Process) | |
| ProcessBase & | set_next_trigger (EventListenerSingle &event) |
| ProcessBase & | dont_initialize () |
| const char * | get_name () const |
| const char * | get_full_name () const |
| name can be ([^. ]+.)*[^. ]+ | |
| Object * | get_parent () const |
| return object containing this one | |
| Object * | get_sibling () const |
| return next object with same parent or NULL if none | |
| Object * | get_first_child () const |
| return first child object or NULL if none | |
| int | is_debug () const |
Protected Types | |
| enum | Severity { S_INFO, S_WARNING, S_ERROR, S_FATAL } |
Protected Member Functions | |
| void | debug (const char *,...) |
| void | error (Severity severity, const char *,...) |
| virtual void | complete_restart () |
Protected Attributes | |
| EventListenerSingle * | m_trigger |
Private Member Functions | |
| EventListenerSingle * | execute () |
| Process (const Process &) | |
| Process & | operator= (const Process &) |
Private Attributes | |
| UserModule * | m_module |
| Method | m_method |
Definition at line 54 of file module.h.
| typedef void(UserModule::* Sampa::Process< UserModule >::Method)() |
enum Sampa::Object::Severity [protected, inherited] |
| Sampa::Process< UserModule >::Process | ( | const Name & | name, | |
| UserModule * | module, | |||
| Method | method | |||
| ) | [inline] |
Definition at line 25 of file module.cxx.
| Sampa::Process< UserModule >::Process | ( | const Process< UserModule > & | ) | [private] |
| void Sampa::Process< UserModule >::restart | ( | Method | method | ) | [inline] |
| EventListenerSingle * Sampa::Process< UserModule >::execute | ( | ) | [inline, private, virtual] |
Implements Sampa::ProcessBase.
Definition at line 31 of file module.cxx.
References Sampa::Process< UserModule >::m_method, Sampa::Process< UserModule >::m_module, and Sampa::ProcessBase::m_trigger.
| Process& Sampa::Process< UserModule >::operator= | ( | const Process< UserModule > & | ) | [private] |
| Sampa::Process< UserModule >::SAMPA_PERSISTENT | ( | Process< UserModule > | ) |
| ProcessBase & Sampa::ProcessBase::set_next_trigger | ( | EventListenerSingle & | event | ) | [inline, inherited] |
| ProcessBase& Sampa::ProcessBase::dont_initialize | ( | ) | [inherited] |
| const char* Sampa::Object::get_name | ( | ) | const [inherited] |
returns the local name
| const char* Sampa::Object::get_full_name | ( | ) | const [inherited] |
name can be ([^. ]+.)*[^. ]+
| Object* Sampa::Object::get_parent | ( | ) | const [inherited] |
return object containing this one
| Object* Sampa::Object::get_sibling | ( | ) | const [inherited] |
return next object with same parent or NULL if none
| Object* Sampa::Object::get_first_child | ( | ) | const [inherited] |
return first child object or NULL if none
| void Sampa::Object::debug | ( | const char * | , | |
| ... | ||||
| ) | [protected, inherited] |
| void Sampa::Object::error | ( | Severity | severity, | |
| const char * | , | |||
| ... | ||||
| ) | [protected, inherited] |
| virtual void Sampa::Object::complete_restart | ( | ) | [protected, virtual, inherited] |
is called to finalize restart. On restart, one shall update pointers, or reopen ressources (files, ...).
Most of pointers are restored by the thanks to the post++ library provided that the CLASSINFO() was correctly set.
However, some pointers are not relocated by the library. These are for example the method pointers used for the processes. Take a look at
Reimplemented in Sampa::Bridge, Sampa::Dma, Sampa::FixLatencySlave, Sampa::PeriodicTrafficGenerator, Sampa::TwoPortL1Cpu, and Sampa::StochasticCpu.
UserModule* Sampa::Process< UserModule >::m_module [private] |
Method Sampa::Process< UserModule >::m_method [private] |
Definition at line 66 of file module.h.
Referenced by Sampa::Process< UserModule >::execute(), and Sampa::Process< UserModule >::restart().
EventListenerSingle* Sampa::ProcessBase::m_trigger [protected, inherited] |
Definition at line 39 of file module.h.
Referenced by Sampa::Process< UserModule >::execute(), and Sampa::ProcessBase::set_next_trigger().
1.5.3