Main Page | Directories | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

moot::TokenIO Class Reference

Abstract class for token I/O.

#include <mootTokenIO.h>

Inheritance diagram for moot::TokenIO:

Inheritance graph
[legend]
List of all members.

Static Public Member Functions

Format String <-> Bitmask Utilities
Format-Based Reader/Writer Creation

Member Function Documentation

std::string moot::TokenIO::format_canonical_string int  fmt  )  [static]
 

Convert a format bitmask to a canonical string form.

int moot::TokenIO::guess_filename_format const char *  filename  )  [static]
 

Guess basic format flags from a filename based on dot-separated extension substrings. Returns a bitmask suitable for passing to sanitize_format(). Recognizes filename extensions as documented in mootfiles(5).

See also:
parse_format_request

bool moot::TokenIO::is_empty_format int  fmt  )  [static]
 

Returns true iff no information content is requested by fmt.

See also:
parse_format_request

class TokenReader* moot::TokenIO::new_reader int  fmt  )  [static]
 

Create a new TokenReader object suitable for reading the format . should be a bitmask composed of TokenIOFormat flags. Caller is responsible for deleting the object returned.

class TokenWriter* moot::TokenIO::new_writer int  fmt  )  [static]
 

Create a new TokenReader object suitable for reading the format . should be a bitmask composed of TokenIOFormat flags. Caller is responsible for delting the object returned.

int moot::TokenIO::parse_format_request const char *  request,
const char *  filename = 0,
int  fmt_implied = tiofNone,
int  fmt_default = tiofNone
[static]
 

Top-level format-instantiation utility.

Parameters:
request user-requested format string, has highest priority
filename filename used to guess basic format flags
fmt_implied implied format bitmask (required information content)
fmt_default default format bitmask (for empty formats)

int moot::TokenIO::parse_format_string const std::string &  fmtString  )  [static]
 

Parse a format string, which should be a comma-separated list of TokenIOFormat flag-names (without the 'tiof' prefix, matching is case-insensitive). A prefix of '!' indicates negation of the given flag. Returns the corresponding bitmask.

See also:
parse_format_request

int moot::TokenIO::sanitize_format int  fmt,
int  fmt_implied = tiofNone,
int  fmt_default = tiofNone
[static]
 

Sanity check for format bitmasks.

See also:
parse_format_request


The documentation for this class was generated from the following file:
Generated on Mon Jun 27 13:05:28 2005 for libmoot by  doxygen 1.3.8-20040913