Ilwis-Objects
1.0
GIS and Remote Sensing framework for data access and processing
|
container for an instance of an IlwisObject More...
#include <ilwisdata.h>
Public Member Functions | |
IlwisData (const QString &name, IlwisTypes tp=itANY, const PrepareOptions &options=PrepareOptions()) | |
IlwisData (const Resource &resource1, const PrepareOptions &options=PrepareOptions()) | |
IlwisData (T *data) | |
IlwisData (const ESPIlwisObject &impl) | |
template<typename K > | |
IlwisData (const IlwisData< K > &obj) | |
IlwisData (const IlwisData &obj) | |
void | set (T *data) |
template<typename K > | |
IlwisData< T > & | assign (const IlwisData< K > &obj) |
template<typename K > | |
IlwisData< T > & | operator= (const IlwisData< K > &obj) |
IlwisData & | operator= (const IlwisData &obj) |
T * | operator-> () |
T * | operator-> () const |
T * | ptr () const |
template<class C = IlwisObject> | |
IlwisData< C > | get () const |
casts an object to another object based on the template parameter. More... | |
bool | prepare () |
create a new pristine IlwisObject. It has no connector (yet) and exists only in memory More... | |
bool | prepare (const QString &name, IlwisTypes tp=itANY, const PrepareOptions &options=PrepareOptions()) |
bool | prepare (const Resource &resource1, const PrepareOptions &options=PrepareOptions()) |
bool | prepare (const quint64 &iid, const PrepareOptions &options=PrepareOptions()) |
constructs an IlwisObject and registers its existens. More... | |
bool | isValid () const |
An instance is valid if an object has been allocated. More... | |
Friends | |
template<class C > | |
class | IlwisData |
container for an instance of an IlwisObject
The IlwisData object ensures that every IlwisObject is a singleton in the system. The QExplicitlySharedDataPointer of the class holds an unique pointer to the instance. The class also holds a (static) hash table to instances of all ilwisobjects that functions as a lookup table to quickly create new references to a particular IlwisObject. If a to instanced object is not in the hash table it will be created and initialized from the container were the data of the object resides ( disk, database, ...). If the object already exists it will be fetched from the hash table and returned to the caller. Its reference count will go up by one (automaticly).
|
inline |
casts an object to another object based on the template parameter.
If the cast is not to a child derivative of the class, the class will fail and a exception will be thrown. This one of the few places in the system were an exception will be thrown. The catch for these exceptions must be placed on a place were the system can resume normal operations This operation is usually used the gain access to methods of the child derivative.
|
inline |
An instance is valid if an object has been allocated.
|
inline |
create a new pristine IlwisObject. It has no connector (yet) and exists only in memory
|
inline |
The method ensures that a proper IlwisResource is requested from the system. It then tries to create the resource and on success initializes it. After that it registers itself to the system to prevent the creation of other instances of this resource. Any warnings or errors during its creation are transferred to the created object and the issue stack is cleared.
resource | the resource to be instanced as an IlwisObject |
connectorType | the connector that should handle this resource. If none is given ("default"), the system will figure it out by it self |
|
inline |
constructs an IlwisObject and registers its existens.
The method ensures that a proper IlwisResource is requested from the system. It then tries to create the resource and on success initializes it. After that it registers itself to the system to prevent the creation of other instances of this resource. Any warnings or errors during its creation are transferred to the created object and the issue stack is cleared.
name | a string representation of a resource. This might be an Url/IlwisResource but other representations can also be used |