1 #ifndef __JNET__JCONTROLHOSTTAG__
2 #define __JNET__JCONTROLHOSTTAG__
21 namespace JPP {
using namespace JNET; }
64 JTag(
const std::string& tag)
88 return static_cast<const JTag&
>(*this);
99 return static_cast<JTag&
>(*this);
123 if (!tag.empty() && tag.size() <=
TAGSIZE) {
125 char* __p = (
char*) &(this->
id);
129 for ( ; i != tag.size(); ++i) {
175 const char* __p = (
const char*) &(this->
id);
177 while (pos != 0 && __p[pos-1] ==
'\0') {
181 return std::string(__p, pos);
190 inline operator std::string()
const
203 return (
const char*) &(this->
id);
215 const char* __p = (
const char*) &(this->
id);
233 object.setTag(buffer);
249 return out <<
object.toString();
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
JNET::JTag getTag()
Template definition for method returning JNET::JTag value.
Exception for ControlHost.
void setTag(const JTag &tag)
Set tag.
friend std::istream & operator>>(std::istream &in, JTag &object)
Read JTag from input stream.
const char * c_str() const
C-string.
JTag(const std::string &tag)
Constructor.
friend std::ostream & operator<<(std::ostream &out, const JTag &object)
Write JTag to output stream.
const char operator[](int i) const
Get character.
void setTag(const std::string &tag)
Set tag.
JTag(const JTag &tag)
Copy constructor.
JTag(const JTag_t id)
Constructor.
void setTag(const JTag_t id)
Set tag.
std::string toString() const
Convert tag to string.
const JTag & getTag() const
Get tag.
JTag_t getID() const
Get identifier.
JTag()
Default constructor.
Test availability of JNET::JTag value for given class.
static JSmall JTest(const JNET::JTag &)
bool operator!=(const JTag &first, const JTag &second)
Not equal operator for JTag.
static const JTag DISPTAG_Always("_Always")
bool operator==(const JTag &first, const JTag &second)
Equal operator for JTag.
static const JTag DISPTAG_Gime("_Gime")
static const JTag DISPTAG_Version("_Version")
static const JTag DISPTAG_WhereIs("_WhereIs")
static const JTag DISPTAG_Debug("_Debug")
static const JTag DISPTAG_MyId("_MyId")
static const JTag DISPTAG_Subscribe("_Subscri")
Special ControlHost tags.
static const size_t TAGSIZE
Size of ControlHost tag.
static const JTag DISPTAG_Born("Born")
long long int JTag_t
Type definition of numerical ControlHost tag.
bool operator<(const JTag &first, const JTag &second)
Less than operator for JTag.
static const JTag DISPTAG_UNDEFINED(0)
static const JTag DISPTAG_ShowStat("_ShowSta")
static const JTag DISPTAG_Died("Died")
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary class for no type definition.
Auxiliary base class for compile time evaluation of test.
Auxiliary class for a type holder.