mirror of
https://git.gfz-potsdam.de/naaice/iphreeqc.git
synced 2025-12-16 00:28:23 +01:00
Moved some methods for .h to source files to avoid need for includes. Debug and Release compile. Still need to get class version working. git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/trunk@3868 1feff8c3-07ed-0310-ac33-dd36852eb9cd
68 lines
1.2 KiB
C++
68 lines
1.2 KiB
C++
#if !defined(NUMKEYWORD_H_INCLUDED)
|
|
#define NUMKEYWORD_H_INCLUDED
|
|
|
|
//#include "Parser.h"
|
|
#include <ostream> // std::ostream
|
|
#include <string> // std::string
|
|
class CParser;
|
|
|
|
extern char *string_duplicate(const char *);
|
|
|
|
class cxxNumKeyword
|
|
{
|
|
public:
|
|
cxxNumKeyword();
|
|
virtual ~ cxxNumKeyword();
|
|
|
|
|
|
char *get_description() const
|
|
{
|
|
return string_duplicate(this->description.c_str());
|
|
}
|
|
void set_description(std::string str)
|
|
{
|
|
this->description = str;
|
|
}
|
|
void set_description(char *str)
|
|
{
|
|
if (str != NULL)
|
|
this->description = str;
|
|
}
|
|
|
|
int get_n_user() const
|
|
{
|
|
return this->n_user;
|
|
}
|
|
void set_n_user(int user)
|
|
{
|
|
this->n_user = user;
|
|
}
|
|
|
|
int get_n_user_end() const
|
|
{
|
|
return this->n_user_end;
|
|
}
|
|
void set_n_user_end(int user_end)
|
|
{
|
|
this->n_user_end = user_end;
|
|
}
|
|
|
|
bool operator<(const cxxNumKeyword & key) const
|
|
{
|
|
return (this->n_user < key.n_user);
|
|
}
|
|
|
|
virtual void dump_xml(std::ostream & os, unsigned int indent = 0) const;
|
|
|
|
void read_number_description(CParser & parser);
|
|
|
|
protected:
|
|
int n_user;
|
|
int n_user_end;
|
|
std::string description;
|
|
|
|
private:
|
|
void read_number_description(std::istream & is);
|
|
};
|
|
#endif // !defined(NUMKEYWORD_H_INCLUDED)
|