Privacy
An open-source, flexible 3D physical simulation framework
mars::plugins::connectors::Connectors Class Reference

#include <Connectors.h>

Public Member Functions

 Connectors (lib_manager::LibManager *theManager)
 
 ~Connectors ()
 
int getLibVersion () const
 
const std::string getLibName () const
 
 CREATE_MODULE_INFO ()
 
void init ()
 
void reset ()
 
void update (mars::interfaces::sReal time_ms)
 
void connect (std::string male, std::string female)
 
void disconnect (std::string connector)
 
virtual void receiveData (const data_broker::DataInfo &info, const data_broker::DataPackage &package, int callbackParam)
 The DataBroker will call this method to notify the receiver of whenever the condition for which the receiver registered occur. More...
 
virtual void cfgUpdateProperty (cfg_manager::cfgPropertyStruct _property)
 
void menuAction (int action, bool checked=false)
 Called whenever a menu item is selected. More...
 
void registerEntity (sim::SimEntity *entity)
 
- Public Member Functions inherited from mars::interfaces::MarsPluginTemplateGUI
 MarsPluginTemplateGUI (lib_manager::LibManager *theManager, std::string libName)
 
 ~MarsPluginTemplateGUI ()
 
- Public Member Functions inherited from lib_manager::LibInterface
 LibInterface (LibManager *theManager)
 
virtual ~LibInterface (void)
 
ModuleInfo getModuleInfo () const
 
virtual void newLibLoaded (const std::string &libName)
 
virtual void createModuleInfo (void)
 
- Public Member Functions inherited from mars::interfaces::PluginInterface
 PluginInterface (ControlCenter *control)
 
virtual ~PluginInterface (void)
 
virtual void handleError (void)
 
virtual void getSomeData (void *data)
 
- Public Member Functions inherited from mars::data_broker::ReceiverInterface
 ReceiverInterface ()
 
virtual ~ReceiverInterface ()
 
- Public Member Functions inherited from mars::main_gui::MenuInterface
virtual ~MenuInterface ()
 
- Public Member Functions inherited from mars::cfg_manager::CFGClient
 CFGClient ()
 
virtual ~CFGClient ()
 
virtual void cfgParamCreated (cfgParamId _id)
 
virtual void cfgParamRemoved (cfgParamId _id)
 
- Public Member Functions inherited from mars::interfaces::EntitySubscriberInterface
 EntitySubscriberInterface (void)
 
virtual ~EntitySubscriberInterface (void)
 

Private Member Functions

bool mated (std::string malename, std::string femalename)
 
void checkForPossibleConnections ()
 

Private Attributes

cfg_manager::cfgPropertyStruct cfgautoconnect
 
cfg_manager::cfgPropertyStruct cfgbreakable
 
std::map< std::string, configmaps::ConfigMapmaleconnectors
 
std::map< std::string, configmaps::ConfigMapfemaleconnectors
 
std::map< std::string, configmaps::ConfigMapconnectortypes
 
std::map< std::string, std::string > connections
 

Additional Inherited Members

- Protected Attributes inherited from mars::interfaces::MarsPluginTemplateGUI
std::string configPath
 
std::string resourcesPath
 
main_gui::GuiInterfacegui
 
- Protected Attributes inherited from lib_manager::LibInterface
LibManagerlibManager
 
ModuleInfo moduleInfo
 
- Protected Attributes inherited from mars::interfaces::PluginInterface
ControlCentercontrol
 

Detailed Description

Definition at line 52 of file Connectors.h.

Constructor & Destructor Documentation

◆ Connectors()

mars::plugins::connectors::Connectors::Connectors ( lib_manager::LibManager theManager)

Definition at line 47 of file Connectors.cpp.

◆ ~Connectors()

mars::plugins::connectors::Connectors::~Connectors ( )

Definition at line 155 of file Connectors.cpp.

Member Function Documentation

◆ cfgUpdateProperty()

void mars::plugins::connectors::Connectors::cfgUpdateProperty ( cfg_manager::cfgPropertyStruct  _property)
virtual

Reimplemented from mars::cfg_manager::CFGClient.

Definition at line 215 of file Connectors.cpp.

