Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Attributes

baci::BACIValue Class Reference

#include <baciValue.h>

Collaboration diagram for baci::BACIValue:
Collaboration graph
[legend]

List of all members.

Public Types

enum  Type {
  type_null = 0, type_pointer = 1, type_string = 2, type_double = 3,
  type_long = 4, type_pattern = 9, type_doubleSeq = 6, type_longSeq = 7,
  type_longLong = 8, type_uLongLong = 9, type_stringSeq = 10, type_float = 11,
  type_floatSeq = 12
}
typedef unsigned char octet

Public Member Functions

 BACIValue ()
 BACIValue (const Type type, const unsigned long bound)
 BACIValue (const BACIValue &value)
 BACIValue (const BACIdouble &value)
 BACIValue (const BACIfloat &value)
 BACIValue (const BACIlong &value)
 BACIValue (const BACIlongLong &value)
 BACIValue (const BACIuLongLong &value)
 BACIValue (const ACE_CString &value)
 BACIValue (const char *value)
 BACIValue (const void *&value)
 BACIValue (void *value)
 BACIValue (const BACIdoubleSeq &value)
 BACIValue (const BACIfloatSeq &value)
 BACIValue (const BACIlongSeq &value)
 BACIValue (const BACIstringSeq &value)
 BACIValue (const BACIpattern &value, const CORBA::Any &any)
void reset ()
BACIValueoperator= (const BACIValue &value)
bool operator== (const BACIValue &value) const
bool operator< (const BACIValue &value) const
bool operator<= (const BACIValue &value) const
bool lessThanDelta (const BACIValue &value, const BACIValue &delta) const
bool lessThanPercentDelta (const BACIValue &value, const BACIValue &delta) const
bool setType (Type type, unsigned long bound=0)
Type getType () const
const char * getArchiveType () const
unsigned long getBound () const
unsigned long isNull () const
unsigned long whyIsNull () const
bool noDelta () const
 ~BACIValue ()
const ACE_TCHAR * stringValue () const
ACE_CString getValue (ACE_CString *v=0) const
char * getValue (const char **v=0) const
char * getValue (char **v=0) const
BACIdouble doubleValue () const
BACIdouble getValue (BACIdouble *v=0) const
BACIfloat floatValue () const
BACIfloat getValue (BACIfloat *v=0) const
BACIlong longValue () const
BACIlong getValue (BACIlong *v=0) const
BACIlongLong longLongValue () const
BACIlongLong getValue (BACIlongLong *v=0) const
BACIuLongLong uLongLongValue () const
BACIuLongLong getValue (BACIuLongLong *v=0) const
BACIpattern patternValue () const
CORBA::Any enumValue () const
CORBA::Any getValue (CORBA::Any *v=0) const
void * pointerValue () const
void * getValue (void **v=0) const
BACIdoubleSeq doubleSeqValue () const
BACIdoubleSeq getValue (BACIdoubleSeq *v=0) const
BACIfloatSeq floatSeqValue () const
BACIfloatSeq getValue (BACIfloatSeq *v=0) const
BACIlongSeq longSeqValue () const
BACIlongSeq getValue (BACIlongSeq *v=0) const
BACIstringSeq stringSeqValue () const
BACIstringSeq getValue (BACIstringSeq *v=0) const
bool doubleValue (const BACIdouble &value)
bool setValue (const BACIdouble &value)
bool floatValue (const BACIfloat &value)
bool setValue (const BACIfloat &value)
bool longValue (const BACIlong &value)
bool setValue (const BACIlong &value)
bool longLongValue (const BACIlongLong &value)
bool setValue (const BACIlongLong &value)
bool uLongLongValue (const BACIuLongLong &value)
bool setValue (const BACIuLongLong &value)
bool patternValue (const BACIpattern &value)
bool enumValue (const BACIpattern &value, const CORBA::Any &anyVal)
bool stringValue (const ACE_CString &value)
bool setValue (const ACE_CString &value)
bool stringValue (const char *value)
bool setValue (const char *value)
bool pointerValue (void *value)
bool doubleSeqValue (const BACIdoubleSeq &value)
bool setValue (const BACIdoubleSeq &value)
bool floatSeqValue (const BACIfloatSeq &value)
bool setValue (const BACIfloatSeq &value)
bool longSeqValue (const BACIlongSeq &value)
bool setValue (const BACIlongSeq &value)
bool stringSeqValue (const BACIstringSeq &value)
bool setValue (const BACIstringSeq &value)
bool toString (ACE_CString &value, bool specifyType=false) const
bool fromString (const ACE_CString value, bool specifyType=false)
void getAny (CORBA::Any &any) const

