KIDS  ver-0.0.1
KIDS : Kernel Integrated Dynamics Simulator
Loading...
Searching...
No Matches
Param.h File Reference

Provide struct and interfaces for input parameters. More...

#include <cstring>
#include <fstream>
#include <iomanip>
#include <memory>
#include <sstream>
#include <string>
#include "configor/json.hpp"
#include "kids/phys.h"
Include dependency graph for Param.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  PROJECT_NS::Param
 this class provides an interface wrapper for the parameter data. More...
 

Namespaces

namespace  PROJECT_NS
 < http://warp.povusers.org/FunctionParser/fparser.html
 

Macros

#define LOC()   (std::string(basename(__FILE__)) + ":" + std::to_string(__LINE__))
 show the location information for debug
 

Functions

const char * basename (const char *filepath)
 return the base of filename
 

Detailed Description

Provide struct and interfaces for input parameters.

Easier interfaces for getting parameters

Note
it is a better manner but only suits std=c++2a:
template <typename T>
double get(const std::string& key, const std::string& loc = "", const
T& default_value = T());
template <phys::dimension7 qdim>
double get(const std::string& key, const std::string& loc = "", const
double& default_value = double());
Author
Xin He
Date
2024-03
Version
1.0
revision:
Date Description
2024-03-29 Initial version. Added detailed commentary by ChatGPT.

Definition in file Param.h.

Macro Definition Documentation

◆ LOC

#define LOC ( )    (std::string(basename(__FILE__)) + ":" + std::to_string(__LINE__))

show the location information for debug

Definition at line 64 of file Param.h.

Function Documentation

◆ basename()

const char * basename ( const char * filepath)
inline

return the base of filename

Definition at line 53 of file Param.h.