My Project
 All Classes Functions
Public Member Functions | List of all members
EnjoLib::IMessagingSender Class Referenceabstract

Interface for a class that is supposed to expose its data to another modules. More...

#include <IMessagingSender.hpp>

Public Member Functions

virtual const char * GetModuleName () const =0
 Should return unique module's name.
 
void SendBool (const char *varName, bool var) const
 Sends a bool.
 
void SendInt (const char *varName, int var) const
 Sends an int.
 
void SendDouble (const char *varName, double var) const
 Sends a double.
 
void SendVECTOR3 (const char *varName, const VECTOR3 &var) const
 Sends a VECTOR3.
 
void SendMATRIX3 (const char *varName, const MATRIX3 &var) const
 Sends a MATRIX3.
 
void SendMATRIX4 (const char *varName, const MATRIX4 &var) const
 Sends a MATRIX4.
 

Detailed Description

Interface for a class that is supposed to expose its data to another modules.

Make this a base class of one of your module's classes and implement the GetModuleName() method. For example:

#include <EnjoLib/IMessagingSender.hpp>
class MySender : public EnjoLib::IMessagingSender
{
public:
// EnjoLib::IMessagingSender methods:
const char * GetModuleName() const { return "MyMFD"; }
protected:
private:
};

Then create an object of this class on stack and use its public methods to send messages. It's required that you name the variable. For example:

{
double dv = 1000;
MySender().SendDouble("DeltaV", dv);
}

The receiving module may then search for variables with the returned module name and variable name.


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