Static Public Member Functions

static Type mapType (BACIdouble *v=0)
static Type mapType (BACIfloat *v=0)
static Type mapType (BACIlong *v=0)
static Type mapType (char **v=0)
static Type mapType (ACE_CString *v=0)
static Type mapType (void **v=0)
static Type mapType (BACIdoubleSeq *v=0)
static Type mapType (BACIfloatSeq *v=0)
static Type mapType (BACIlongSeq *v=0)
static Type mapType (BACIlongLong *v=0)
static Type mapType (BACIuLongLong *v=0)
static Type mapType (BACIstringSeq *v=0)

Static Public Attributes

static const ACE_CString typeName []
static const ACE_CString archiveTypeName []
static const BACIValue NullValue

Protected Attributes

Type type_m
union {
   double   inlineData_m [2]
   struct {
      unsigned long   bound
      void *   pointer
   }   ptr_m
   unsigned long   whyNull_m
}; 
CORBA::Any any_m
bool isEnum_m

Detailed Description

Generic data type used in BACI Class BACIValue is a data type wrapper for all BACI supported types. It provides several methods needed by BACI (compare operators, abs. diff., etc.)

Author:
Matej Sekoranja, Jozef Stefan Institute, Slovenia

Member Typedef Documentation

typedef unsigned char baci::BACIValue::octet

An 8-bit unsigned integer.



Member Enumeration Documentation

Enumeration of all supported data types. If it's not listed here, it cannot be packed into a BACIValue.


Enumerator:
type_null 

No-value. Can also be used to imply special meaning.

type_pointer 

Not really a type. This is just a void pointer used to pass any user-defined structures as a BACI Action parameter. THIS COULD NOT BE USED AS BACI TYPE!

type_string 

A string.

type_double 

A IEEE 8-byte floating point number.

type_long 

32-bit signed integer.

type_pattern 

A bit pattern.

type_doubleSeq 

Sequence of double-s.

type_longSeq 

Sequencs of long-s.

type_longLong 

64-bit signed integer.

type_uLongLong 

64-bit unsigned integer.

type_stringSeq 

Sequence of string-s.

type_float 

A IEEE 4-byte floating point number.

type_floatSeq 

Sequence of float-s.


Constructor & Destructor Documentation

baci::BACIValue::BACIValue (  ) 

Standard Contructor. The wrapped value will carry a Type::type_null value.


baci::BACIValue::BACIValue ( const Type  type,
const unsigned long  bound 
)

Constructor with initialized type. By using this constructor, one can create a BACIValue object with any type, although the value is not directly settable.

Parameters:
type Type of the wrapped value.
bound bound (for varialble length types)

baci::BACIValue::BACIValue ( const BACIValue value  ) 

Copy constructor: construct a value that will store the same data as the specified value.

Parameters:
value A pre-existing BACIValue object

baci::BACIValue::BACIValue ( const BACIdouble value  ) 

Constructor BACIdouble

Parameters:
value A constant reference to a value which will be this BACIValue object's underlying value.

baci::BACIValue::BACIValue ( const BACIfloat value  ) 

Constructor BACIfoat

Parameters:
value A constant reference to a value which will be this BACIValue object's underlying value.

baci::BACIValue::BACIValue ( const BACIlong value  ) 

Constructor BACIlong

