Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

RWDBValue


RWDBValue RWCollectable

Data Type and Member Function Indexes
(exclusive of constructors and destructors)

Synopsis

#include <rw/db/value.h>

RWDBValue value;             //null, no type value
RWDBValue value(20);         //integer value

Description

RWDBValue provides storage for C++ primitive types, and for structured types used by DBTools.h++. It also adds Null/ not Null semantics to the primitive types. When DBTools.h++ fetches data from a database, it converts the data from the database vendor's datatypes into RWDBValues. When an application supplies DBTools.h++ with data, the data is stored as RWDBValues, so that the DBTools.h++ access libraries can standardize conversions from RWDBValue to a particular vendor's datatypes.

RWDBValue inherits from class RWCollectable. The virtual functions of the base class RWCollectable are redefined.

Public Enum

enum ValueType {
  NoType, 
  Char,
  UnsignedChar, 
  Tiny,            // not used for data storage
  UnsignedTiny,    // not used for data storage
  Short,
  UnsignedShort,
  Int,
  UnsignedInt,
  Long,
  UnsignedLong,
  Float,
  Double,
  Decimal,
  Date,
  DateTime,
  Duration,
  String,
  Blob,
  WString
  MBString,
};

Related Classes

RWDBValueManip rwdbNull;

Public Constructors

RWDBValue();
RWDBValue(const RWDBValue& value);
RWDBValue(char value);
RWDBValue(unsigned char value);
RWDBValue(short value);
RWDBValue(unsigned short value);
RWDBValue(int value);
RWDBValue(unsigned int value);
RWDBValue(long value);
RWDBValue(unsigned long value);
RWDBValue(float value);
RWDBValue(double value);
RWDBValue(const char* value);
RWDBValue(const RWDecimalPortable& value);
RWDBValue(const RWDBDateTime& value);
RWDBValue(const RWDBDuration& value);
RWDBValue(const RWCString& value);
RWDBValue(const RWDBBlob& value);
RWDBValue(const RWDate& date);
RWDBValue(const wchar_t *value);
RWDBValue(const RWWString& value);
RWDBValue(const RWDBMBString& value);
RWDBValue(RWDBValueManip manip);

Public Member Operators

RWDBValue&
operator=(const RWDBValue& value);
RWDBValue&
operator=(char value);
RWDBValue&
operator=(unsigned char value);
RWDBValue&
operator=(short value);
RWDBValue&
operator=(unsigned short value);
RWDBValue&
operator=(int value);
RWDBValue&
operator=(unsigned int value);
RWDBValue&
operator=(long value);
RWDBValue&
operator=(unsigned long value);
RWDBValue&
operator=(float value);
RWDBValue&
operator=(double value);
RWDBValue&
operator=(const RWDecimalPortable& value);
RWDBValue&
operator=(const RWDBDateTime& value);
RWDBValue&
operator=(const RWDBDuration& value);
RWDBValue&
operator=(const RWCString& value);
RWDBValue&
operator=(const RWDBBlob& value);
RWDBValue&
operator=(const RWWString& value);
RWDBValue&
operator=(const RWDBMBString& value); 
RWDBValue&
operator=(const RWDBValueManip manip);

Public Member Functions

RWDBBlob
asBlob() const;
char
asChar() const;
RWDate
asDate() const;
RWDBDateTime
asDateTime() const;
RWDecimalPortable
asDecimal() const;
double
asDouble() const;
RWDBDuration
asDuration() const;
float
asFloat() const;
int
asInt() const;
long
asLong() const;
RWDBMBString 
asMBString() const;
short
asShort() const;
RWCString
asString() const;
RWCString
asString(const RWDBPhraseBook& phraseBook) const;
unsigned char
asUnsignedChar() const;
unsigned int
asUnsignedInt() const;
unsigned long
asUnsignedLong() const;
unsigned short
asUnsignedShort() const;
RWWString 
asWString() const;
virtual RWspace
binaryStoreSize() const;
RWBoolean
canConvert(ValueType type)const;
virtual int
compareTo(const RWCollectable* cp) const;
virtual unsigned
hash() const;
virtual RWClassID
isA() const;
virtual RWBoolean
isEqual(const RWCollectable* cp) const;
RWBoolean
isNull() const;
virtual void
restoreGuts(const RWFile& file);
virtual void
restoreGuts(const RWvistream& vis);
virtual void
saveGuts(const RWFile& file) const;
virtual void
saveGuts(const RWvostream& vos) const;
ValueType
type() const;


Previous fileTop of DocumentContentsIndexNext file

©Copyright 1999, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.