The types os_int32 and os_boolean, used throughout this manual, are each defined as a signed 32-bit integer type. The type os_unsigned_int32 is defined as an unsigned 32-bit integer type.
All ObjectStore programs must include the header file <ostore/ostore.hh>.
~os_database_root();Called when an instance of os_database_root is deleted. Deletes the associated name (persistent char*) as well.
static os_database_root *find(char *name, os_database *db);Returns a pointer to the root in the specified database with the specified name. Returns 0 if not found.
char *get_name();Returns the name associated with the os_database_root for which the function is called.
os_typespec *get_typespec();Returns a pointer to the typespec associated with the os_database_root for which the function is called (the typespec last passed to set_value() for the root).
void *get_value(os_typespec* = 0);Returns a pointer to the entry-point object associated with the os_database_root for which the function is called. Note that the return value is typed as void*, so a cast might be necessary when using it. If the specified os_typespec does not match the os_typespec specified when the value was set (see os_database_root::set_value()), err_pvar_type_mismatch is signaled. Note that this exception is signaled if and only if the specified typespec does not match the stored one; the actual type of the entry-point object is not checked.
void set_value(void *new_value, os_typespec* = 0);Establishes the object pointed to by new_value as the entry-point object associated with the os_database_root for which the function is called. If new_value points to transient memory or memory in a database other than the one containing the specified os_database_root, err_invalid_root_value is signaled. The specified os_typespec should designate the type of object pointed to by new_value. The typespec is stored for later use by os_database_root::get_value() (see above).
Updated: 03/31/98 17:25:09