Main Page   Class Hierarchy   Compound List   File List   Compound Members   Related Pages  

ParsedKeyVal Class Reference

Converts textual information into keyword/value assocations. More...

#include <keyval.h>

Inheritance diagram for ParsedKeyVal

Inheritance graph
[legend]
Collaboration diagram for ParsedKeyVal:

Collaboration graph
[legend]
List of all members.

Public Methods

 ParsedKeyVal ()
 Create an empty ParsedKeyVal.

 ParsedKeyVal (const char *file)
 Parse the given input file.

 ParsedKeyVal (std::istream &s)
 Read input from s.

 ParsedKeyVal (IPV2 *)
 Use the given IPV2* object. More...

 ParsedKeyVal (const char *,const Ref< KeyVal > &)
 This ctor is given a string which is used to form keywords that are sought in the keyval argument. More...

 ~ParsedKeyVal ()
 Cleanup, deleting the IPV2 object.

void read (const char *)
 Read input data from the given filename.

void read (std::istream &)
 Read input data from the given stream.

void parse_string (const char *)
 Read input data from the given string.

const char* stringvalue (const char *)
const char* classname (const char *)
const char* truekeyword (const char *)
void errortrace (std::ostream &fp=ExEnv::err())
void dump (std::ostream &fp=ExEnv::err())
void print_unseen (std::ostream &fp=ExEnv::out())
 Print keywords that were never looked at, if possible.

int have_unseen ()
 Return 1 if there were unseen keywords, 0 if there are none, or -1 this keyval doesn't keep track of unseen keywords.


Static Public Methods

void cat_files (const char *,const Ref< KeyVal > &,std::ostream &o)
 This is like the ParsedKeyVal(const char*,const Ref<KeyVal>&) ctor, but writes the contents of the files to the given ostream.


Detailed Description

Converts textual information into keyword/value assocations.

The parsing is done with an IPV2 object. The The KeyVal Library for more information on the input format.


Constructor & Destructor Documentation

ParsedKeyVal::ParsedKeyVal ( IPV2 * )
 

Use the given IPV2* object.

The new ParsedKeyVal takes wnership of the passed IPV2 object.

ParsedKeyVal::ParsedKeyVal ( const char *,
const Ref< KeyVal > & )
 

This ctor is given a string which is used to form keywords that are sought in the keyval argument.

The associated values are used to construct file names that are used to initialize the ParsedKeyVal. The keywords sought are string'dir' for the directory prefix and string'files' for an array of file names.


The documentation for this class was generated from the following file:
Generated at Thu Oct 4 18:09:32 2001 for MPQC 2.0.0 using the documentation package Doxygen 1.2.5.