#include <object.hh>
|
char * | object_name |
| stores object name if it has one More...
|
|
char * | type_name |
| stores object type name if it has one More...
|
|
char * | type_structure |
| store type structure as string if it has one More...
|
|
r_Type * | type_schema |
| pointer to type schema (built on request) More...
|
|
unsigned short | internal_obj_type |
| internal object type (1 marray, 2 collection) More...
|
|
enum | ObjectStatus {
no_status,
deleted,
created,
modified,
read,
transient
} |
| object life status More...
|
|
enum | ObjectType { no_object,
persistent_object,
transient_object
} |
| object types More...
|
|
virtual void | insert_obj_into_db ()=0 |
| inserts an object into the database More...
|
|
virtual void | insert_obj_into_db (const char *)=0 |
| inserts an object into a specific collection in the database More...
|
|
virtual void | update_obj_in_db () |
| updates an object in database More...
|
|
virtual void | load_obj_from_db () |
| load an object from the database More...
|
|
void | delete_obj_from_db () |
| deletes an object from the database More...
|
|
void | initialize_oid (const r_OId &initOId) |
| initialize oid of the object More...
|
|
virtual void | r_activate () |
| it is called when an object comes into transient memory More...
|
|
virtual void | r_deactivate () |
| it is called when an object leaves transient memory More...
|
|
int | test_status (ObjectStatus status) |
| test object status returns 1 if it matches More...
|
|
ObjectStatus | get_status () const |
| gets the status of the object More...
|
|
void | set_object_name (const char *name) throw (r_Error) |
| set object name. object name should contain only [a-zA-Z0-9_] More...
|
|
const char * | get_object_name () const |
| get object name More...
|
|
void * | operator new (size_t size, r_Database *database, ObjectStatus status, const r_OId &oid) |
| new operator for activating an object (status = read) More...
|
|
r_Object::r_Object |
( |
unsigned short |
objType | ) |
|
throw | ( | r_Error |
| ) | | |
constructor getting objType
r_Object::r_Object |
( |
const r_Object & |
, |
|
|
unsigned short |
objType = 0 |
|
) |
| |
throw | ( | r_Error |
| ) | | |
copy constructor
{ objType} specifies the type of the object (1=Marray, 2=Collection). This is needed for oid allocation and propably dropped in future.
virtual r_Object::~r_Object |
( |
| ) |
|
|
virtual |
virtual destructor
{ objType} specifies the type of the object (1=Marray, 2=Collection). This is needed for oid allocation and propably dropped in future.
const r_OId& r_Object::get_oid |
( |
| ) |
const |
|
inline |
const char* r_Object::get_type_name |
( |
| ) |
const |
|
inline |
const r_Type* r_Object::get_type_schema |
( |
| ) |
|
const char* r_Object::get_type_structure |
( |
| ) |
const |
|
inline |
get object type structure
void r_Object::mark_modified |
( |
| ) |
|
|
inline |
mark the object as modified
void r_Object::operator delete |
( |
void * |
obj_ptr | ) |
|
void* r_Object::operator new |
( |
size_t |
size | ) |
|
new operator for transient objects
void* r_Object::operator new |
( |
size_t |
size, |
|
|
r_Database * |
database, |
|
|
const char * |
type_name = 0 |
|
) |
| |
new operator for persistent objects
void* r_Object::operator new |
( |
size_t |
size, |
|
|
const char * |
type_name |
|
) |
| |
new operator for transient objects carrying type information
void r_Object::set_type_by_name |
( |
const char * |
name | ) |
|
throw | ( | r_Error |
| ) | | |
|
inline |
void r_Object::set_type_schema |
( |
const r_Type * |
type | ) |
|
throw | ( | r_Error |
| ) | | |
void r_Object::set_type_structure |
( |
const char * |
name | ) |
|
throw | ( | r_Error |
| ) | | |
|
inline |
set object type by name
With this method a type name has to be given by the user for each object which he wants to make persistent. The type name is the name introduced in the RasDL file. If an object without a valid type name is made persistent, an error occurs while committing the transaction.
NOTE: This method is updated. Use { void* operator new( size_t size, r_Database database, const char type_name )} instead.
test object type returns 1 if it matches
unsigned short r_Object::internal_obj_type |
|
protected |
internal object type (1 marray, 2 collection)
char* r_Object::object_name |
|
protected |
stores object name if it has one
char* r_Object::type_name |
|
protected |
stores object type name if it has one
pointer to type schema (built on request)
char* r_Object::type_structure |
|
protected |
store type structure as string if it has one
The documentation for this class was generated from the following file: