/usr/share/netgen/libsrc/general/flags.hpp is in netgen-headers 4.9.13.dfsg-8build2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | #ifndef FILE_FLAGS
#define FILE_FLAGS
/**************************************************************************/
/* File: flags.hh */
/* Author: Joachim Schoeberl */
/* Date: 10. Oct. 96 */
/**************************************************************************/
namespace netgen
{
/**
Flag - Table.
A flag table maintains string variables, numerical
variables and boolean flags.
*/
class Flags
{
///
SYMBOLTABLE<char *> strflags;
///
SYMBOLTABLE<double> numflags;
///
SYMBOLTABLE<int> defflags;
///
SYMBOLTABLE<Array<char*>*> strlistflags;
///
SYMBOLTABLE<Array<double>*> numlistflags;
public:
///
Flags ();
///
~Flags ();
/// Deletes all flags
void DeleteFlags ();
/// Sets string flag, overwrite if exists
void SetFlag (const char * name, const char * val);
/// Sets numerical flag, overwrite if exists
void SetFlag (const char * name, double val);
/// Sets boolean flag
void SetFlag (const char * name);
/// Sets string arary falg
void SetFlag (const char * name, const Array<char*> & val);
/// Sets double array flag
void SetFlag (const char * name, const Array<double> & val);
/// Save flags to file
void SaveFlags (const char * filename) const;
/// write flags to stream
void PrintFlags (ostream & ost) const;
/// Load flags from file
void LoadFlags (const char * filename);
/// set flag of form -name=hello -val=0.5 -defined
void SetCommandLineFlag (const char * st);
/// Returns string flag, default value if not exists
const char * GetStringFlag (const char * name, const char * def) const;
/// Returns numerical flag, default value if not exists
double GetNumFlag (const char * name, double def) const;
/// Returns address of numerical flag, null if not exists
const double * GetNumFlagPtr (const char * name) const;
/// Returns address of numerical flag, null if not exists
double * GetNumFlagPtr (const char * name);
/// Returns boolean flag
bool GetDefineFlag (const char * name) const;
/// Returns string list flag, empty array if not exist
const Array<char*> & GetStringListFlag (const char * name) const;
/// Returns num list flag, empty array if not exist
const Array<double> & GetNumListFlag (const char * name) const;
/// Test, if string flag is defined
bool StringFlagDefined (const char * name) const;
/// Test, if num flag is defined
bool NumFlagDefined (const char * name) const;
/// Test, if string list flag is defined
bool StringListFlagDefined (const char * name) const;
/// Test, if num list flag is defined
bool NumListFlagDefined (const char * name) const;
};
}
#endif
|