QDBM for C++: qdbm::Datum Class Reference

- Main Page
- Namespaces
- Classes

- Class List
- Class Hierarchy
- Class Members

# qdbm::Datum Class Reference

List of all members.

## Detailed Description

Datum of records for ADBM.

## Public Member Functions
| Datum (const char *dptr="", int dsize=-1)
| Create an instance.
| Datum (int num)
| Create an instance.
| Datum (const Datum &datum)
| Copy constructor.
virtual | ~Datum () throw ()
| Release resources of the instance.
Datum & | operator= (const Datum &datum)
| Assignment operator.
Datum & | operator= (const char *str)
| Assignment operator.
virtual Datum & | operator<< (const Datum &datum)
| Concatenation operator.
virtual Datum & | operator<< (const char *str)
| Concatenation operator.
virtual bool | operator== (const Datum &datum) const
| Equality operator.
virtual bool | operator!= (const Datum &datum) const
| Inequality operator.
virtual bool | operator== (const char *str) const
| Equality operator.
virtual bool | operator!= (const char *str) const
| Inequality operator.
virtual char & | operator[] (int idx) const
| Subscripting operator.
virtual | operator const char * () const
| Cast operator into pointer to char.
virtual const char * | ptr () const
| Get the pointer of the region of the datum.
virtual int | size () const
| Get the size of the region of the datum.
## Friends
class | qdbm::Depot
class | qdbm::Curia
class | qdbm::Villa
Datum | operator+ (const Datum &former, const Datum &latter)
| Temporary concatenation operator for Datum.
Datum | operator+ (const Datum &datum, const char *str)
| Temporary concatenation operator for Datum.
Datum | operator+ (const char *str, const Datum &datum)
| Temporary concatenation operator for Datum.

## Constructor & Destructor Documentation

qdbm::Datum::Datum | ( | const char * | dptr = `""`,
|  | int | dsize = `-1` |
| ) |  |  |

Create an instance.

Parameters:

  | dptr | the pointer to the region of data.
  | dsize | the size of the region. If it is negative, the size is assigned with `stdstrlen(dptr)'.

qdbm::Datum::Datum | ( | int | num | ) |

Create an instance.

Parameters:

  | num | an integer number.

qdbm::Datum::Datum | ( | const Datum & | datum | ) |

Copy constructor.

Parameters:

  | datum | a source instance.

## Member Function Documentation

Datum& qdbm::Datum::operator= | ( | const Datum & | datum | ) |

Assignment operator.

Parameters:

  | datum | a source instance.

Returns:
  reference to itself.

Datum& qdbm::Datum::operator= | ( | const char * | str | ) |

Assignment operator.

Parameters:

  | str | a source string.

Returns:
  reference to itself.

virtual Datum& qdbm::Datum::operator<< | ( | const Datum & | datum | ) | `[virtual]`

Concatenation operator.

Parameters:

  | datum | a latter instance.

Returns:
  reference to itself.

virtual Datum& qdbm::Datum::operator<< | ( | const char * | str | ) | `[virtual]`

Concatenation operator.

Parameters:

  | str | a latter string.

Returns:
  reference to itself.

virtual bool qdbm::Datum::operator== | ( | const Datum & | datum | ) | const`[virtual]`

Equality operator.

Parameters:

  | datum | a comparing instance.

Returns:
  true if both equal, else, false.

virtual bool qdbm::Datum::operator!= | ( | const Datum & | datum | ) | const`[virtual]`

Inequality operator.

Parameters:

  | datum | a comparing instance.

Returns:
  true if both do not equal, else, false.

virtual bool qdbm::Datum::operator== | ( | const char * | str | ) | const`[virtual]`

Equality operator.

Parameters:

  | str | a comparing string.

Returns:
  true if both equal, else, false.

virtual bool qdbm::Datum::operator!= | ( | const char * | str | ) | const`[virtual]`

Inequality operator.

Parameters:

  | str | a comparing string.

Returns:
  true if both do not equal, else, false.

virtual char& qdbm::Datum::operator[] | ( | int | idx | ) | const`[virtual]`

Subscripting operator.

Parameters:

  | idx | the index of a character.

Returns:
  reference of the character.

virtual qdbm::Datum::operator const char * | ( |  | ) | const`[virtual]`

Cast operator into pointer to char.

Returns:
  the pointer of the region of the datum.

Note:
  Because an additional zero code is appended at the end of the region of the return value, the return value can be treated as a character string.

virtual const char* qdbm::Datum::ptr | ( |  | ) | const`[virtual]`

Get the pointer of the region of the datum.

Returns:
  the pointer of the region of the datum.

Note:
  Because an additional zero code is appended at the end of the region of the return value, the return value can be treated as a character string.

virtual int qdbm::Datum::size | ( |  | ) | const`[virtual]`

Get the size of the region of the datum.

Returns:
  the size of the region of the datum.

## Friends And Related Function Documentation

Datum operator+ | ( | const Datum & | former,
|  | const Datum & | latter |
| ) |  |  | `[friend]`

Temporary concatenation operator for Datum.

Parameters:

  | former | the former datum.
  | latter | the latter datum.

Returns:
  reference to a temporary instance.

Datum operator+ | ( | const Datum & | datum,
|  | const char * | str |
| ) |  |  | `[friend]`

Temporary concatenation operator for Datum.

Parameters:

  | datum | the former datum.
  | str | the latter string.

Returns:
  reference to a temporary instance.

Datum operator+ | ( | const char * | str,
|  | const Datum & | datum |
| ) |  |  | `[friend]`

Temporary concatenation operator for Datum.

Parameters:

  | str | the former string.
  | datum | the latter datum.

Returns:
  reference to a temporary instance.

The documentation for this class was generated from the following file:

- xadbm.h