|
|
|
|
|
|
|||
#include <openrj/cpp/record.hpp>
example_cpp_1.cpp, example_cpp_2.cpp, and example_cpp_6.cpp.
Public Member Functions | |
| Record () | |
| Default constructor. | |
| Record (Record const &rhs) | |
| Copy constructor. | |
| Record & | operator= (Record const &rhs) |
| Copy assignment operator. | |
| String | GetComment () const |
| Returns the record comment string. | |
| size_t | GetNumFields () const |
| Returns the number of fields in the record. | |
| const Field | operator[] (size_t index) const |
| Returns the requested field. | |
| bool | has_field_with_name (char const *name, ORJField const **pfield=NULL) const |
| Looks up the field, optionally returning the located field to the caller. | |
| String | operator[] (char const *name) const |
| Returns the requested field. | |
| template<typename S> | |
| String | operator[] (S const &name) const |
| Returns the requested field. | |
| Record | ( | ) | [inline] |
Default constructor.
| String GetComment | ( | ) | const [inline] |
Returns the record comment string.
| size_t GetNumFields | ( | ) | const [inline] |
Returns the number of fields in the record.
| bool has_field_with_name | ( | char const * | name, | |
| ORJField const ** | pfield = NULL | |||
| ) | const [inline] |
Looks up the field, optionally returning the located field to the caller.
| name | The name of the field to be returned. | |
| pfield | Pointer to a pointer that will be set to the returned field |
| String operator[] | ( | S const & | name | ) | const [inline] |
Returns the requested field.
| name | The index of the field to be returned. |
| A | Field wrapper to the requested field. If not found, an instance of std::out_of_range is thrown. There is no error return |
| String operator[] | ( | char const * | name | ) | const [inline] |
Returns the requested field.
| name | The index of the field to be returned. |
| A | Field wrapper to the requested field. If not found, an instance of std::out_of_range is thrown. There is no error return |
///
/// Record record = . . .;
///
/// record["Channel"] = record["Port"]; // Doesn't have any effect!!
///
///
/// | const Field operator[] | ( | size_t | index | ) | const [inline] |
Returns the requested field.
| index | The index of the field to be returned. Must be less than the value returned by GetNumFields() |
///
/// Record record = . . .;
///
/// record[0] = record[1]; // Doesn't have any effect!!
///
///
///
|
|
| Open-RJ Library documentation © Synesis Software Pty Ltd, 2004-2005 |