Athena++/Atmosphere
Planetary Atmosphere Simulator
ParameterInput Class Reference

#include <parameter_input.hpp>

Public Member Functions

 ParameterInput ()
 
 ~ParameterInput ()
 
void LoadFromStream (std::istream &is)
 
void LoadFromFile (IOWrapper &input)
 
void ModifyFromCmdline (int argc, char *argv[])
 void ParameterInput::ModifyFromCmdline(int argc, char *argv[]) More...
 
void ParameterDump (std::ostream &os)
 
int DoesParameterExist (std::string block, std::string name)
 
int GetInteger (std::string block, std::string name)
 
int GetOrAddInteger (std::string block, std::string name, int value)
 
int SetInteger (std::string block, std::string name, int value)
 
Real GetReal (std::string block, std::string name)
 
Real GetOrAddReal (std::string block, std::string name, Real value)
 
Real SetReal (std::string block, std::string name, Real value)
 
bool GetBoolean (std::string block, std::string name)
 
bool GetOrAddBoolean (std::string block, std::string name, bool value)
 
bool SetBoolean (std::string block, std::string name, bool value)
 
std::string GetString (std::string block, std::string name)
 
std::string GetOrAddString (std::string block, std::string name, std::string value)
 
std::string SetString (std::string block, std::string name, std::string value)
 
void RollbackNextTime ()
 
void ForwardNextTime (Real time)
 
InputBlockGetPtrToBlock (std::string name)
 
void AddParameter (InputBlock *pib, std::string name, std::string value, std::string comment)
 
 ParameterInput ()
 
 ~ParameterInput ()
 
void LoadFromStream (std::istream &is)
 
void LoadFromFile (IOWrapper &input)
 
void ModifyFromCmdline (int argc, char *argv[])
 
void ParameterDump (std::ostream &os)
 
int DoesParameterExist (std::string block, std::string name)
 
int GetInteger (std::string block, std::string name)
 
int GetOrAddInteger (std::string block, std::string name, int value)
 
int SetInteger (std::string block, std::string name, int value)
 
Real GetReal (std::string block, std::string name)
 
Real GetOrAddReal (std::string block, std::string name, Real value)
 
Real SetReal (std::string block, std::string name, Real value)
 
bool GetBoolean (std::string block, std::string name)
 
bool GetOrAddBoolean (std::string block, std::string name, bool value)
 
bool SetBoolean (std::string block, std::string name, bool value)
 
std::string GetString (std::string block, std::string name)
 
std::string GetOrAddString (std::string block, std::string name, std::string value)
 
std::string SetString (std::string block, std::string name, std::string value)
 
void RollbackNextTime ()
 
void ForwardNextTime (Real time)
 

Public Attributes

InputBlockpfirst_block
 

Private Member Functions

InputBlockFindOrAddBlock (std::string name)
 
void ParseLine (InputBlock *pib, std::string line, std::string &name, std::string &value, std::string &comment)
 
void Lock ()
 
void Unlock ()
 
InputBlockFindOrAddBlock (std::string name)
 
InputBlockGetPtrToBlock (std::string name)
 
void ParseLine (InputBlock *pib, std::string line, std::string &name, std::string &value, std::string &comment)
 
void AddParameter (InputBlock *pib, std::string name, std::string value, std::string comment)
 
void Lock ()
 
void Unlock ()
 

Private Attributes

std::string last_filename_
 

Detailed Description

Definition at line 69 of file parameter_input.hpp.

Constructor & Destructor Documentation

◆ ParameterInput() [1/2]

ParameterInput::ParameterInput ( )

Definition at line 64 of file parameter_input.cpp.

◆ ~ParameterInput() [1/2]

ParameterInput::~ParameterInput ( )

Definition at line 74 of file parameter_input.cpp.

◆ ParameterInput() [2/2]

ParameterInput::ParameterInput ( )

◆ ~ParameterInput() [2/2]

ParameterInput::~ParameterInput ( )

Member Function Documentation

