47 #ifndef _MIRA_SERVICEPROPERTY_H_ 48 #define _MIRA_SERVICEPROPERTY_H_ 86 mService(other.mService), mInterface(other.mInterface) {}
90 mInterface(interface) {}
92 template <
typename Reflector>
94 r.member(
"Service", mService,
"The concrete service that is used",
"");
95 r.member(
"Interface", mInterface,
"The interface that is required");
99 r.
member(
"Service", mService,
"The concrete service that is used",
"");
101 std::string interface;
102 r.
member(
"Interface", interface,
"The interface that is required",
105 if (interface.empty()) {
106 if (mService.empty()) {
110 if (!mService.empty()) {
111 MIRA_LOG(
WARNING) <<
"Expected Service and (optional) Interface nodes for " 112 "ServiceProperty '" << *r.
getNode() <<
"', " 113 "found string '" << mService <<
114 "' (assuming this for service name). " 115 "Please update your config xml (" <<
120 mInterface = interface;
124 if (mInterface.empty())
126 "ServiceProperty: Node 'Interface' is missing or empty");
130 return mInterface == other.mInterface && mService == other.mService;
138 mService = other.mService;
139 mInterface = other.mInterface;
155 mInterface = interface;
163 operator std::string()
const {
return mService; }
166 return mService.empty();
170 return mService.empty();
177 return MIRA_FW.getRPCManager().existsService(mService);
182 std::string mService;
183 std::string mInterface;
bool empty() const
Definition: ServiceProperty.h:169
This object can use object tracking internally, but the object tracking system's state remains unchan...
Definition: ReflectControlFlags.h:82
void reflect(XMLDeserializer &r)
Definition: ServiceProperty.h:98
ServiceProperty & operator=(const std::string &s)
Definition: ServiceProperty.h:143
std::string uri() const
Return the uri of the node.
Use this class instead of a string property whenever your module has a service as property...
Definition: ServiceProperty.h:79
specialize cv::DataType for our ImgPixel and inherit from cv::DataType<Vec>
Definition: IOService.h:67
void member(const char *name, T &member, const char *comment, ReflectCtrlFlags flags=REFLECT_CTRLFLAG_NONE)
Definition: RecursiveMemberReflector.h:862
#define MIRA_LOG(level)
Use this macro to log data.
Definition: LoggingCore.h:529
#define MIRA_FW
Macro for accessing the framework instance.
Definition: Framework.h:74
Framework export macro declaration.
#define MIRA_THROW(ex, msg)
Macro for throwing an exception.
Definition: Exception.h:82
Marker for indicating parameters that should be ignored if they are missing in the config file...
bool isEmpty() const
Definition: ServiceProperty.h:165
void setInterface(const std::string &interface)
Sets the interface a service must implement.
Definition: ServiceProperty.h:154
Marker for indicating parameters that should be ignored if they are missing in the config file...
Definition: IgnoreMissing.h:73
Contains the base interface of all Reflectors, Serializers, etc.
bool operator==(const ServiceProperty &other) const
Definition: ServiceProperty.h:129
uint32 line() const
Gets the underlying line number of the loaded document for this node.
ServiceProperty(const std::string &interface)
Constructor where the interface is specified that the service must implement.
Definition: ServiceProperty.h:89
const std::string & getInterface() const
Return the interface a service must implement.
Definition: ServiceProperty.h:159
Definition: LoggingCore.h:76
void atomic(T &member)
Definition: XMLSerializer.h:444
void reflect(Reflector &r)
Definition: ServiceProperty.h:93
XMLSerializer and XMLDeserializer.
bool isValid() const
Definition: ServiceProperty.h:173
ServiceProperty & operator=(const ServiceProperty &other)
Definition: ServiceProperty.h:137
bool operator!=(const ServiceProperty &other) const
Definition: ServiceProperty.h:133
The framework that holds all manager classes and provides startup and shutdown of all framework relat...
ServiceProperty()
Definition: ServiceProperty.h:83
const std::string & getService() const
Return the service that is associated with this property.
Definition: ServiceProperty.h:149
XMLDom::const_iterator getNode()
Definition: XMLSerializer.h:591
Deserializer for serializing objects from XML format.
Definition: XMLSerializer.h:313
ServiceProperty(const ServiceProperty &other)
Definition: ServiceProperty.h:85