io::read_utils Namespace Reference

Utilities for reading sequences from a io::reader. More...


Functions

fstring make_element_name (const fstring &seq_name, int element_num)
fstring make_seq_length_name (const fstring &seq_name)
int read_sequence_length (io::reader &reader, const rutz::fstring &seq_name)
 Get the number of elements in the stored sequence seq_name.
template<class T, class Inserter>
void read_value_seq (io::reader &reader, const rutz::fstring &seq_name, Inserter inserter, int known_count=-1)
template<class T, class Inserter>
void read_value_obj_seq (io::reader &reader, const rutz::fstring &seq_name, Inserter inserter, int known_count=-1)
template<class C, class Inserter>
void read_object_seq (io::reader &reader, const rutz::fstring &seq_name, Inserter inserter, int known_count=-1)


Detailed Description

Utilities for reading sequences from a io::reader.

Function Documentation

template<class C, class Inserter>
void io::read_utils::read_object_seq ( io::reader reader,
const rutz::fstring seq_name,
Inserter  inserter,
int  known_count = -1 
) [inline]

Provides a generic interface for handling containers, sequences, etc. of io objects. If the count has already been read from the reader, this value can be passed as known_count, so that we avoid reading the value twice (this may be important if the reader does not support random access to the attributes).

Definition at line 115 of file readutils.h.

References io::reader::read_object(), and read_sequence_length().

template<class T, class Inserter>
void io::read_utils::read_value_obj_seq ( io::reader reader,
const rutz::fstring seq_name,
Inserter  inserter,
int  known_count = -1 
) [inline]

Provides a generic interface for handling containers, sequences, etc. of rutz::value subtypes. If the count has already been read from the reader, this value can be passed as known_count, so that we avoid reading the value twice (this may be important if the reader does not support random access to the attributes).

Definition at line 93 of file readutils.h.

References read_sequence_length(), and io::reader::read_value_obj().

template<class T, class Inserter>
void io::read_utils::read_value_seq ( io::reader reader,
const rutz::fstring seq_name,
Inserter  inserter,
int  known_count = -1 
) [inline]

Provides a generic interface for handling containers, sequences, etc. of value types. If the count has already been read from the reader, this value can be passed as known_count, so that we avoid reading the value twice (this may be important if the reader does not support random access to the attributes).

Definition at line 71 of file readutils.h.

References read_sequence_length(), and io::reader::read_value().


The software described here is Copyright (c) 1998-2005, Rob Peters.
This page was generated Wed Dec 3 06:56:19 2008 by Doxygen version 1.5.5.