67 MessageId(MessageSourceInfo source_info,
void* amessage)
68 : m_source_info(source_info)
71 m_message.v = amessage;
74 MessageId(MessageSourceInfo source_info,
const void* amessage)
75 : m_source_info(source_info)
78 m_message.cv = amessage;
81 MessageId(MessageSourceInfo source_info,
int amessage)
82 : m_source_info(source_info)
85 m_message.i = amessage;
88 MessageId(MessageSourceInfo source_info,
long amessage)
89 : m_source_info(source_info)
92 m_message.l = amessage;
95 MessageId(MessageSourceInfo source_info,std::size_t amessage)
96 : m_source_info(source_info)
99 m_message.st = amessage;
102 MessageId(
const MessageId& rhs)
103 : m_source_info(rhs.m_source_info), m_type(rhs.m_type)
105 m_message.cv = rhs.m_message.cv;
108 const MessageId& operator=(
const MessageId& rhs)
110 m_source_info = rhs.m_source_info;
112 m_message.cv = rhs.m_message.cv;
119 explicit operator const T*()
const {
return (
const T*)m_message.cv; }
121 explicit operator T*()
const {
return (T*)m_message.v; }
122 explicit operator int()
const {
return m_message.i; }
123 explicit operator long()
const {
return m_message.l; }
124 explicit operator size_t()
const {
return m_message.st; }
134 return m_message.i!=null_message.i;
136 return m_message.l!=null_message.l;
138 return m_message.st!=null_message.st;
139 return m_message.cv!=null_message.cv;
141 void* messageAsVoidPtr()
const {
return m_message.v; }
143 static void setNullMessage(MessageId r) { null_message = r.m_message; }
147 m_message = null_message;
150 void print(std::ostream& o)
const;
163 static _Message null_message;