|
|
|
|
|
|
|||
#include <openrj/stl/record.hpp>
example_stl_1.cpp, example_stl_2.cpp, example_stl_3.cpp, and example_stl_7.cpp.
Public Types | |
| typedef record | class_type |
| This type. | |
| typedef field | value_type |
| The value type. | |
| typedef value_type const | const_reference |
| The non-mutating (const) reference type. | |
| typedef value_type const * | const_pointer |
| The non-mutating (const) pointer type. | |
| typedef ptrdiff_t | difference_type |
| The difference type. | |
| typedef stlsoft::indirect_reverse_iterator< const_iterator, value_type, value_type, void, difference_type, stlsoft_ns_qual_std(random_access_iterator_tag) > | const_reverse_iterator |
| The non-mutating (const) reverse iterator type. | |
Public Member Functions | |
| record (ORJRecord const *record) | |
| Conversion constructor. | |
| record () | |
| Default constructor. | |
| record (record const &rhs) | |
| Copy constructor. | |
| record & | operator= (record const &rhs) |
| Copy assignment operator. | |
| size_t | size () const |
| Returns the number of fields in the record. | |
| bool | empty () const |
| Indicates whether the record is empty. | |
| string_t | comment () const |
| Returns the record comment string. | |
| const field | operator[] (size_t index) const |
| Returns the requested field. | |
| bool | has_field (string_t const &name) const |
| Indicates whether the record contains one or more fields of the given name. | |
| size_t | count_fields (string_t const &name) const |
| Indicates the number of contained fields with the given name. | |
| const string_t | operator[] (string_t const &name) const |
| Returns the value of the first field with the given name. | |
| string_t | get_field_value (string_t const &name, string_t const &defValue) const |
| Returns the value of the first field of the given name, or the given default if none exists. | |
| const_iterator | begin () const |
| Begins the iteration. | |
| const_iterator | end () const |
| Ends the iteration. | |
| const_reverse_iterator | rbegin () const |
| Begins the reverse iteration. | |
| const_reverse_iterator | rend () const |
| Ends the reverse iteration. | |
| typedef record class_type |
This type.
| typedef value_type const* const_pointer |
The non-mutating (const) pointer type.
| typedef value_type const const_reference |
The non-mutating (const) reference type.
| typedef stlsoft:: indirect_reverse_iterator< const_iterator , value_type , value_type , void , difference_type , stlsoft_ns_qual_std(random_access_iterator_tag) > const_reverse_iterator |
The non-mutating (const) reverse iterator type.
| typedef ptrdiff_t difference_type |
The difference type.
| typedef field value_type |
The value type.
| record | ( | ) | [inline] |
Default constructor.
| record::const_iterator begin | ( | ) | const [inline] |
Begins the iteration.
| string_t comment | ( | ) | const [inline] |
Returns the record comment string.
| size_t count_fields | ( | string_t const & | name | ) | const [inline] |
Indicates the number of contained fields with the given name.
| bool empty | ( | ) | const [inline] |
Indicates whether the record is empty.
| record::const_iterator end | ( | ) | const [inline] |
Ends the iteration.
Returns the value of the first field of the given name, or the given default if none exists.
| name | The name of the field whose value will be returned | |
| defValue | The default value returned if the named field does not exist |
defValue | bool has_field | ( | string_t const & | name | ) | const [inline] |
Indicates whether the record contains one or more fields of the given name.
Returns the value of the first field with the given name.
| name | The name of the field whose value will be returned. If not present, then an instance of std::out_of_range is thrown |
| 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 size() |
| record::const_reverse_iterator rbegin | ( | ) | const [inline] |
Begins the reverse iteration.
| record::const_reverse_iterator rend | ( | ) | const [inline] |
Ends the reverse iteration.
| size_t size | ( | ) | const [inline] |
Returns the number of fields in the record.
|
|
| Open-RJ Library documentation © Synesis Software Pty Ltd, 2004-2005 |