MIRA
Public Member Functions | List of all members
ServiceProperty Class Reference

Use this class instead of a string property whenever your module has a service as property. More...

#include <fw/ServiceProperty.h>

Public Member Functions

 ServiceProperty ()
 
 ServiceProperty (const ServiceProperty &other)
 
 ServiceProperty (const std::string &interface)
 Constructor where the interface is specified that the service must implement. More...
 
template<typename Reflector >
void reflect (Reflector &r)
 
void reflect (XMLDeserializer &r)
 
bool operator== (const ServiceProperty &other) const
 
bool operator!= (const ServiceProperty &other) const
 
ServicePropertyoperator= (const ServiceProperty &other)
 
ServicePropertyoperator= (const std::string &s)
 
const std::string & getService () const
 Return the service that is associated with this property. More...
 
void setInterface (const std::string &interface)
 Sets the interface a service must implement. More...
 
const std::string & getInterface () const
 Return the interface a service must implement. More...
 
 operator std::string () const
 
bool isEmpty () const
 
bool empty () const
 
bool isValid () const
 

Detailed Description

Use this class instead of a string property whenever your module has a service as property.

When the user clicks on that property a dialog will open where he can select a service that implements the given interface out of all existing ones.

class MyClass {
template <typename Reflector>
void reflect(Reflector& r) {
r.property("Service", myService, "The service name",
ServiceProperty("ITheInterface"));
}
MyClass() : myService("ITheInterface") {}
ServiceProperty myService;

Constructor & Destructor Documentation

◆ ServiceProperty() [1/3]

ServiceProperty ( )
inline

◆ ServiceProperty() [2/3]

ServiceProperty ( const ServiceProperty other)
inline

◆ ServiceProperty() [3/3]

ServiceProperty ( const std::string &  interface)
inlineexplicit

Constructor where the interface is specified that the service must implement.

Member Function Documentation

◆ reflect() [1/2]

void reflect ( Reflector &  r)
inline

◆ reflect() [2/2]

void reflect ( XMLDeserializer r)
inline

◆ operator==()

bool operator== ( const ServiceProperty other) const
inline

◆ operator!=()

bool operator!= ( const ServiceProperty other) const
inline

◆ operator=() [1/2]

ServiceProperty& operator= ( const ServiceProperty other)
inline

◆ operator=() [2/2]

ServiceProperty& operator= ( const std::string &  s)
inline

◆ getService()

const std::string& getService ( ) const
inline

Return the service that is associated with this property.

◆ setInterface()

void setInterface ( const std::string &  interface)
inline

Sets the interface a service must implement.

◆ getInterface()

const std::string& getInterface ( ) const
inline

Return the interface a service must implement.

◆ operator std::string()

operator std::string ( ) const
inline

◆ isEmpty()

bool isEmpty ( ) const
inline

◆ empty()

bool empty ( ) const
inline

◆ isValid()

bool isValid ( ) const
inline

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