◆ checkForPossibleConnections()

void mars::plugins::connectors::Connectors::checkForPossibleConnections ( )
private

Definition at line 174 of file Connectors.cpp.

◆ connect()

void mars::plugins::connectors::Connectors::connect ( std::string  male,
std::string  female 
)

Definition at line 71 of file Connectors.cpp.

◆ CREATE_MODULE_INFO()

mars::plugins::connectors::Connectors::CREATE_MODULE_INFO ( )

◆ disconnect()

void mars::plugins::connectors::Connectors::disconnect ( std::string  connector)

Definition at line 89 of file Connectors.cpp.

◆ getLibName()

const std::string mars::plugins::connectors::Connectors::getLibName ( ) const
inlinevirtual

Implements lib_manager::LibInterface.

Definition at line 65 of file Connectors.h.

◆ getLibVersion()

int mars::plugins::connectors::Connectors::getLibVersion ( ) const
inlinevirtual

Implements lib_manager::LibInterface.

Definition at line 63 of file Connectors.h.

◆ init()

void mars::plugins::connectors::Connectors::init ( void  )
virtual

Implements mars::interfaces::PluginInterface.

Definition at line 51 of file Connectors.cpp.

◆ mated()

bool mars::plugins::connectors::Connectors::mated ( std::string  malename,
std::string  femalename 
)
private

Definition at line 158 of file Connectors.cpp.

◆ menuAction()

void mars::plugins::connectors::Connectors::menuAction ( int  action,
bool  checked = false 
)
virtual

Called whenever a menu item is selected.

Parameters
actionThe action that is passed to the GuiInterface via addGenericMenuAction function.
checkedIndicates if the menu/menu item is checked or not.

Implements mars::main_gui::MenuInterface.

Definition at line 223 of file Connectors.cpp.

◆ receiveData()

void mars::plugins::connectors::Connectors::receiveData ( const data_broker::DataInfo info,
const data_broker::DataPackage dataPackage,
int  callbackParam 
)
virtual

The DataBroker will call this method to notify the receiver of whenever the condition for which the receiver registered occur.

Parameters
infoInformation about the DataPackage.
dataPackageThe DataPackage containing all the data.
callbackParamThe int the receiver passed during registration. The default (the receiver didn't provide a callbackParam) is 0. This can be used to easily distinguish different registrations.

Implements mars::data_broker::ReceiverInterface.

Definition at line 209 of file Connectors.cpp.

◆ registerEntity()

void mars::plugins::connectors::Connectors::registerEntity ( sim::SimEntity entity)
virtual

Implements mars::interfaces::EntitySubscriberInterface.

Definition at line 125 of file Connectors.cpp.

◆ reset()

void mars::plugins::connectors::Connectors::reset ( void  )
virtual

Implements mars::interfaces::PluginInterface.

Definition at line 152 of file Connectors.cpp.

◆ update()

void mars::plugins::connectors::Connectors::update ( mars::interfaces::sReal  time_ms)
virtual

Implements mars::interfaces::PluginInterface.

Definition at line 193 of file Connectors.cpp.

Member Data Documentation

◆ cfgautoconnect

cfg_manager::cfgPropertyStruct mars::plugins::connectors::Connectors::cfgautoconnect
private

Definition at line 90 of file Connectors.h.

◆ cfgbreakable

cfg_manager::cfgPropertyStruct mars::plugins::connectors::Connectors::cfgbreakable
private

Definition at line 90 of file Connectors.h.

◆ connections

std::map<std::string, std::string> mars::plugins::connectors::Connectors::connections
private

Definition at line 94 of file Connectors.h.

◆ connectortypes

std::map<std::string, configmaps::ConfigMap> mars::plugins::connectors::Connectors::connectortypes
private

Definition at line 93 of file Connectors.h.

◆ femaleconnectors

std::map<std::string, configmaps::ConfigMap> mars::plugins::connectors::Connectors::femaleconnectors
private

Definition at line 92 of file Connectors.h.

◆ maleconnectors

std::map<std::string, configmaps::ConfigMap> mars::plugins::connectors::Connectors::maleconnectors
private

Definition at line 91 of file Connectors.h.


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