dastrie::otail Class Reference

Detailed Description

A writer class for a tail array.

Public Types

typedef uint8_t element_type
 The type that represents an element of a tail array.
typedef std::vector< element_typecontainer_type
 The container for the tail array.
typedef container_type::size_type size_type
 The type that represents the size of the tail array.

Public Member Functions

 otail ()
 Constructs an instance.
virtual ~otail ()
 Destructs an instance.
const element_typeblock () const
 Obtains a read-only access to the pointer of the tail array.
size_type bytes () const
 Reports the size of the tail array.
size_type tellp () const
 Reports the offset position to which a next data is written.
void clear ()
 Removes all of the contents in the tail array.
otailwrite (const void *data, size_t size)
 Puts a byte stream to the tail array.
template<typename value_type>
otailwrite (const value_type &value)
 Puts a value of a basic type to the tail array.
otailwrite_string (const char *str, size_type offset=0)
 Puts a null-terminated string.
otailwrite_string (const std::string &str, size_type offset=0)
 Puts a C++ string.

Protected Attributes

container_type m_cont
 The tail array.

Copyright (c) 2002-2008 by Naoaki Okazaki
Mon Nov 10 12:28:35 2008