25 #ifndef __DOTS_VALUE_CONTAINERS_H__
26 #define __DOTS_VALUE_CONTAINERS_H__
90 virtual bool IsNull()
const {
return m_bIsNull;}
104 if (
typeid(*
this) !=
typeid(that))
147 void SetVal(
const std::wstring & value) {m_Value = value; m_CachedUtf8String.clear(); m_bIsNull =
false;
m_bIsChanged =
true;}
158 virtual bool IsNull()
const {
return m_bIsNull;}
165 m_CachedUtf8String.clear();
173 if (
typeid(*
this) !=
typeid(that))
211 if (m_CachedUtf8String.empty())
216 return static_cast<Int32>(m_CachedUtf8String.length() + 1);
234 if (!m_Value.empty() && m_CachedUtf8String.empty())
238 return m_CachedUtf8String;
249 std::wstring m_Value;
250 mutable std::string m_CachedUtf8String;
290 virtual bool IsNull()
const {
return m_bIsNull;}
304 if (
typeid(*
this) !=
typeid(that))
ValueContainer< Int32 > Int32Container
A container containing 32 bit integer values.
Definition: ValueContainers.h:330
ValueContainer< SquareMeter > SquareMeterContainer
A container containing 64 bit SquareMeter values.
Definition: ValueContainers.h:473
BinaryContainer()
Default constructor.
Definition: ValueContainers.h:269
ValueContainer< CubicMeter > CubicMeterContainer
A container containing 32 bit CubicMeter values.
Definition: ValueContainers.h:368
ValueContainer< Steradian > SteradianContainer
A container containing 64 bit Steradian values.
Definition: ValueContainers.h:476
Container for base types.
Definition: ValueContainers.h:60
void SetVal(const Binary &value)
Set the value of the container.
Definition: ValueContainers.h:286
virtual void Copy(const ContainerBase &that)
Virtual assignment.
Definition: ValueContainers.h:300
Operations on blobs.
Definition: BlobOperations.h:53
ValueContainer< EntityId > EntityIdContainer
A container containing EntityId values.
Definition: ValueContainers.h:348
ValueContainer< Joule > JouleContainer
A container containing 64 bit Joule values.
Definition: ValueContainers.h:437
virtual void SetNull()
Set the container to null.
Definition: ValueContainers.h:293
virtual void Copy(const ContainerBase &that)
Virtual assignment.
Definition: ValueContainers.h:169
ValueContainer< MeterPerSecondSquared > MeterPerSecondSquaredContainer
A container containing 32 bit MeterPerSecondSquared values.
Definition: ValueContainers.h:389
ValueContainer()
Default constructor.
Definition: ValueContainers.h:70
ValueContainer< Steradian > SteradianContainer
A container containing 32 bit Steradian values.
Definition: ValueContainers.h:413
ValueContainer< Kilogram > KilogramContainer
A container containing 64 bit Kilogram values.
Definition: ValueContainers.h:443
virtual void SetNull()
Set the container to null.
Definition: ValueContainers.h:161
ValueContainer< Volt > VoltContainer
A container containing 32 bit Volt values.
Definition: ValueContainers.h:416
ValueContainer< Meter > MeterContainer
A container containing 64 bit Meter values.
Definition: ValueContainers.h:446
Binary ContainedType
Definition: ValueContainers.h:263
const Binary & GetVal() const
Get the value of the container.
Definition: ValueContainers.h:277
ValueContainer< TypeId > TypeIdContainer
A container containing TypeId values.
Definition: ValueContainers.h:342
Container for Binary.
Definition: ValueContainers.h:260
std::wstring ContainedType
Definition: ValueContainers.h:131
ValueContainer< RadianPerSecondSquared > RadianPerSecondSquaredContainer
A container containing 64 bit RadianPerSecondSquared values.
Definition: ValueContainers.h:467
ValueContainer< Float32 > Float32Container
A container containing 32 bit floating point values.
Definition: ValueContainers.h:336
Meant to be used when something goes very wrong.
Definition: Exceptions.h:360
const std::string & Utf8String() const
Convert the string to a UTF8 encoded std::string.
Definition: ValueContainers.h:228
ValueContainer< Newton > NewtonContainer
A container containing 32 bit Newton values.
Definition: ValueContainers.h:392
ValueContainer< InstanceId > InstanceIdContainer
A container containing InstanceId values.
Definition: ValueContainers.h:345
ValueContainer< RadianPerSecondSquared > RadianPerSecondSquaredContainer
A container containing 32 bit RadianPerSecondSquared values.
Definition: ValueContainers.h:404
virtual bool IsNull() const
Is the container set to null?
Definition: ValueContainers.h:90
ValueContainer< Hertz > HertzContainer
A container containing 64 bit Hertz values.
Definition: ValueContainers.h:434
ValueContainer< Second > SecondContainer
A container containing 32 bit Second values.
Definition: ValueContainers.h:407
ValueContainer< Pascal > PascalContainer
A container containing 64 bit Pascal values.
Definition: ValueContainers.h:458
Int32 Utf8StringLength() const
Calculate the length needed for this string in UTF8 encoding.
Definition: ValueContainers.h:199
ValueContainer< ChannelId > ChannelIdContainer
A container containing ChannelId values.
Definition: ValueContainers.h:351
void SetVal(const std::wstring &value)
Set the value of the container.
Definition: ValueContainers.h:147
ValueContainer< Hertz > HertzContainer
A container containing 32 bit Hertz values.
Definition: ValueContainers.h:371
ValueContainer< MeterPerSecond > MeterPerSecondContainer
A container containing 32 bit MeterPerSecond values.
Definition: ValueContainers.h:386
ValueContainer< Watt > WattContainer
A container containing 64 bit Watt values.
Definition: ValueContainers.h:482
T GetVal() const
Get the value of the container.
Definition: ValueContainers.h:87
Container for strings (std::wstring).
Definition: ValueContainers.h:128
void SetVal(const T value)
Set the value of the container.
Definition: ValueContainers.h:79
#define __WFILE__
Definition: Exceptions.h:31
ValueContainer< Float64 > Float64Container
A container containing 64 bit floating point values.
Definition: ValueContainers.h:339
ValueContainer< bool > BooleanContainer
A container containing boolean values.
Definition: ValueContainers.h:327
ValueContainer< Volt > VoltContainer
A container containing 64 bit Volt values.
Definition: ValueContainers.h:479
ValueContainer< Second > SecondContainer
A container containing 64 bit Second values.
Definition: ValueContainers.h:470
virtual void SetNull()
Set the container to null.
Definition: ValueContainers.h:93
ValueContainer< Kelvin > KelvinContainer
A container containing 64 bit Kelvin values.
Definition: ValueContainers.h:440
ValueContainer< Ampere > AmpereContainer
A container containing 32 bit Ampere values.
Definition: ValueContainers.h:365
ValueContainer< Newton > NewtonContainer
A container containing 64 bit Newton values.
Definition: ValueContainers.h:455
ValueContainer< CubicMeter > CubicMeterContainer
A container containing 64 bit CubicMeter values.
Definition: ValueContainers.h:431
T ContainedType
Definition: ValueContainers.h:63
virtual bool IsNull() const
Is the container set to null?
Definition: ValueContainers.h:290
Base class for all Containers.
Definition: ContainerBase.h:41
ValueContainer< Watt > WattContainer
A container containing 32 bit Watt values.
Definition: ValueContainers.h:419
ValueContainer< SquareMeter > SquareMeterContainer
A container containing 32 bit SquareMeter values.
Definition: ValueContainers.h:410
ValueContainer< HandlerId > HandlerIdContainer
A container containing HandlerId values.
Definition: ValueContainers.h:354
Thrown when an application attempts to get the value of a member that is null.
Definition: Exceptions.h:394
const std::wstring & GetVal() const
Get the value of the container.
Definition: ValueContainers.h:155
ValueContainer< Kelvin > KelvinContainer
A container containing 32 bit Kelvin values.
Definition: ValueContainers.h:377
ValueContainer< Int64 > Int64Container
A container containing 64 bit integer values.
Definition: ValueContainers.h:333
StringContainer()
Default constructor.
Definition: ValueContainers.h:138
ValueContainer< MeterPerSecond > MeterPerSecondContainer
A container containing 64 bit MeterPerSecond values.
Definition: ValueContainers.h:449
ValueContainer< RadianPerSecond > RadianPerSecondContainer
A container containing 32 bit RadianPerSecond values.
Definition: ValueContainers.h:401
bool m_bIsChanged
The variable containing the change flag.
Definition: ContainerBase.h:123
ValueContainer< Ampere > AmpereContainer
A container containing 64 bit Ampere values.
Definition: ValueContainers.h:428
ValueContainer< MeterPerSecondSquared > MeterPerSecondSquaredContainer
A container containing 64 bit MeterPerSecondSquared values.
Definition: ValueContainers.h:452
ValueContainer< Meter > MeterContainer
A container containing 32 bit Meter values.
Definition: ValueContainers.h:383
ValueContainer< Kilogram > KilogramContainer
A container containing 32 bit Kilogram values.
Definition: ValueContainers.h:380
virtual void Copy(const ContainerBase &that)
Virtual assignment.
Definition: ValueContainers.h:100
ValueContainer< Joule > JouleContainer
A container containing 32 bit Joule values.
Definition: ValueContainers.h:374
DotsC_Int32 Int32
32 bit integer type.
Definition: Defs.h:67
virtual bool IsNull() const
Is the container set to null?
Definition: ValueContainers.h:158
ValueContainer< Radian > RadianContainer
A container containing 64 bit Radian values.
Definition: ValueContainers.h:461
ValueContainer< Pascal > PascalContainer
A container containing 32 bit Pascal values.
Definition: ValueContainers.h:395
DOTS_CPP_API const std::string ToUtf8(const std::wstring &wstr)
Convert a std::wstring to UTF8-encoded std::string.
ValueContainer< RadianPerSecond > RadianPerSecondContainer
A container containing 64 bit RadianPerSecond values.
Definition: ValueContainers.h:464
ValueContainer< Radian > RadianContainer
A container containing 32 bit Radian values.
Definition: ValueContainers.h:398
std::vector< char > Binary
A type to contain binary data.
Definition: Defs.h:294