Parameters:
value A constant reference to a value which will be this BACIValue object's underlying value.

baci::BACIValue::BACIValue ( const BACIlongLong value  ) 

Constructor BACIpattern

Parameters:
value A constant reference to a value which will be this BACIValue object's underlying value.

Constructor BACIlongLong
value A constant reference to a value which will be this BACIValue object's underlying value.

baci::BACIValue::BACIValue ( const BACIuLongLong value  ) 

Constructor realType

Parameters:
value A constant reference to a value which will be this BACIValue object's underlying value.

baci::BACIValue::BACIValue ( const ACE_CString &  value  ) 

Constructor ACE_CString

Parameters:
value A constant reference to a value which will be this BACIValue object's underlying value.

baci::BACIValue::BACIValue ( const char *  value  ) 

Constructor char*

Parameters:
value A constant reference to a value which will be this BACIValue object's underlying value.

baci::BACIValue::BACIValue ( const void *&  value  ) 

Constructor - Special case

Parameters:
value A constant reference to a value which will be this BACIValue object's underlying value.

baci::BACIValue::BACIValue ( void *  value  ) 

Constructor - pointer (Special case

Parameters:
value A constant reference to a value which will be this BACIValue object's underlying value.

baci::BACIValue::BACIValue ( const BACIdoubleSeq value  ) 

Constructor BACIdoubleSeq

Parameters:
value A constant reference to a value which will be this BACIValue object's underlying value.

baci::BACIValue::BACIValue ( const BACIfloatSeq value  ) 

Constructor BACIfloatSeq

Parameters:
value A constant reference to a value which will be this BACIValue object's underlying value.

baci::BACIValue::BACIValue ( const BACIlongSeq value  ) 

Constructor BACIlongSeq

Parameters:
value A constant reference to a value which will be this BACIValue object's underlying value.

baci::BACIValue::BACIValue ( const BACIstringSeq value  ) 

Constructor BACIstringSeq

Parameters:
value A constant reference to a value which will be this BACIValue object's underlying value.

baci::BACIValue::BACIValue ( const BACIpattern value,
const CORBA::Any &  any 
)

Constructor CORBA::Any. Deprecated. Used to support CORBA enums. It is used by test in baci module.

baci::BACIValue::~BACIValue (  ) 

Destructor



Member Function Documentation

BACIdoubleSeq baci::BACIValue::doubleSeqValue (  )  const

Returns this object's underlying BACI value as a double sequence.

Returns:
double sequence of this object or 0 if it's not a double sequence.

bool baci::BACIValue::doubleSeqValue ( const BACIdoubleSeq value  ) 

Mutator

Parameters:
value Reference to a BACIdoubleSeq that this object will copy.
Returns:
If the value currently contains other type of data than the one being stored, the operation has no effect and false is returned.

BACIdouble baci::BACIValue::doubleValue (  )  const

Returns this object's underlying BACI value as a double.

Returns:
double value of this object or 0 if it's not a double.

bool baci::BACIValue::doubleValue ( const BACIdouble value  ) 

Mutator

Parameters:
value Reference to a BACIdouble that this object will copy.
Returns:
If the value currently contains other type of data than the one being stored, the operation has no effect and false is returned.

bool baci::BACIValue::enumValue ( const BACIpattern value,
const CORBA::Any &  anyVal 
)

Mutator

Parameters:
value Reference to a CORBA::Any that this object will copy.
Returns:
If the value currently contains other type of data than the one being stored, the operation has no effect and false is returned.

CORBA::Any baci::BACIValue::enumValue (  )  const

Deprecated.

Returns:
enum value of this object encoded into a CORBA any.

bool baci::BACIValue::floatSeqValue ( const BACIfloatSeq value  ) 

Mutator

Parameters:
value Reference to a BACIfloatSeq that this object will copy.
Returns:
If the value currently contains other type of data than the one being stored, the operation has no effect and false is returned.

BACIfloatSeq baci::BACIValue::floatSeqValue (  )  const

Returns this object's underlying BACI value as a double sequence.

Returns:
float sequence of this object or 0 if it's not a float sequence.

BACIfloat baci::BACIValue::floatValue (  )  const

Returns this object's underlying BACI value as a long.

Returns:
long value of this object or 0 if it's not a long.

Returns this object's underlying BACI value as a double.
double value of this object or 0 if it's not a double.

bool baci::BACIValue::floatValue ( const BACIfloat value  ) 

Mutator

Parameters:
value Reference to a BACIfloat that this object will copy.
Returns:
If the value currently contains other type of data than the one being stored, the operation has no effect and false is returned.

bool baci::BACIValue::fromString ( const ACE_CString  value,
bool  specifyType = false 
)

Convert from a string into a BACI type and encode it into this object.

Parameters:
value value represented as string
bool if true (false is default) value type is also given (eg. <double>12.8) in input string, otherwise set type is used
Returns:
true on succes, false on failure
See also:
toString

void baci::BACIValue::getAny ( CORBA::Any &  any  )  const

Returns the BACIValue embedded within a CORBA any. Useful with archiving.

Parameters:
Any reference in which we will store the underlying BACIValue.
const char* baci::BACIValue::getArchiveType (  )  const [inline]

Get value type

Returns:
archive type of the value

unsigned long baci::BACIValue::getBound (  )  const [inline]

Get value bound (for variable length data types; eg. strings)

Returns:
value bound

Type baci::BACIValue::getType (  )  const [inline]

Get value type

Returns:
value type

BACIdouble baci::BACIValue::getValue ( BACIdouble v = 0  )  const

Returns this object's underlying BACI value as a double.

Parameters:
v is a BACIdouble *. Invoker should just provide a null reference.
Returns:
double value of this object or 0 if it's not a double.

BACIfloat baci::BACIValue::getValue ( BACIfloat v = 0  )  const

Returns this object's underlying BACI value as a float.

Parameters:
v is a BACIfloat *. Invoker should just provide a null reference.
Returns:
float value of this object or 0 if it's not a float.

BACIlong baci::BACIValue::getValue ( BACIlong v = 0  )  const

Returns this object's underlying BACI value as a long.

Parameters:
v is a BACIlong *. Invoker should just provide a null reference.
Returns:
long value of this object or 0 if it's not a long.

BACIlongLong baci::BACIValue::getValue ( BACIlongLong v = 0  )  const

Returns this object's underlying BACI value as a long long.

Parameters:
v is a BACIlongLong *. Invoker should just provide a null reference.
Returns:
long long value of this object or 0 if it's not a long.

BACIuLongLong baci::BACIValue::getValue ( BACIuLongLong v = 0  )  const

Returns this object's underlying BACI value as an unsigned long long.

Parameters:
v is a BACIuLongLong *. Invoker should just provide a null reference.
Returns:
unsigned long long value of this object or 0 if it's not a unsigned long long.

CORBA::Any baci::BACIValue::getValue ( CORBA::Any *  v = 0  )  const

Returns this object's underlying BACI value as a pattern.

Parameters:
v is a BACIpattern *. Invoker should just provide a null reference.
Returns:
pattern value of this object or 0 if it's not a pattern.

Deprecated.
Parameters:
v is a CORBA::Any *. Invoker should just provide a null reference.
Returns:
enum value of this object encoded into a CORBA any.

void* baci::BACIValue::getValue ( void **  v = 0  )  const

Returns this object's underlying BACI value as a void pointer.

Parameters:
v is a void pointer *. Invoker should just provide a null reference.
Returns:
void pointer value of this object or null if it's not a void pointer.

BACIdoubleSeq baci::BACIValue::getValue ( BACIdoubleSeq v = 0  )  const

Returns this object's underlying BACI value as a double sequence.

Parameters:
v is a BACIdoubleSeq *. Invoker should just provide a null reference.
Returns:
double sequence of this object or 0 if it's not a double sequence.

BACIfloatSeq baci::BACIValue::getValue ( BACIfloatSeq v = 0  )  const

Returns this object's underlying BACI value as a float sequence.

Parameters:
v is a BACIfloatSeq *. Invoker should just provide a null reference.
Returns:
float sequence of this object or 0 if it's not a float sequence.

BACIlongSeq baci::BACIValue::getValue ( BACIlongSeq v = 0  )  const

Returns this object's underlying BACI value as a long sequence.

Parameters:
v is a BACIlongSeq *. Invoker should just provide a null reference.
Returns:
long sequence value of this object or 0 if it's not a long sequence.

BACIstringSeq baci::BACIValue::getValue ( BACIstringSeq v = 0  )  const

Returns this object's underlying BACI value as a string sequence.

Parameters:
v is a BACIstringSeq *. Invoker should just provide a null reference.
Returns:
string sequence value of this object or 0 if it's not a not a string sequence.

ACE_CString baci::BACIValue::getValue ( ACE_CString *  v = 0  )  const

Given a pointer to an ACE C string, this method returns the stringified value of this object.

Parameters:
v is an ACE_CString *. Invoker should just provide a null reference.
Returns:
String value of this object

char* baci::BACIValue::getValue ( const char **  v = 0  )  const

Given a const pointer to character pointers, this method returns the stringified value of this object.

Parameters:
v is a constant char**. Invoker should just provide a null reference.
Returns:
String value of this object

char* baci::BACIValue::getValue ( char **  v = 0  )  const

Given a pointer to character pointers, this method returns the stringified value of this object.

Parameters:
v is a char**. Invoker should just provide a null reference.
Returns:
String value of this object

unsigned long baci::BACIValue::isNull (  )  const [inline]

Is value null value (not initialized)

Returns:
true if is null, false otherwise

bool baci::BACIValue::lessThanDelta ( const BACIValue value,
const BACIValue delta 
) const

Check if absolute difference between values is less than delta value

Parameters:
value value
delta delta value
Returns:
true if difference between this object's value and given value is less that delta value

bool baci::BACIValue::lessThanPercentDelta ( const BACIValue value,
const BACIValue delta 
) const

Check if percentual difference between values is less than delta value

Parameters:
value value
delta percentual delta value
Returns:
true if percentual difference between this object's value and given value is less that delta value

BACIlongLong baci::BACIValue::longLongValue (  )  const

Returns this object's underlying BACI value as a long long.

Returns:
long long value of this object or 0 if it's not a long.

bool baci::BACIValue::longLongValue ( const BACIlongLong value  ) 

Mutator

Parameters:
value Reference to a BACIlongLong that this object will copy.
Returns:
If the value currently contains other type of data than the one being stored, the operation has no effect and false is returned.

bool baci::BACIValue::longSeqValue ( const BACIlongSeq value  ) 

Mutator

Parameters:
value Reference to a BACIlongSeq that this object will copy.
Returns:
If the value currently contains other type of data than the one being stored, the operation has no effect and false is returned.

BACIlongSeq baci::BACIValue::longSeqValue (  )  const

Returns this object's underlying BACI value as a long sequence.

Returns:
long sequence value of this object or 0 if it's not a long sequence.

BACIlong baci::BACIValue::longValue (  )  const

Returns this object's underlying BACI value as a long.

Returns:
long value of this object or 0 if it's not a long.

bool baci::BACIValue::longValue ( const BACIlong value  ) 

Mutator

Parameters:
value Reference to a BACIlong that this object will copy.
Returns:
If the value currently contains other type of data than the one being stored, the operation has no effect and false is returned.

static Type baci::BACIValue::mapType ( BACIuLongLong v = 0  )  [inline, static]

Given a pointer to a baci::BACIuLongLong, this static method returns a the Type enumeration value.

Parameters:
v Pointer to a BACI data type
Returns:
BACIValue::type_uLongLong

static Type baci::BACIValue::mapType ( BACIfloat v = 0  )  [inline, static]

Given a pointer to a baci::BACIfloat, this static method returns a the Type enumeration value.

Parameters:
v Pointer to a BACI data type
Returns:
BACIValue::type_float

static Type baci::BACIValue::mapType ( BACIlong v = 0  )  [inline, static]

Given a pointer to a baci::BACIlong, this static method returns a the Type enumeration value.

Parameters:
v Pointer to a BACI data type
Returns:
BACIValue::type_long

static Type baci::BACIValue::mapType ( void **  v = 0  )  [inline, static]

Given a pointer to a void*, this static method returns a the Type enumeration value.

Parameters:
v Pointer to a BACI data type
Returns:
BACIValue::type_pointer

static Type baci::BACIValue::mapType ( ACE_CString *  v = 0  )  [inline, static]

Given a pointer to an ACE_CString, this static method returns a the Type enumeration value.

Parameters:
v Pointer to a BACI data type
Returns:
BACIValue::type_string

static Type baci::BACIValue::mapType ( BACIdoubleSeq v = 0  )  [inline, static]

Given a pointer to a baci::BACIdoubleSeq, this static method returns a the Type enumeration value.

Parameters:
v Pointer to a BACI data type
Returns:
BACIValue::type_doubleSeq

static Type baci::BACIValue::mapType ( BACIfloatSeq v = 0  )  [inline, static]

Given a pointer to a baci::BACIfloatSeq, this static method returns a the Type enumeration value.

Parameters:
v Pointer to a BACI data type
Returns:
BACIValue::type_floatSeq

static Type baci::BACIValue::mapType ( BACIlongSeq v = 0  )  [inline, static]

Given a pointer to a baci::BACIlongSeq, this static method returns a the Type enumeration value.

Parameters:
v Pointer to a BACI data type
Returns:
BACIValue::type_longSeq

static Type baci::BACIValue::mapType ( BACIlongLong v = 0  )  [inline, static]

Given a pointer to a baci::BACIlongLong, this static method returns a the Type enumeration value.

Parameters:
v Pointer to a BACI data type
Returns:
BACIValue::type_longLong

static Type baci::BACIValue::mapType ( BACIdouble v = 0  )  [inline, static]

Given a pointer to a baci::BACIdouble, this static method returns a the Type enumeration value.

Parameters:
v Pointer to a BACI data type
Returns:
BACIValue::type_double

static Type baci::BACIValue::mapType ( BACIstringSeq v = 0  )  [inline, static]

Given a pointer to a baci::BACIstringSeq, this static method returns a the Type enumeration value.

Parameters:
v Pointer to a BACI data type
Returns:
BACIValue::type_stringSeq

static Type baci::BACIValue::mapType ( char **  v = 0  )  [inline, static]

Given a pointer to a baci::BACIpattern, this static method returns a the Type enumeration value.

Parameters:
v Pointer to a BACI data type
Returns:
BACIValue::type_pattern

Given a pointer to a char*, this static method returns a the Type enumeration value.
Parameters:
v Pointer to a BACI data type
Returns:
BACIValue::type_string

bool baci::BACIValue::noDelta (  )  const

Check if value equals no change (e.g. for double 0.0, int 0)

Returns:
if value equals no change

bool baci::BACIValue::operator< ( const BACIValue value  )  const

Check less-than Operator


bool baci::BACIValue::operator<= ( const BACIValue value  )  const

Check less-than or equal to Operator


BACIValue& baci::BACIValue::operator= ( const BACIValue value  ) 

Equality Operator


bool baci::BACIValue::operator== ( const BACIValue value  )  const

Check equals to Operator


bool baci::BACIValue::patternValue ( const BACIpattern value  )  [inline]

Mutator

Parameters:
value Reference to a BACIpattern that this object will copy.
Returns:
If the value currently contains other type of data than the one being stored, the operation has no effect and false is returned.

BACIpattern baci::BACIValue::patternValue (  )  const [inline]

Returns this object's underlying BACI value as a pattern.

Returns:
pattern value of this object or 0 if it's not a pattern.

void* baci::BACIValue::pointerValue (  )  const

Returns this object's underlying BACI value as a void pointer.

Returns:
void pointer value of this object or null if it's not a void pointer.

bool baci::BACIValue::pointerValue ( void *  value  ) 

Mutator

Parameters:
value Reference to a void pointer that this object will copy.
Returns:
If the value currently contains other type of data than the one being stored, the operation has no effect and false is returned.

void baci::BACIValue::reset (  ) 

Resets value to non-initialized state(VALUE_UNINITIALIZED, type_null type).


bool baci::BACIValue::setType ( Type  type,
unsigned long  bound = 0 
)

Set the data type that this value will store. Makes the value capable of storing data of type Type. If the type currently being stored by the filed does not match Type, it is properly disposed. After using this function, the user should not assume that the data has been initialized, i.e. using accessor before a mutator is illegal. Example:

       BACIValue value;
       value.setType(BACIValue::type_string);
 



bool baci::BACIValue::setValue ( const BACIfloatSeq value  ) 

Mutator

Parameters:
value Reference to a BACIfloatSeq that this object will copy.
Returns:
If the value currently contains other type of data than the one being stored, the operation has no effect and false is returned.

bool baci::BACIValue::setValue ( const BACIdoubleSeq value  ) 

Mutator

Parameters:
value Reference to a BACIdoubleSeq that this object will copy.
Returns:
If the value currently contains other type of data than the one being stored, the operation has no effect and false is returned.

bool baci::BACIValue::setValue ( const BACIuLongLong value  ) 

Mutator

Parameters:
value Reference to a BACIuLongLong that this object will copy.
Returns:
If the value currently contains other type of data than the one being stored, the operation has no effect and false is returned.

bool baci::BACIValue::setValue ( const char *  value  ) 

Mutator

Parameters:
value Reference to a character pointer that this object will copy.
Returns:
If the value currently contains other type of data than the one being stored, the operation has no effect and false is returned.

bool baci::BACIValue::setValue ( const ACE_CString &  value  ) 

Mutator

Parameters:
value Reference to an ACE C string that this object will copy.
Returns:
If the value currently contains other type of data than the one being stored, the operation has no effect and false is returned.

bool baci::BACIValue::setValue ( const BACIdouble value  ) 

Mutator

Parameters:
value Reference to a BACIdouble that this object will copy.
Returns:
If the value currently contains other type of data than the one being stored, the operation has no effect and false is returned.

bool baci::BACIValue::setValue ( const BACIstringSeq value  ) 

Mutator

Parameters:
value Reference to a BACIstringSeq that this object will copy.
Returns:
If the value currently contains other type of data than the one being stored, the operation has no effect and false is returned.

bool baci::BACIValue::setValue ( const BACIlongSeq value  ) 

Mutator

Parameters:
value Reference to a BACIlongSeq that this object will copy.
Returns:
If the value currently contains other type of data than the one being stored, the operation has no effect and false is returned.

bool baci::BACIValue::setValue ( const BACIfloat value  ) 

Mutator

Parameters:
value Reference to a BACIfloat that this object will copy.
Returns:
If the value currently contains other type of data than the one being stored, the operation has no effect and false is returned.

bool baci::BACIValue::setValue ( const BACIlong value  ) 

Mutator

Parameters:
value Reference to a BACIlong that this object will copy.
Returns:
If the value currently contains other type of data than the one being stored, the operation has no effect and false is returned.

bool baci::BACIValue::setValue ( const BACIlongLong value  ) 

Mutator

Parameters:
value Reference to a BACIuLongLong that this object will copy.
Returns:
If the value currently contains other type of data than the one being stored, the operation has no effect and false is returned.

bool baci::BACIValue::stringSeqValue ( const BACIstringSeq value  ) 

Mutator

Parameters:
value Reference to a BACIstringSeq that this object will copy.
Returns:
If the value currently contains other type of data than the one being stored, the operation has no effect and false is returned.

BACIstringSeq baci::BACIValue::stringSeqValue (  )  const

Returns this object's underlying BACI value as a string sequence.

Returns:
string sequence value of this object or 0 if it's not a not a string sequence.

const ACE_TCHAR* baci::BACIValue::stringValue (  )  const

Stringifies this object's underlying BACI value.

Returns:
String value of this object or null if it's not a string.

bool baci::BACIValue::stringValue ( const ACE_CString &  value  ) 

Mutator

Parameters:
value Reference to a BACIpattern that this object will copy.
Returns:
If the value currently contains other type of data than the one being stored, the operation has no effect and false is returned.

Deprecated mutator.
Parameters:
value Reference to a enum that this object will copy.
Returns:
If the value currently contains other type of data than the one being stored, the operation has no effect and false is returned.

Mutator
Parameters:
value Reference to an ACE C string that this object will copy.
Returns:
If the value currently contains other type of data than the one being stored, the operation has no effect and false is returned.

bool baci::BACIValue::stringValue ( const char *  value  ) 

Mutator

Parameters:
value Reference to a character pointer that this object will copy.
Returns:
If the value currently contains other type of data than the one being stored, the operation has no effect and false is returned.

bool baci::BACIValue::toString ( ACE_CString &  value,
bool  specifyType = false 
) const

Convert to string

Parameters:
value where the string's value will be written to
bool if true (false is default) value type is also given (eg. <double>12.8), which could help in decoding data value (as implemented in fromString method)
Returns:
true on succes, false on failure
See also:
fromString

BACIuLongLong baci::BACIValue::uLongLongValue (  )  const

Returns this object's underlying BACI value as an unsigned long long.

Returns:
unsigned long long value of this object or 0 if it's not a unsigned long long.

bool baci::BACIValue::uLongLongValue ( const BACIuLongLong value  ) 

Mutator

Parameters:
value Reference to a BACIuLongLong that this object will copy.
Returns:
If the value currently contains other type of data than the one being stored, the operation has no effect and false is returned.

unsigned long baci::BACIValue::whyIsNull (  )  const [inline]

Return the reason why the value was set as null value.

Returns:
A code explaining the reason why the value is set to null. If NOT_NULL_VALUE is returned, the value is not null. Otherwise, one of these can be expected: VALUE_NULL - The value is null because it is meant to carry a null value. VALUE_UNINITIALIZED - The value is null because it has not yet been initialized to another value. VALUE_NONEXISTENT - The value does not exist (data type was not implemented).


Member Data Documentation

union { ... } [protected]
CORBA::Any baci::BACIValue::any_m [protected]

This any is used as a hack to support enumeration properties. Unless this BACIValue object is hiding an enumeration, do not use this.

const ACE_CString baci::BACIValue::archiveTypeName[] [static]

Array of strings initialized to contain what are essentially the same values as the Type enum. Values are: "invalid","invalid","string","double","long","long", "doubleSeq" (not supported by logging),"longSeq","longLong", "uLongLong","longString" Furthermore, this array can be indexed using the Type enum.


unsigned long baci::BACIValue::bound

Inlined data can be up to 8 bytes in length. This is sufficient for storing octets, short, long, and longlong integers, doubles and floats.


bool baci::BACIValue::isEnum_m [protected]

This is set to true if the BACIValue is really an enumeration.

A global predefined null BACIValue.


struct { ... } baci::BACIValue::ptr_m

Other types store a pointer to the actual data and a bound on the amount of data that can be stored there (e.g., number of characters for strings). A bound of 0 indicates "no limits".


Identifies the type of data currently being stored.

const ACE_CString baci::BACIValue::typeName[] [static]

Array of strings initialized to contain what are essentially the same values as the Type enum. Values are: "null","pointer","string","double","long","pattern","doubleSeq", "longSeq","longLong","uLongLong", "longString" Furthermore, this array can be indexed using the Type enum.


Describes why the value has type null


The documentation for this class was generated from the following file: