27 #ifndef GAPPLICATIONPARS_HPP
28 #define GAPPLICATIONPARS_HPP
57 const std::vector<std::string>&
args);
81 void remove(
const int& index);
82 void remove(
const std::string&
name);
90 const std::vector<std::string>&
args);
92 void pickle(
const std::vector<std::string>&
string);
93 std::vector<std::string>
pickle(
void)
const;
101 std::string
inpath(
const std::string& filename)
const;
102 std::string
pfiles_path(
const std::string& filename)
const;
104 std::string
outpath(
const std::string& filename)
const;
105 void read(
const std::string& filename);
106 void write(
const std::string& filename)
const;
132 return (
"GApplicationPars");
174 return (
int)
m_pars.size();
std::vector< size_t > m_vstart
Column of value start.
GApplicationPar & append(const GApplicationPar &par)
Append parameter to container.
Application parameter container class.
void init_members(void)
Initialise class members.
std::string m_mode
Effective mode.
std::string m_syspfiles
Optional location of syspfiles.
const std::string & name(void) const
Return application name.
std::string syspfiles_path(const std::string &filename) const
Return path to parfile in m_syspfiles folder.
std::string print(const GChatter &chatter=NORMAL) const
Print parameters.
GApplicationPars & operator=(const GApplicationPars &pars)
Assignment operator.
std::vector< GApplicationPar > m_pars
Parameters.
void parse(void)
Parse parameter file.
const std::string & syspfiles(void) const
Return path to system pfiles.
std::string parline(GApplicationPar &par, size_t *start, size_t *stop) const
Return parameter file line for a specific parameter.
void reserve(const int &num)
Reserves space for parameters in container.
Application parameter class definition.
std::string inpath(const std::string &filename) const
Determine filepath for parameter file input.
void synchronise(const std::string &filename)
Synchronise parameter file with the parameter values in a another parameter file. ...
void free_members(void)
Delete class members.
int size(void) const
Return number of parameters in container.
std::string classname(void) const
Return class name.
GApplicationPars(void)
Void constructor.
void update(void)
Update parameter file.
virtual ~GApplicationPars(void)
Destructor.
std::vector< std::string > m_parfile
Parameter file lines.
void save(const GFilename &filename)
Save parameters.
std::string pfiles_path(const std::string &filename) const
Return path to parfile in $PFILES or $HOME/pfiles folder.
void copy_members(const GApplicationPars &pars)
Copy class members.
std::vector< std::string > pickle(void) const
Return pickled string vector.
const GApplicationPars & pars(void) const
Return application parameters.
GApplicationPar & at(const int &index)
Returns reference to parameter.
GApplicationPar & operator[](const int &index)
Returns reference to parameter.
void read(const std::string &filename)
Read parameter file.
std::string outpath(const std::string &filename) const
Determine filepath for parameter file output.
void write(const std::string &filename) const
Write parameter file.
Application parameter class.
GammaLib application interface definition.
std::vector< size_t > m_vstop
Column of value stop.
Definition of interface for container classes.
void append_standard(void)
Append standard parameters to container.
std::vector< int > m_line
Line number of parameter.
void extend(const GApplicationPars &pars)
Append parameter container.
const std::vector< std::string > & args(void) const
Return command line arguments.
int get_index(const std::string &name) const
Return parameter index by name.
bool is_empty(void) const
Signals if there are no parameters in container.
Interface class for container classes.
void load(const GFilename &filename)
Load parameters.
GApplicationPar & insert(const int &index, const GApplicationPar &par)
Insert parameter into container.
GApplicationPars * clone(void) const
Clone parameter container.
bool contains(const std::string &name) const
Check parameter exists.
void clear(void)
Clear parameter container.