12 #ifndef uloneHandleImplementation_H_
13 #define uloneHandleImplementation_H_
16 #include <RTI/VariableLengthData.h>
40 rti1516::VariableLengthData encode()
const;
42 unsigned long encode(
void* buffer,
unsigned long bufferSize)
const;
43 unsigned long encodedLength()
const;
47 rti1516::VariableLengthData
const & encodedHandle);
50 void decode(
void* buffer,
unsigned long bufferSize);
56 void setValue(
long val);
67 unsigned long handleValue) : myValue(handleValue)
103 return rti1516::VariableLengthData(&netValue,
sizeof(netValue));
106 unsigned long bufferSize)
const
109 if (bufferSize <
sizeof(netValue))
111 memcpy(buffer, &netValue,
sizeof(netValue));
112 return sizeof(netValue);
116 return sizeof(DtNetU32);
121 std::wstringstream ss;
135 rti1516::VariableLengthData
const & encodedHandle)
137 myValue = *((DtNetU32*)encodedHandle.data());
141 unsigned long bufferSize)
143 myValue = *((DtNetU32*)buffer);
Definition: ulongHandleImpl.h:21
std::wstring toString() const
Return a string representation of handle.
Definition: ulongHandleImpl.h:119
ULongHandleImplementation & operator=(ULongHandleImplementation const &rhs)
Assignment.
Definition: ulongHandleImpl.h:75
std::string toString(const std::wstring &inString)
Definition: objParams13.h:16
bool operator<(ULongHandleImplementation const &rhs) const
Definition: ulongHandleImpl.h:94
bool operator==(ULongHandleImplementation const &rhs) const
Relational operators.
Definition: ulongHandleImpl.h:84
rti1516::VariableLengthData encode() const
Generate an encoded value that can be used to send handles to other federates in updates or interacti...
Definition: ulongHandleImpl.h:100
ULongHandleImplementation()
Constructors.
Definition: ulongHandleImpl.h:63
void decode(rti1516::VariableLengthData const &encodedHandle)
Decode VariableLengthData into self.
Definition: ulongHandleImpl.h:134
#define DT_DLL_LRC
Definition: rtiMsConfig.h:155
long value() const
Definition: ulongHandleImpl.h:130
unsigned long myValue
Definition: ulongHandleImpl.h:60
The declaration of internal types.
bool operator!=(ULongHandleImplementation const &rhs) const
Definition: ulongHandleImpl.h:89
void setValue(long val)
Set/Get implementation.
Definition: ulongHandleImpl.h:126
unsigned long encodedLength() const
Definition: ulongHandleImpl.h:114