class CTBlob
Description
The CTBlob class represents Blob objects.
See Also
CTString
Preconditions
This is one of the basic objects from the c-tree database layer.
CTBlob Operators
- operator =: Assignment operator
- operator <, <=, >, >=, ==, !=: Comparison operators
CTBlob::operator =
Syntax
CTBlob& operator=(const pCTBLOB pBlob)
CTBlob& operator=(const CTBlob& blob)Parameters
- pBlob [in] The CTBlob object to be assigned to the new CTBlob object
- blob [in] The CTBlob object to be assigned to the new CTBlob object
Description
Assigns a Blob or CTBlob object to form a new CTBlob object
Return
The new CTBlob object
CTBlob::operator <, <=, >, >=, ==, !=
Syntax
CTBOOL operator < (const CTBlob& blob)
CTBOOL operator <= (const CTBlob& blob)
CTBOOL operator > (const CTBlob& blob)
CTBOOL operator >= (const CTBlob& blob)
CTBOOL operator == (const CTBlob& blob)
CTBOOL operator != (const CTBlob& blob)Parameters
- blob [in] The CTBlob object to be compared with this CTBlob object.
Description
These overloaded operators compare two CTBlob objects.
Return
The operators return YES or NO, depending on the result of the comparison.
CTBlob Methods
Constructor / Destructor
- CTBlob(): Creates a CTBlob object
- ~CTBlob(): Destroys a CTBlob Object and resets all the dependent objects
Blob Handling
- SetBlob(): Initializes the CTBlob object.
- GetBlob(): Retrieves a CTBlob object
- Get(): Retrieves a CTBlob object
- GetSize(): Retrieves the size of a CTBlob object
- Resize(): Resizes the CTBlob object
- UpdateBlob(): Updates the CTBlob object.
- AsString(): Retrieves the CTBlob object as a CTString object.
CTBlob::CTBlob
Syntax
CTBlob ( )
CTBlob (const pVOID data, VRLEN size)
CTBlob (const CTString& str)
CTBlob (const pCTBLOB pBlob)
CTBlob (const CTBlob& blob)Parameters
- data [in] The data to be assigned to the CTBlob object in the creation.
- size [in] The data size.
- str [in] The CTString object to be assigned to the new CTBlob object
- pBlob [in] The CTBlob object or Blob to be assigned to the new CTBlob object
- blob [in] The CTBlob object or Blob to be assigned to the new CTBlob object
Description
This is the constructor for the CTBlob object.
See also
~CTBlob()
CTBlob::~CTBlob
Syntax
~CTBlobParameters
This destructor has no parameters.
Description
This is the destructor for the CTBlob object.
See also
CTBlob()
CTBlob::AsString
Syntax
void AsString(CTString& str) constParameters
- str [out] the CTString object converted from the CTBlob object.
Description
Returns a CTBLOB object as a CTString object.
Return
None.
See also
Get()
CTBlob::Get
Syntax
pCTBLOB GetParameters
This method has no parameters.
Description
Retrieves the pCTBLOB member pointer of a CTBlob object.
Return
Get returns the CTBlob object.
See also
GetBlob(), GetSize()
CTBlob::GetBlob
Syntax
void GetBlob(pCTBLOB pBlob) const
void GetBlob(pVOID& pdata, VRLEN& size)Parameters
- pBlob [out] The retrieved CTBlob object
- data [out] The data retrieved from the CTBlob object
- size [out] The data size.
Description
Retrieves the CTBlob object
Return
None.
Example
void DisplayDoubles(CTBlob& blob)
{
DOUBLE* vector;
VRLEN size;
int i;
blob.GetBlob(&vector, &size);
for (i = 0; i < size / sizeof(DOUBLE); i++)
printf("%d: %f\n", i, vector[i];
_ctdb_free(vector);
}
See also
SetBlob(), Get()
CTBlob::GetSize
Syntax
VRLENGetSize constParameters
This method has no parameters.
Description
Retrieves the CTBlob object size.
Return
GetSize() returns the object size.
See also
ResizeObject()
CTBlob::Resize
Syntax
void Resize(VRLEN size)Parameters
- size [in] The new value to be assigned to the CTBlob object
Description
Resizes the CTBlob object.
Return
None.
See also
GetSize()
CTBlob::SetBlob
Syntax
void SetBlob(const pCTBLOB pBlob)
void SetBlob(const CTBlob& blob)
void SetBlob(const pVOID data, VRLEN size)
void SetBlob(const CTString& str)Parameters
- pBlob [in] The CTBlob object or Blob to be assigned to the CTBlob object
- blob [in] The CTBlob object or Blob to be assigned to the CTBlob object
- data [in] The data to be assigned to the CTBlob object
- size [in] The data size.
- str [in] The CTString object to be assigned to the CTBlob object
Description
Initializes the CTBlob object.
Return
None.
See also
GetBlob(), Get()
CTBlob::UpdateBlob
Syntax
void UpdateBlob(const pVOID data, VRLEN size, VRLEN offset)Parameters
- data [in] The new data to be assigned to the CTBlob object
- size [in] The new data size.
- offset [in] The initial offset in the CTBlob object to start updating.
Description
Updates one existing CTBlob object.
Return
None.
See also
GetBlob()