If a user-defined class includes a member declaration exactly like this:
static os_typespec *get_os_typespec();the ObjectStore schema generator will automatically supply a body for this function, which will return a pointer to a typespec for the class. The first time such a function is called by a particular process, it will allocate the typespec and return a pointer to it. Subsequent calls to the function in the same process do not result in further allocation; instead, a pointer to the same os_typespec object is returned.
All ObjectStore programs must include the header file <ostore/ostore.hh>.
static os_typespec *get_char();Returns a pointer to a typespec for the type char. The first time such a function is called by a particular process, it will allocate the typespec and return a pointer to it. Subsequent calls to the function in the same process do not result in further allocation; instead, a pointer to the same os_typespec object is returned.
static os_typespec *get_double();Returns a pointer to a typespec for the type double. The first time such a function is called by a particular process, it will allocate the typespec and return a pointer to it. Subsequent calls to the function in the same process do not result in further allocation; instead, a pointer to the same os_typespec object is returned.
static os_typespec *get_float();Returns a pointer to a typespec for the type float. The first time such a function is called by a particular process, it will allocate the typespec and return a pointer to it. Subsequent calls to the function in the same process do not result in further allocation; instead, a pointer to the same os_typespec object is returned.
static os_typespec *get_int();Returns a pointer to a typespec for the type int. The first time such a function is called by a particular process, it will allocate the typespec and return a pointer to it. Subsequent calls to the function in the same process do not result in further allocation; instead, a pointer to the same os_typespec object is returned.
static os_typespec *get_long();Returns a pointer to a typespec for the type long. The first time such a function is called by a particular process, it will allocate the typespec and return a pointer to it. Subsequent calls to the function in the same process do not result in further allocation; instead, a pointer to the same os_typespec object is returned.
static os_typespec *get_long_double();Returns a pointer to a typespec for the type long_double. The first time such a function is called by a particular process, it will allocate the typespec and return a pointer to it. Subsequent calls to the function in the same process do not result in further allocation; instead, a pointer to the same os_typespec object is returned.
char *get_name();Returns the name of the type designated by the specified typespec.
static os_typespec *get_pointer();Returns a pointer to a typespec for the type void*. The first time such a function is called by a particular process, it will allocate the typespec and return a pointer to it. Subsequent calls to the function in the same process do not result in further allocation; instead, a pointer to the same os_typespec object is returned.
static os_typespec *get_short();Returns a pointer to a typespec for the type short. The first time such a function is called by a particular process, it will allocate the typespec and return a pointer to it. Subsequent calls to the function in the same process do not result in further allocation; instead, a pointer to the same os_typespec object is returned.
static os_typespec *get_signed_char();Returns a pointer to a typespec for the type signed_char. The first time such a function is called by a particular process, it will allocate the typespec and return a pointer to it. Subsequent calls to the function in the same process do not result in further allocation; instead, a pointer to the same os_typespec object is returned.
static os_typespec *get_signed_int();Returns a pointer to a typespec for the type signed_int. The first time such a function is called by a particular process, it will allocate the typespec and return a pointer to it. Subsequent calls to the function in the same process do not result in further allocation; instead, a pointer to the same os_typespec object is returned.
static os_typespec *get_signed_long();Returns a pointer to a typespec for the type signed_long. The first time such a function is called by a particular process, it will allocate the typespec and return a pointer to it. Subsequent calls to the function in the same process do not result in further allocation; instead, a pointer to the same os_typespec object is returned.
static os_typespec *get_signed_short();Returns a pointer to a typespec for the type signed_short. The first time such a function is called by a particular process, it will allocate the typespec and return a pointer to it. Subsequent calls to the function in the same process do not result in further allocation; instead, a pointer to the same os_typespec object is returned.
static os_typespec *get_unsigned_char();Returns a pointer to a typespec for the type unsigned_char. The first time such a function is called by a particular process, it will allocate the typespec and return a pointer to it. Subsequent calls to the function in the same process do not result in further allocation; instead, a pointer to the same os_typespec object is returned.
static os_typespec *get_unsigned_int();Returns a pointer to a typespec for the type unsigned_int. The first time such a function is called by a particular process, it will allocate the typespec and return a pointer to it. Subsequent calls to the function in the same process do not result in further allocation; instead, a pointer to the same os_typespec object is returned.
static os_typespec *get_unsigned_long();Returns a pointer to a typespec for the type unsigned_long. The first time such a function is called by a particular process, it will allocate the typespec and return a pointer to it. Subsequent calls to the function in the same process do not result in further allocation; instead, a pointer to the same os_typespec object is returned.
static os_typespec *get_unsigned_short();Returns a pointer to a typespec for the type unsigned_short. The first time such a function is called by a particular process, it will allocate the typespec and return a pointer to it. Subsequent calls to the function in the same process do not result in further allocation; instead, a pointer to the same os_typespec object is returned.
os_boolean operator ==(const os_typespec&) const;Returns nonzero (true) if the two typespecs designate the same type; returns 0 (false) otherwise.
os_typespec(char *type_name);Constructs an os_typespec representing the type with the specified name. This must be a name for a built-in type (such as int or char), a class, or a pointer-to-class or pointer-to-built-in type. For example, foo** is not allowed - use void* instead. Typedef names are not allowed. Typespecs must be allocated transiently; they should not be allocated in persistent memory.
In general, make use of typespecs for fundamental types, described in the ObjectStore C++ API User Guide in Typespecs for Fundamental Types, or typespecs for classes, described in Typespecs for Classes, rather than the os_typespec constructor. If you must use the os_typespec constructor, be sure to adhere to the guidelines outlined in The os_typespec Constructor in the ObjectStore C++ API User Guide.
char const *rather than
const char *
Updated: 03/31/98 17:25:09