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

definition of types in the project and some utiles for types More...

#include <complex>
Include dependency graph for Types.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

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

Macros

#define DEFINE_BIND_UTILS_FOR(T)
 

Typedefs

using PROJECT_NS::kids_void = void
 Alias for void type.
 
using PROJECT_NS::kids_bool = bool
 Alias for bool type.
 
using PROJECT_NS::kids_int = int
 Alias for integer type.
 
using PROJECT_NS::kids_bint = int
 Alias for integer type.
 
using PROJECT_NS::kids_real = double
 Alias for real number type.
 
using PROJECT_NS::kids_complex = std::complex<double>
 Alias for complex number type.
 
using PROJECT_NS::kids_str = std::string
 Alias for string type.
 
using PROJECT_NS::kids_param = Param
 Alias for Param type (to be defined later)
 
using PROJECT_NS::kids_dataset = DataSet
 Alias for DataSet type (to be defined later)
 

Enumerations

enum  PROJECT_NS::kids_dtype {
  PROJECT_NS::kids_void_type , PROJECT_NS::kids_bool_type , PROJECT_NS::kids_int_type , PROJECT_NS::kids_real_type ,
  PROJECT_NS::kids_complex_type , PROJECT_NS::kids_str_type , PROJECT_NS::kids_param_type , PROJECT_NS::kids_dataset_type
}
 

Functions

template<typename T >
kids_dtype PROJECT_NS::as_enum ()
 Converts a C++ type to its corresponding kids_dtype enumeration.
 
template<typename T >
std::string PROJECT_NS::as_str ()
 Converts a C++ type to its string representation.
 
 PROJECT_NS::DEFINE_BIND_UTILS_FOR (kids_void)
 
 PROJECT_NS::DEFINE_BIND_UTILS_FOR (kids_int)
 
 PROJECT_NS::DEFINE_BIND_UTILS_FOR (kids_bool)
 
 PROJECT_NS::DEFINE_BIND_UTILS_FOR (kids_real)
 
 PROJECT_NS::DEFINE_BIND_UTILS_FOR (kids_complex)
 
 PROJECT_NS::DEFINE_BIND_UTILS_FOR (kids_str)
 
 PROJECT_NS::DEFINE_BIND_UTILS_FOR (kids_param)
 
 PROJECT_NS::DEFINE_BIND_UTILS_FOR (kids_dataset)
 
types_cast

Utility functions for type casting

template<class Tto , class Tfrom = void>
Tto PROJECT_NS::cast (Tfrom value)
 
template<class Tto >
Tto PROJECT_NS::cast_from_complex (kids_complex value)
 
template<>
kids_complex PROJECT_NS::cast_from_complex (kids_complex value)
 
template<class Tto >
Tto PROJECT_NS::cast (kids_complex value)
 
template<class Tto , class Tfrom >
Tto PROJECT_NS::cast_at (void *data, int index=0)
 

Detailed Description

definition of types in the project and some utiles for types

  • definition of types
  • meta-data of types
  • casting/conversion utils
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 Types.h.

Macro Definition Documentation

◆ DEFINE_BIND_UTILS_FOR

#define DEFINE_BIND_UTILS_FOR ( T)
Value:
template <> \
inline kids_dtype as_enum<T>() { \
return T##_type; \
} \
template <> \
inline std::string as_str<T>() { \
return #T; \
}

Definition at line 111 of file Types.h.