Rogue Wave Views Data Access Package API Reference Guide |
Rogue Wave Views Documentation Home |
User interface class. More...
#include <ilviews/dataccess/datatype.h>
Public Member Functions | |
const char * | getName () const |
Returns the name of a data type object. More... | |
virtual IliSchema * | getNestedSchema () const |
Returns the schema of the manager IliTable objects if this is a structured data type. More... | |
const char * | getPrettyName (IlvDisplay *display) const |
Returns pretty name. More... | |
virtual IlBoolean | isAnonymous () const |
Returns IlTrue if the name of the data type is not an identifier. More... | |
virtual IlBoolean | isBinaryType () const |
Returns IlTrue if the native format of the data type is binary. More... | |
virtual IlBoolean | isDateTimeType () const |
Returns IlTrue if the native format of the data type is a date or a time. More... | |
virtual IlBoolean | isDecimalType () const |
Returns IlTrue if the native format of the data type is IliDecimal . More... | |
virtual IlBoolean | isFractionalType () const |
Returns IlTrue if the native format of the data type is a real (for example, float, double, or IliDecimal ). More... | |
virtual IlBoolean | isIntegralType () const |
Returns IlTrue if the native format of the data type is not a real (for example, Boolean, byte, or integer). More... | |
virtual IlBoolean | isLargeObjectType () const |
Returns IlTrue if the native format of the data type corresponds to a large type in the database (for example, long string). More... | |
virtual IlBoolean | isNumericType () const |
Returns IlTrue if the native format of the data type is numeric (for example, Boolean, byte, integer, float, double, or IliDecimal ). More... | |
virtual IlBoolean | isObjectType () const |
Returns IlTrue if the the data type is an object. More... | |
IlBoolean | isRegistered () const |
Returns IlTrue if the data type is registered. More... | |
virtual IlBoolean | isStringType () const |
Returns IlTrue if the native format of the data type is a character string (for example, string or long string). More... | |
virtual IlBoolean | isStructuredType () const |
Returns IlTrue if the data type is a structured type (for example, table or object). More... | |
virtual IlBoolean | isTableType () const |
Returns IlTrue if the the data type is a table. More... | |
virtual IliTable * | makeTable () const |
Returns a created IliMemoryTable having the same schema as the data type if this is a structured data type. More... | |
void | writeType (std::ostream &output) const |
Writes the name of the data type to an output stream. More... | |
Public Member Functions inherited from IliRefCounted | |
IlInt | getRefCount () const |
Returns the reference count of the object. Initially, this property is set to 0 . More... | |
void | lock () const |
Increments the reference count of the object. | |
void | unLock () const |
Decrements the reference count of the object. More... | |
Static Public Member Functions | |
static const IliDatatype * | GetDatatypeByName (const char *name) |
Returns the data type from a name. More... | |
static const IliDatatype * | GetDatatypeByPrettyName (IlvDisplay *disp, const char *name) |
Returns a data type whose localized name is prettyName or 0 if no such data type exists. More... | |
static const IliDatatype * | ReadType (std::istream &input) |
Reads a data type name from an input stream. More... | |
Protected Member Functions | |
void | doRegister () |
This protected member function can be called in the constructor of subclasses of IliDatatype to make the object visible to the GetDatatypeByName() and GetDatatypeByPrettyName() static member functions. More... | |
Protected Member Functions inherited from IliRefCounted | |
virtual | ~IliRefCounted () |
This is the virtual destructor of the IliRefCounted class. More... | |
User interface class.
Library: dataccess
This class controls the type of an IliValue
object. For each possible type, there is one instance (of a subclass) of this class. The most commonly used data types correspond to the basic types such String, Integer, Float, and so on. The "See Also" section below lists the global variable names that let you access these data types. Alternatively, these data types can be retrieved using one of the following static member functions:
Additionally, new data type objects are automatically synthesized when communicating with an SQL database server, such as Oracle 9i, 10g, 11g or Informix 9, that support non-scalar types such as arrays, records, or nested tables. A structured type (see isStructuredType()
) can be either a table type (see isTableType()
) or an object type (see isObjectType()
). Both are defined in terms of a schema (see getNestedSchema()
) and each IliValue
object that they manage holds an IliTable
object that conforms to this schema. An object data type expects that the IliTable
it manages through the IliValue
will contain at most one row. Note that these data types cannot be retrieved by using one of the following static member functions:
Data type objects are reference counted. This means that a data type object must be locked before it is used. It can then be used as long as necessary. When the data type object is no longer needed, it is unlocked. In this way, the data type object will be deleted when the number of its users is zero. The predefined data types that can be accessed through global variables are locked at initialization time and unlocked at termination time so the requirement applies mainly to the other data types, such as the structured types. (See the "See Also" section below for a list of the global variables.) It is possible to programmatically define new data type objects by subclassing the IliPointerTypeClass
class. See the description of that class for more information on how this can be achieved.
|
protected |
This protected member function can be called in the constructor of subclasses of IliDatatype
to make the object visible to the GetDatatypeByName()
and GetDatatypeByPrettyName()
static member functions.
It is necessary to ensure that the name of the data type is unique among all registered data types before calling this member function.
|
static |
Returns the data type from a name.
name | The type name. The different values are:
|
0
is returned.
|
static |
Returns a data type whose localized name is prettyName or 0
if no such data type exists.
disp | The display. |
name | The pretty name. |
const char* IliDatatype::getName | ( | ) | const |
Returns the name of a data type object.
|
virtual |
Returns the schema of the manager IliTable
objects if this is a structured data type.
const char* IliDatatype::getPrettyName | ( | IlvDisplay * | display | ) | const |
Returns pretty name.
display | The display. |
IlvDisplay::getMessage()
method on one of the following keywords: &type_String
&type_LongString
&type_Boolean
&type_Byte
&type_Integer
&type_Float
&type_Double
&type_Decimal
&type_Date
&type_Time
|
virtual |
Returns IlTrue
if the name of the data type is not an identifier.
IlTrue
if the name of the data type is not an identifier. This occurs with some database data types (with Informix 9, for instance). In such cases, the name of the data type is an expression that designates a data type.
|
virtual |
Returns IlTrue
if the native format of the data type is binary.
IlTrue
if binary type.
|
virtual |
Returns IlTrue
if the native format of the data type is a date or a time.
IlTrue
if date type or time type.
|
virtual |
Returns IlTrue
if the native format of the data type is IliDecimal
.
IlTrue
if decimal type.
|
virtual |
Returns IlTrue
if the native format of the data type is a real (for example, float, double, or IliDecimal
).
IlTrue
if fractional type.
|
virtual |
Returns IlTrue
if the native format of the data type is not a real (for example, Boolean, byte, or integer).
IlTrue
if integral type.
|
virtual |
Returns IlTrue
if the native format of the data type corresponds to a large type in the database (for example, long string).
IlTrue
if large object type.
|
virtual |
Returns IlTrue
if the native format of the data type is numeric (for example, Boolean, byte, integer, float, double, or IliDecimal
).
IlTrue
if numeric type.
|
virtual |
Returns IlTrue
if the the data type is an object.
IlTrue
if object type. IlBoolean IliDatatype::isRegistered | ( | ) | const |
Returns IlTrue
if the data type is registered.
When this is the case, the GetDatatypeByName()
and GetDatatypeByPrettyName()
static member functions can be used to retrieve the data type.
IlTrue
if successful.
|
virtual |
Returns IlTrue
if the native format of the data type is a character string (for example, string or long string).
IlTrue
if string type.
|
virtual |
Returns IlTrue
if the data type is a structured type (for example, table or object).
IlTrue
if structured type.
|
virtual |
Returns IlTrue
if the the data type is a table.
IlTrue
if table type.
|
virtual |
Returns a created IliMemoryTable
having the same schema as the data type if this is a structured data type.
|
static |
Reads a data type name from an input stream.
input | The input stream. |
0
is returned. void IliDatatype::writeType | ( | std::ostream & | output | ) | const |
Writes the name of the data type to an output stream.
output | The output stream. |
© Copyright 2016, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.