User Guide
nmodl::units::Prefix Class Reference

Class that stores all the data of a prefix. More...

Detailed Description

Class that stores all the data of a prefix.

Prefixes of units can also be defined in the units file. Those prefixes are then checked during a unit's insertion to the UnitTable to multiply their factor to the unit's factor.

Definition at line 187 of file units.hpp.

#include <units.hpp>

Public Member Functions

const std::string & get_name () const noexcept
 Getter for the name of the Prefix. More...
 
double get_factor () const noexcept
 Getter for the factor of the Prefix. More...
 
Ctor & dtor
 Prefix ()=delete
 Default constructor for Prefix. More...
 
 Prefix (std::string name, const std::string &factor)
 Constructor that instantiates a Prefix with its name and factor. More...
 

Private Attributes

double prefix_factor = 1
 Prefix's double factor. More...
 
std::string prefix_name
 Prefix's name. More...
 

Constructor & Destructor Documentation

◆ Prefix() [1/2]

nmodl::units::Prefix::Prefix ( )
delete

Default constructor for Prefix.

◆ Prefix() [2/2]

nmodl::units::Prefix::Prefix ( std::string  name,
const std::string &  factor 
)

Constructor that instantiates a Prefix with its name and factor.

Definition at line 30 of file units.cpp.

Member Function Documentation

◆ get_factor()

double nmodl::units::Prefix::get_factor ( ) const
inlinenoexcept

Getter for the factor of the Prefix.

Definition at line 213 of file units.hpp.

◆ get_name()

const std::string& nmodl::units::Prefix::get_name ( ) const
inlinenoexcept

Getter for the name of the Prefix.

Definition at line 208 of file units.hpp.

Member Data Documentation

◆ prefix_factor

double nmodl::units::Prefix::prefix_factor = 1
private

Prefix's double factor.

Definition at line 190 of file units.hpp.

◆ prefix_name

std::string nmodl::units::Prefix::prefix_name
private

Prefix's name.

Definition at line 193 of file units.hpp.


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