◆ LoadFromStream() [1/2]

void ParameterInput::LoadFromStream ( std::istream &  is)

Definition at line 106 of file parameter_input.cpp.

◆ LoadFromFile() [1/2]

void ParameterInput::LoadFromFile ( IOWrapper &  input)

Definition at line 172 of file parameter_input.cpp.

◆ ModifyFromCmdline() [1/2]

void ParameterInput::ModifyFromCmdline ( int  argc,
char *  argv[] 
)

◆ ParameterDump() [1/2]

void ParameterInput::ParameterDump ( std::ostream &  os)

Definition at line 817 of file parameter_input.cpp.

◆ DoesParameterExist() [1/2]

int ParameterInput::DoesParameterExist ( std::string  block,
std::string  name 
)

Definition at line 391 of file parameter_input.cpp.

◆ GetInteger() [1/2]

int ParameterInput::GetInteger ( std::string  block,
std::string  name 
)

Definition at line 404 of file parameter_input.cpp.

◆ GetOrAddInteger() [1/2]

int ParameterInput::GetOrAddInteger ( std::string  block,
std::string  name,
int  value 
)

Definition at line 557 of file parameter_input.cpp.

◆ SetInteger() [1/2]

int ParameterInput::SetInteger ( std::string  block,
std::string  name,
int  value 
)

Definition at line 672 of file parameter_input.cpp.

◆ GetReal() [1/2]

Real ParameterInput::GetReal ( std::string  block,
std::string  name 
)

Definition at line 439 of file parameter_input.cpp.

◆ GetOrAddReal() [1/2]

Real ParameterInput::GetOrAddReal ( std::string  block,
std::string  name,
Real  value 
)

Definition at line 585 of file parameter_input.cpp.

◆ SetReal() [1/2]

Real ParameterInput::SetReal ( std::string  block,
std::string  name,
Real  value 
)

Definition at line 688 of file parameter_input.cpp.

◆ GetBoolean() [1/2]

bool ParameterInput::GetBoolean ( std::string  block,
std::string  name 
)

Definition at line 474 of file parameter_input.cpp.

◆ GetOrAddBoolean() [1/2]

bool ParameterInput::GetOrAddBoolean ( std::string  block,
std::string  name,
bool  value 
)

Definition at line 613 of file parameter_input.cpp.

◆ SetBoolean() [1/2]

bool ParameterInput::SetBoolean ( std::string  block,
std::string  name,
bool  value 
)

Definition at line 704 of file parameter_input.cpp.

◆ GetString() [1/2]

std::string ParameterInput::GetString ( std::string  block,
std::string  name 
)

Definition at line 520 of file parameter_input.cpp.

◆ GetOrAddString() [1/2]

std::string ParameterInput::GetOrAddString ( std::string  block,
std::string  name,
std::string  value 
)

Definition at line 647 of file parameter_input.cpp.

◆ SetString() [1/2]

std::string ParameterInput::SetString ( std::string  block,
std::string  name,
std::string  value 
)

Definition at line 721 of file parameter_input.cpp.

◆ RollbackNextTime() [1/2]

void ParameterInput::RollbackNextTime ( )

Definition at line 736 of file parameter_input.cpp.

◆ ForwardNextTime() [1/2]

void ParameterInput::ForwardNextTime ( Real  time)

Definition at line 772 of file parameter_input.cpp.

◆ GetPtrToBlock() [1/2]

InputBlock * ParameterInput::GetPtrToBlock ( std::string  name)

Definition at line 379 of file parameter_input.cpp.

◆ AddParameter() [1/2]

void ParameterInput::AddParameter ( InputBlock pib,
std::string  name,
std::string  value,
std::string  comment 
)

Definition at line 290 of file parameter_input.cpp.

◆ FindOrAddBlock() [1/2]

InputBlock * ParameterInput::FindOrAddBlock ( std::string  name)
private

Definition at line 216 of file parameter_input.cpp.

◆ ParseLine() [1/2]

