#include <SmartRefBase.h>
Collaboration diagram for SmartRefBase:
Public Types | |
DATAOBJECT | |
CONTAINEDOBJECT | |
enum | { DATAOBJECT, CONTAINEDOBJECT } |
Public Member Functions | |
const ContainedObject * | accessData (const ContainedObject *typ) const |
Load on demand of ContainedObject like references. | |
const DataObject * | accessData (const DataObject *typ) const |
Load on demand of DataObject like references. | |
bool | isEqualEx (const DataObject *pObj, const SmartRefBase &c) const |
Extended equality check. | |
bool | isEqualEx (const ContainedObject *pObj, const SmartRefBase &c) const |
Extended equality check. | |
bool | isEqual (const ContainedObject *, const SmartRefBase &c) const |
Equality operator for ContainedObject like references. | |
bool | isEqual (const DataObject *, const SmartRefBase &c) const |
Equality operator for DataObject like references. | |
void | writeObject (const DataObject *pObject, StreamBuffer &s) const |
Output streamer for DataObject like references. | |
void | writeObject (const ContainedObject *pObject, StreamBuffer &s) const |
Output streamer for ContainedObject like references. | |
DataObject * | readObject (const DataObject *, StreamBuffer &s) const |
Input streamer for DataObject like references. | |
ContainedObject * | readObject (const ContainedObject *, StreamBuffer &s) const |
Output streamer for ContainedObject like references. | |
void | setObjectType (const ContainedObject *) const |
void | setObjectType (const DataObject *) const |
const std::string & | path () const |
Shortcut to access the path to the linked object. | |
int | objectType () const |
void | set (DataObject *pObj, long hint_id, long link_id) |
Setup smart reference when reading. Must be allowed from external sources. | |
Public Attributes | |
long | m_hintID |
Object data: ID of the link hint to the identifiable object. | |
long | m_linkID |
Object data: ID of the object within the identifiable container (if any). | |
const DataObject * | m_data |
Object data: Pointer to the identifiable object the link originates. | |
const ContainedObject * | m_contd |
Object data: Pointer to the Contained object (if applicable). | |
long | m_type |
Description: Base class of SmartReference objects. The base class handles the object requests to the data store. The separation of the SmartReference and the base class is mainly to avoid code blow up, because if the object is not yet present serious work must be performed in order to request the object from the store and invoke object updates to keep pointers in sync.
Base Class: None
Dependencies: None
History :
+---------+----------------------------------------------+--------+ | Date | Comment | Who | +---------+----------------------------------------------+--------+ | 21/06/99| Initial version. | MF | +---------+----------------------------------------------+--------+Author: M.Frank Version: 1.0
Definition at line 47 of file SmartRefBase.h.
anonymous enum |
const ContainedObject* SmartRefBase::accessData | ( | const ContainedObject * | typ | ) | const |
Load on demand of ContainedObject like references.
const DataObject* SmartRefBase::accessData | ( | const DataObject * | typ | ) | const |
Load on demand of DataObject like references.
bool SmartRefBase::isEqualEx | ( | const DataObject * | pObj, | |
const SmartRefBase & | c | |||
) | const |
Extended equality check.
bool SmartRefBase::isEqualEx | ( | const ContainedObject * | pObj, | |
const SmartRefBase & | c | |||
) | const |
Extended equality check.
bool SmartRefBase::isEqual | ( | const ContainedObject * | , | |
const SmartRefBase & | c | |||
) | const [inline] |
bool SmartRefBase::isEqual | ( | const DataObject * | , | |
const SmartRefBase & | c | |||
) | const [inline] |
void SmartRefBase::writeObject | ( | const DataObject * | pObject, | |
StreamBuffer & | s | |||
) | const [inline] |
void SmartRefBase::writeObject | ( | const ContainedObject * | pObject, | |
StreamBuffer & | s | |||
) | const [inline] |
DataObject* SmartRefBase::readObject | ( | const DataObject * | , | |
StreamBuffer & | s | |||
) | const [inline] |
Input streamer for DataObject like references.
Definition at line 89 of file SmartRefBase.h.
00089 { 00090 DataObject* pObj = 0; 00091 s.getIdentifiedLink(pObj, m_hintID); 00092 return pObj; 00093 }
ContainedObject* SmartRefBase::readObject | ( | const ContainedObject * | , | |
StreamBuffer & | s | |||
) | const [inline] |
Output streamer for ContainedObject like references.
Definition at line 95 of file SmartRefBase.h.
00095 { 00096 ContainedObject* pObj = 0; 00097 s.getContainedLink(pObj, m_hintID, m_linkID); 00098 return pObj; 00099 }
void SmartRefBase::setObjectType | ( | const ContainedObject * | ) | const [inline] |
void SmartRefBase::setObjectType | ( | const DataObject * | ) | const [inline] |
const std::string& SmartRefBase::path | ( | ) | const |
Shortcut to access the path to the linked object.
int SmartRefBase::objectType | ( | ) | const [inline] |
void SmartRefBase::set | ( | DataObject * | pObj, | |
long | hint_id, | |||
long | link_id | |||
) |
Setup smart reference when reading. Must be allowed from external sources.
long SmartRefBase::m_hintID [mutable] |
Object data: ID of the link hint to the identifiable object.
Definition at line 50 of file SmartRefBase.h.
long SmartRefBase::m_linkID [mutable] |
Object data: ID of the object within the identifiable container (if any).
Definition at line 52 of file SmartRefBase.h.
const DataObject* SmartRefBase::m_data [mutable] |
Object data: Pointer to the identifiable object the link originates.
Definition at line 54 of file SmartRefBase.h.
const ContainedObject* SmartRefBase::m_contd [mutable] |
Object data: Pointer to the Contained object (if applicable).
Definition at line 56 of file SmartRefBase.h.
long SmartRefBase::m_type [mutable] |
Definition at line 58 of file SmartRefBase.h.