Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
DB Interface Module Reference Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

RWDBValue

Module:  DB Interface Module   Group:  Data Type


RWDBValue RWCollectable

Local Index

Members

Non-Members

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 the DB Interface Module. It also adds null/not null semantics to the primitive types. RWDBValue is used two ways:

RWDBValue inherits from class RWCollectable of the Essential Tools Module. The virtual functions of the base class RWCollectable are redefined, allowing instances of RWDBValue to be stored in the Smalltalk-like collections of the Essential Tools Module.

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,
  LongLong,
  UnsignedLongLong,
  Float,
  Double,
  LongDouble,
  Decimal,
  Date,
  DateTime,
  Duration,
  String,
  Blob,
  WString
  MBString,
  UString,
};

Related Objects

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(long long value);
RWDBValue(unsigned long long value);
RWDBValue(float value);
RWDBValue(double value);
RWDBValue(long 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(const RWBasicUString& value);

NOTE -- This function accepts Unicode strings. For more information, see the entry for RWBasicUString in the Essential Tools Module Reference Guide. For more information on internationalization, see Chapter 13 of the DB Interface Module User's Guide.
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=(long long value);
RWDBValue&
operator=(unsigned long long value);
RWDBValue&
operator=(float value);
RWDBValue&
operator=(double value);
RWDBValue&
operator=(long 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 RWBasicUString& value); 

NOTE -- This function accepts Unicode strings. For more information, see the entry for RWBasicUString in the Essential Tools Module Reference Guide. For more information on internationalization, see Chapter 13 of the DB Interface Module User's Guide.
RWDBValue&
operator=(const RWDBValueManip manip);

Public Member Functions

RWDBBlob
asBlob() const;
char
asChar() const;
RWDBDateTime
asDateTime() const;
RWDate
asDate() const;
RWDecimalPortable
asDecimal() const;
double
asDouble() const;
RWDBDuration
asDuration() const;
float
asFloat() const;
int
asInt() const;
long
asLong() const;
long double
asLongDouble() const;
long long
asLongLong() const;
unsigned long long
asUnsignedLongLong() 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;
RWBasicUString
asUString() const;

NOTE -- This function returns a Unicode string. For more information, see the entry for RWBasicUString in the Essential Tools Module Reference Guide. For more information on internationalization, see Chapter 13 of the DB Interface Module User's Guide.
RWWString 
asWString() const;
virtual RWspace
binaryStoreSize() const;
bool
canConvert(ValueType type)const;
virtual int
compareTo(const RWCollectable* cp) const;
virtual unsigned
hash() const;
virtual RWClassID
isA() const;
virtual bool
isEqual(const RWCollectable* cp) const;
bool
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;
RWCString
typeString() const;


Previous fileTop of DocumentContentsIndex pageNext file

© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.