#include <ObjectResource.h>

Public Member Functions | |
| ModelResource (std::string name, DataElement *pParent=NULL, std::string type=std::string()) | |
| ModelResource (DataDescriptor *pDescriptor) | |
| ModelResource (T *pElement) | |
This is a Resource class that wraps an object from ModelServices. When the ModelResource object goes out of scope, the object will be returned to ModelServices.
void addPixels(AoiElement *pAoi) { ModelResource<AoiElement> pAoi2("MyAoi"); for (int i=0; i<100; ++i) for (int j=0; j<100; ++j) if ((i^j) & 0x1) pAoi2->addPoint (i, j); pAoi->merge (pAoi2.get ()); } // AOI returned to ModelServices here
Definition at line 223 of file ObjectResource.h.
| ModelResource< T >::ModelResource | ( | std::string | name, | |
| DataElement * | pParent = NULL, |
|||
| std::string | type = std::string() | |||
| ) | [explicit] |
Definition at line 226 of file ObjectResource.h.
| ModelResource< T >::ModelResource | ( | DataDescriptor * | pDescriptor | ) | [explicit] |
Create a ModelResource for the given descriptor.
| pDescriptor | The DataDescriptor which describes the desired DataElement. ModelResource takes ownership of this object. It is not safe to dereference pDescriptor after creating the ModelResource. |
Definition at line 240 of file ObjectResource.h.
| ModelResource< T >::ModelResource | ( | T * | pElement | ) | [explicit] |
Create a ModelResource which owns the provided element and will destroy it when the resource is destroyed.
| pElement | the element that will be owned by this resource. |
Definition at line 251 of file ObjectResource.h.