SMACC
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
smacc::ISmaccComponent Class Reference

#include <component.h>

Inheritance diagram for smacc::ISmaccComponent:
Inheritance graph
Collaboration diagram for smacc::ISmaccComponent:
Collaboration graph

Public Member Functions

 ISmaccComponent ()
 
virtual ~ISmaccComponent ()
 
virtual std::string getName () const
 

Protected Member Functions

virtual void initialize (ISmaccClient *owner)
 
void setStateMachine (ISmaccStateMachine *stateMachine)
 
template<typename EventType >
void postEvent (const EventType &ev)
 
template<typename EventType >
void postEvent ()
 
template<typename TOrthogonal , typename TSourceObject >
void onOrthogonalAllocation ()
 
template<typename TComponent >
void requiresComponent (TComponent *&requiredComponentStorage)
 
template<typename TClient >
void requiresClient (TClient *&requiredClientStorage)
 
virtual void onInitialize ()
 
template<typename SmaccComponentType , typename TOrthogonal , typename TClient , typename... TArgs>
SmaccComponentType * createSiblingComponent (TArgs... targs)
 
template<typename SmaccComponentType , typename TOrthogonal , typename TClient , typename... TArgs>
SmaccComponentType * createSiblingNamedComponent (std::string name, TArgs... targs)
 

Protected Attributes

ISmaccStateMachinestateMachine_
 
ISmaccClientowner_
 

Friends

class ISmaccOrthogonal
 
class ISmaccClient
 

Detailed Description

Definition at line 14 of file component.h.

Constructor & Destructor Documentation

◆ ISmaccComponent()

smacc::ISmaccComponent::ISmaccComponent ( )

Definition at line 15 of file smacc_component.cpp.

16 : owner_(nullptr)
17{
18}
ISmaccClient * owner_
Definition: component.h:57

◆ ~ISmaccComponent()

smacc::ISmaccComponent::~ISmaccComponent ( )
virtual

Definition at line 11 of file smacc_component.cpp.

12{
13}

Member Function Documentation

◆ createSiblingComponent()

template<typename SmaccComponentType , typename TOrthogonal , typename TClient , typename... TArgs>
SmaccComponentType * smacc::ISmaccComponent::createSiblingComponent ( TArgs...  targs)
protected

Definition at line 33 of file smacc_component_impl.h.

34 {
35 return this->owner_->createComponent<SmaccComponentType, TOrthogonal, TClient>(targs...);
36 }
SmaccComponentType * createComponent(TArgs... targs)

References smacc::ISmaccClient::createComponent(), and owner_.

Here is the call graph for this function:

◆ createSiblingNamedComponent()

template<typename SmaccComponentType , typename TOrthogonal , typename TClient , typename... TArgs>
SmaccComponentType * smacc::ISmaccComponent::createSiblingNamedComponent ( std::string  name,
TArgs...  targs 
)
protected

Definition at line 39 of file smacc_component_impl.h.

40 {
41 return this->owner_->createNamedComponent<SmaccComponentType, TOrthogonal, TClient>(name, targs...);
42 }
SmaccComponentType * createNamedComponent(std::string name, TArgs... targs)

References smacc::ISmaccClient::createNamedComponent(), and owner_.

Here is the call graph for this function:

◆ getName()

std::string smacc::ISmaccComponent::getName ( ) const
virtual

Definition at line 36 of file smacc_component.cpp.

37{
38 std::string keyname = demangleSymbol(typeid(*this).name());
39 return keyname;
40}
std::string demangleSymbol()
Definition: introspection.h:75

References smacc::introspection::demangleSymbol().

Referenced by smacc::components::CpTopicSubscriber< MessageType >::initialize().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ initialize()

void smacc::ISmaccComponent::initialize ( ISmaccClient owner)
protectedvirtual

Definition at line 20 of file smacc_component.cpp.

21{
22 owner_ = owner;
23 this->onInitialize();
24}
virtual void onInitialize()

References onInitialize(), and owner_.

Here is the call graph for this function:

◆ onInitialize()

void smacc::ISmaccComponent::onInitialize ( )
protectedvirtual

Reimplemented in smacc::components::CpRosControlInterface, cl_move_base_z::CostmapSwitch, cl_move_base_z::PlannerSwitcher, and cl_move_base_z::WaypointNavigator.

Definition at line 26 of file smacc_component.cpp.

27{
28
29}

Referenced by initialize().

Here is the caller graph for this function:

◆ onOrthogonalAllocation()

template<typename TOrthogonal , typename TSourceObject >
void smacc::ISmaccComponent::onOrthogonalAllocation ( )
inlineprotected

Definition at line 38 of file component.h.

38{}

◆ postEvent() [1/2]

template<typename EventType >
void smacc::ISmaccComponent::postEvent ( )
protected

Referenced by smacc::components::CpTopicSubscriber< MessageType >::onOrthogonalAllocation().

Here is the caller graph for this function:

◆ postEvent() [2/2]

template<typename EventType >
void smacc::ISmaccComponent::postEvent ( const EventType &  ev)
protected

Definition at line 15 of file smacc_component_impl.h.

16 {
18 }
ISmaccStateMachine * stateMachine_
Definition: component.h:55
void postEvent(EventType *ev, EventLifeTime evlifetime=EventLifeTime::ABSOLUTE)

References smacc::ISmaccStateMachine::postEvent(), and stateMachine_.

Here is the call graph for this function:

◆ requiresClient()

template<typename TClient >
void smacc::ISmaccComponent::requiresClient ( TClient *&  requiredClientStorage)
protected

Definition at line 27 of file smacc_component_impl.h.

28 {
29 this->owner_->requiresClient(requiredClientStorage);
30 }
void requiresClient(SmaccClientType *&storage)

References owner_, and smacc::ISmaccClient::requiresClient().

Here is the call graph for this function:

◆ requiresComponent()

template<typename TComponent >
void smacc::ISmaccComponent::requiresComponent ( TComponent *&  requiredComponentStorage)
protected

Definition at line 21 of file smacc_component_impl.h.

22 {
23 requiredComponentStorage = this->owner_->getComponent<TComponent>();
24 }
TComponent * getComponent()

References smacc::ISmaccClient::getComponent(), and owner_.

Here is the call graph for this function:

◆ setStateMachine()

void smacc::ISmaccComponent::setStateMachine ( ISmaccStateMachine stateMachine)
protected

Definition at line 31 of file smacc_component.cpp.

32{
33 stateMachine_ = stateMachine;
34}

References stateMachine_.

Friends And Related Function Documentation

◆ ISmaccClient

friend class ISmaccClient
friend

Definition at line 60 of file component.h.

◆ ISmaccOrthogonal

friend class ISmaccOrthogonal
friend

Definition at line 59 of file component.h.

Member Data Documentation

◆ owner_

ISmaccClient* smacc::ISmaccComponent::owner_
protected

◆ stateMachine_

ISmaccStateMachine* smacc::ISmaccComponent::stateMachine_
protected

Definition at line 55 of file component.h.

Referenced by postEvent(), and setStateMachine().


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