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)
 

Public Attributes

InputBlockpfirst_block
 

Private Member Functions

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()

ParameterInput::ParameterInput ( )

Definition at line 64 of file parameter_input.cpp.

◆ ~ParameterInput()

ParameterInput::~ParameterInput ( )

Definition at line 74 of file parameter_input.cpp.

Member Function Documentation

◆ LoadFromStream()

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

Definition at line 106 of file parameter_input.cpp.

◆ LoadFromFile()

void ParameterInput::LoadFromFile ( IOWrapper &  input)

Definition at line 172 of file parameter_input.cpp.

◆ ModifyFromCmdline()

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

◆ ParameterDump()

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

Definition at line 817 of file parameter_input.cpp.

◆ DoesParameterExist()

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

Definition at line 391 of file parameter_input.cpp.

◆ GetInteger()

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

Definition at line 404 of file parameter_input.cpp.

◆ GetOrAddInteger()

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

Definition at line 557 of file parameter_input.cpp.

◆ SetInteger()

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

Definition at line 672 of file parameter_input.cpp.

◆ GetReal()

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

Definition at line 439 of file parameter_input.cpp.

◆ GetOrAddReal()

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

Definition at line 585 of file parameter_input.cpp.

◆ SetReal()

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

Definition at line 688 of file parameter_input.cpp.

◆ GetBoolean()

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

Definition at line 474 of file parameter_input.cpp.

◆ GetOrAddBoolean()

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

Definition at line 613 of file parameter_input.cpp.

◆ SetBoolean()

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

Definition at line 704 of file parameter_input.cpp.

◆ GetString()

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

Definition at line 520 of file parameter_input.cpp.

◆ GetOrAddString()

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

Definition at line 647 of file parameter_input.cpp.

◆ SetString()

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

Definition at line 721 of file parameter_input.cpp.

◆ RollbackNextTime()

void ParameterInput::RollbackNextTime ( )

Definition at line 736 of file parameter_input.cpp.

◆ ForwardNextTime()

void ParameterInput::ForwardNextTime ( Real  time)

Definition at line 772 of file parameter_input.cpp.

◆ FindOrAddBlock()

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

Definition at line 216 of file parameter_input.cpp.

◆ GetPtrToBlock()

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

Definition at line 379 of file parameter_input.cpp.

◆ ParseLine()

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.

◆ AddParameter()

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

Definition at line 290 of file parameter_input.cpp.

◆ Lock()

void ParameterInput::Lock ( )
private

Definition at line 859 of file parameter_input.cpp.

◆ Unlock()

void ParameterInput::Unlock ( )
private

Definition at line 869 of file parameter_input.cpp.

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 101 of file parameter_input.hpp.


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