rwlogo
SourcePro C++ 12.0

SourcePro® C++ API Reference Guide



   SourcePro C++
Documentation Home

RWDBBinaryVector Class Reference
[Bulk Operations]

Deprecated. Transfers binary arrays between the application and the database. More...

#include <rw/db/dbvector.h>

Inheritance diagram for RWDBBinaryVector:
RWDBTBuffer< T > RWDBAbstractBuffer

List of all members.

Public Member Functions

 RWDBBinaryVector (size_t width, size_t length)
RWDBBinaryVectorElement operator[] (size_t i)
size_t length () const

Detailed Description

Deprecated:
Classes RWDBBinaryVector and RWDBBinaryVectorElement are deprecated. Please use classes RWDBBlob and RWDBTBuffer<RWDBBlob>.

RWDBBinaryVector instances are used to transfer binary arrays of width width between the application and the database via classes RWDBBulkReader and RWDBBulkInserter.

Synopsis

 #include <rw/db/dbvector.h>
 
 RWDBBinaryVector binaryVector(width, length);

Examples

In the following example, the ith element of an RWDBBinaryVector is set to hold the data Hello, and the data and width are output to the screen.

 RWDBBinaryVector binaryVector(width, length);
 .
 .
 .
 binaryVector[i] = RWDBBlob("Hello", 5);
 .
 .
 .
 RWDBBinaryVectorElement element = binaryVector[i];
 // print the contents of the element
 cout << "length of element is:  " << binaryVector.width(i) << endl;
 cout << "the element's data is:  ";
 unsigned char* ptr = (unsigned char*) element;
 for (size_t j = 0; j < binVector.width(i); ++j, ++ptr)
   cout.put(*ptr);
 cout << endl;

Program Output:

 length of element is: 5
 the element's data is: Hello

Constructor & Destructor Documentation

RWDBBinaryVector::RWDBBinaryVector ( size_t  width,
size_t  length 
) [inline]

Constructs an RWDBBinaryVector of length elements, each of whose elements is width wide.


Member Function Documentation

size_t RWDBBinaryVector::length (  )  const [inline]

Returns the number of elements in self.

RWDBBinaryVectorElement RWDBBinaryVector::operator[] ( size_t  i  )  [inline]

Returns an RWDBBinaryVectorElement holding a reference to the i th element of self.

Reimplemented from RWDBTBuffer< T >.

 All Classes Functions Variables Typedefs Enumerations Enumerator Friends

© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.