void ParameterInput::ParseLine ( InputBlock pib,
std::string  line,
std::string &  name,
std::string &  value,
std::string &  comment 
)
private

Definition at line 249 of file parameter_input.cpp.

◆ Lock() [1/2]

void ParameterInput::Lock ( )
private

Definition at line 859 of file parameter_input.cpp.

◆ Unlock() [1/2]

void ParameterInput::Unlock ( )
private

Definition at line 869 of file parameter_input.cpp.

◆ LoadFromStream() [2/2]

void ParameterInput::LoadFromStream ( std::istream &  is)

◆ LoadFromFile() [2/2]

void ParameterInput::LoadFromFile ( IOWrapper &  input)

◆ ModifyFromCmdline() [2/2]

void ParameterInput::ModifyFromCmdline ( int  argc,
char *  argv[] 
)

◆ ParameterDump() [2/2]

void ParameterInput::ParameterDump ( std::ostream &  os)

◆ DoesParameterExist() [2/2]

int ParameterInput::DoesParameterExist ( std::string  block,
std::string  name 
)

◆ GetInteger() [2/2]

int ParameterInput::GetInteger ( std::string  block,
std::string  name 
)

◆ GetOrAddInteger() [2/2]

int ParameterInput::GetOrAddInteger ( std::string  block,
std::string  name,
int  value 
)

◆ SetInteger() [2/2]

int ParameterInput::SetInteger ( std::string  block,
std::string  name,
int  value 
)

◆ GetReal() [2/2]

Real ParameterInput::GetReal ( std::string  block,
std::string  name 
)

◆ GetOrAddReal() [2/2]

Real ParameterInput::GetOrAddReal ( std::string  block,
std::string  name,
Real  value 
)

◆ SetReal() [2/2]

Real ParameterInput::SetReal ( std::string  block,
std::string  name,
Real  value 
)

◆ GetBoolean() [2/2]

bool ParameterInput::GetBoolean ( std::string  block,
std::string  name 
)

◆ GetOrAddBoolean() [2/2]

bool ParameterInput::GetOrAddBoolean ( std::string  block,
std::string  name,
bool  value 
)

◆ SetBoolean() [2/2]

bool ParameterInput::SetBoolean ( std::string  block,
std::string  name,
bool  value 
)

◆ GetString() [2/2]

std::string ParameterInput::GetString ( std::string  block,
std::string  name 
)

◆ GetOrAddString() [2/2]

std::string ParameterInput::GetOrAddString ( std::string  block,
std::string  name,
std::string  value 
)

◆ SetString() [2/2]

std::string ParameterInput::SetString ( std::string  block,
std::string  name,
std::string  value 
)

◆ RollbackNextTime() [2/2]

void ParameterInput::RollbackNextTime ( )

◆ ForwardNextTime() [2/2]

void ParameterInput::ForwardNextTime ( Real  time)

◆ FindOrAddBlock() [2/2]

InputBlock* ParameterInput::FindOrAddBlock ( std::string  name)
private

◆ GetPtrToBlock() [2/2]

InputBlock* ParameterInput::GetPtrToBlock ( std::string  name)
private

◆ ParseLine() [2/2]

void ParameterInput::ParseLine ( InputBlock pib,
std::string  line,
std::string &  name,
std::string &  value,
std::string &  comment 
)
private

◆ AddParameter() [2/2]

void ParameterInput::AddParameter ( InputBlock pib,
std::string  name,
std::string  value,
std::string  comment 
)
private

◆ Lock() [2/2]

void ParameterInput::Lock ( )
private

◆ Unlock() [2/2]

void ParameterInput::Unlock ( )
private

Member Data Documentation

◆ pfirst_block

InputBlock * ParameterInput::pfirst_block

Definition at line 76 of file parameter_input.hpp.

◆ last_filename_

std::string ParameterInput::last_filename_
private

Definition at line 104 of file parameter_input.hpp.


The documentation for this class was generated from the following files: