A reference is an object that acts as a pointer to other database elements. More...
#include <iref.h>
Public Member Functions | |
virtual Sint32 | set_reference (const base::IInterface *db_element)=0 |
Sets the reference to db_element . More... | |
virtual Sint32 | set_reference (const char *name)=0 |
Sets the reference to the database element named name . More... | |
virtual const base::IInterface * | get_reference () const =0 |
Returns the reference. More... | |
template<class T> | |
const T * | get_reference () const |
Returns the reference. More... | |
virtual base::IInterface * | get_reference ()=0 |
Returns the reference. More... | |
template<class T> | |
T * | get_reference () |
Returns the reference. More... | |
virtual const char * | get_reference_name () const =0 |
Returns the name of the referenced element. More... | |
Public Member Functions inherited from mi::IData | |
virtual const char * | get_type_name () const =0 |
Returns the type name. More... | |
Public Member Functions inherited from mi::base::IInterface | |
virtual Uint32 | retain () const =0 |
Increments the reference count. More... | |
virtual Uint32 | release () const =0 |
Decrements the reference count. More... | |
virtual const IInterface * | get_interface (const Uuid &interface_id) const =0 |
Acquires a const interface from another. More... | |
template<class T> | |
const T * | get_interface () const |
Acquires a const interface from another. More... | |
virtual IInterface * | get_interface (const Uuid &interface_id)=0 |
Acquires a mutable interface from another. More... | |
template<class T> | |
T * | get_interface () |
Acquires a mutable interface from another. More... | |
virtual Uuid | get_iid () const =0 |
Returns the interface ID of the most derived interface. More... | |
Additional Inherited Members | |
Public Types inherited from mi::base::Interface_declare< 0x3572250a, ... > | |
typedef Interface_declare< id1, ... > | Self |
Own type. More... | |
typedef Uuid_t< id1, ... > | IID |
Declares the interface ID (IID) of this interface. More... | |
Public Types inherited from mi::base::Interface_declare< 0xc33c5a05, ... > | |
typedef Interface_declare< id1, ... > | Self |
Own type. More... | |
typedef Uuid_t< id1, ... > | IID |
Declares the interface ID (IID) of this interface. More... | |
Public Types inherited from mi::base::Interface_declare< 0x2e5f84bc, ... > | |
typedef Interface_declare< id1, ... > | Self |
Own type. More... | |
typedef Uuid_t< id1, ... > | IID |
Declares the interface ID (IID) of this interface. More... | |
Public Types inherited from mi::base::IInterface | |
typedef Uuid_t<0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0> | IID |
Declares the interface ID (IID) of this interface. More... | |
Static Public Member Functions inherited from mi::base::Interface_declare< 0x3572250a, ... > | |
static bool | compare_iid (const Uuid &iid) |
Compares the interface ID iid against the interface ID of this interface and of its ancestors. More... | |
Static Public Member Functions inherited from mi::base::Interface_declare< 0xc33c5a05, ... > | |
static bool | compare_iid (const Uuid &iid) |
Compares the interface ID iid against the interface ID of this interface and of its ancestors. More... | |
Static Public Member Functions inherited from mi::base::Interface_declare< 0x2e5f84bc, ... > | |
static bool | compare_iid (const Uuid &iid) |
Compares the interface ID iid against the interface ID of this interface and of its ancestors. More... | |
Static Public Member Functions inherited from mi::base::IInterface | |
static bool | compare_iid (const Uuid &iid) |
Compares the interface ID iid against the interface ID of this interface. More... | |
A reference is an object that acts as a pointer to other database elements.
It can be used for example to store references to other database elements as an attribute of a given database element.
|
inline |
Returns the reference.
This templated member function is a wrapper of the non-template variant for the user's convenience. It eliminates the need to call mi::base::IInterface::get_interface(const Uuid&) on the returned pointer, since the return type already is a pointer to the type T
specified as template parameter.
T | The requested interface type |
|
inline |
Returns the reference.
This templated member function is a wrapper of the non-template variant for the user's convenience. It eliminates the need to call mi::base::IInterface::get_interface(const Uuid&) on the returned pointer, since the return type already is a pointer to the type T
specified as template parameter.
T | The requested interface type |
|
pure virtual |
Returns the reference.
|
pure virtual |
Returns the reference.
|
pure virtual |
Returns the name of the referenced element.
|
pure virtual |
Sets the reference to db_element
.
Note that a NULL
pointer is a valid parameter value that clears the previously set reference. Subsequent get_reference() calls will return NULL
then.
If a literal 0
is passed for db_element
, the call is ambiguous. You need to explicitly cast the value to const
IInterface*
or const
char*
.
db_element
does not point to a DB element.db_element
points to a DB element that has not yet been stored in the DB.
|
pure virtual |
Sets the reference to the database element named name
.
Note that a NULL
pointer is a valid parameter value that clears the previously set reference. Subsequent get_reference() calls will return NULL
then.
If a literal 0
is passed for name
, the call is ambiguous. You need to explicitly cast the value to const
IInterface*
or const
char*
.