/* $Id: cmdpars.h,v 1.1.1.1 1996/10/02 10:35:48 roitzsch Exp $ */
#ifndef CMDPARS_H
#define CMDPARS_H
#include <fstream>
#include "dict.h"
class CmdPars
{
Dict dict;
public:
CmdPars() : dict(50) { };
void read(int argc, char** argv);
int ReadCmdFile (const char *file);
void putToDict(char* obj);
int isSet(const char* key, const char* name);
int isPresent(const char* name); //
int isTrue (const char* name); // boolean
int get(const char* name, char* val);
int get(const char* name, int* val);
int get(const char* name, float* val);
int get(const char* name, double* val);
friend ostream& operator<< (ostream& os, CmdPars& c);
};
//-------------------------------------------------------------------------
class InfoFile
{
public:
InfoFile();
~InfoFile();
void write(char* s);
void write(int i);
void write(float x);
void write(double x);
private:
char* fileName;
filebuf fb;
ostream* os;
};
#endif
syntax highlighted by Code2HTML, v. 0.9.1