yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::util::Flag< T > Class Template Reference

#include <flag.h>

Inheritance diagram for yaze::util::Flag< T >:
Collaboration diagram for yaze::util::Flag< T >:

Public Member Functions

 Flag (const std::string &name, const T &default_value, const std::string &help_text)
 
const std::string & name () const override
 
const std::string & help () const override
 
void ParseValue (const std::string &text) override
 
void SetValue (const T &val)
 
const T & Get () const
 
void ParseValue (const std::string &text)
 
- Public Member Functions inherited from yaze::util::IFlag
virtual ~IFlag ()=default
 

Private Attributes

std::string name_
 
value_
 
default_
 
std::string help_
 

Detailed Description

template<typename T>
class yaze::util::Flag< T >

Definition at line 30 of file flag.h.

Constructor & Destructor Documentation

◆ Flag()

template<typename T >
yaze::util::Flag< T >::Flag ( const std::string &  name,
const T &  default_value,
const std::string &  help_text 
)
inline

Definition at line 32 of file flag.h.

Member Function Documentation

◆ name()

template<typename T >
const std::string & yaze::util::Flag< T >::name ( ) const
inlineoverridevirtual

Implements yaze::util::IFlag.

Definition at line 39 of file flag.h.

References yaze::util::Flag< T >::name_.

◆ help()

template<typename T >
const std::string & yaze::util::Flag< T >::help ( ) const
inlineoverridevirtual

Implements yaze::util::IFlag.

Definition at line 40 of file flag.h.

References yaze::util::Flag< T >::help_.

◆ ParseValue() [1/2]

template<typename T >
void yaze::util::Flag< T >::ParseValue ( const std::string &  text)
inlineoverridevirtual

Implements yaze::util::IFlag.

Definition at line 43 of file flag.h.

References yaze::util::Flag< T >::name_, and yaze::util::Flag< T >::value_.

◆ SetValue()

template<typename T >
void yaze::util::Flag< T >::SetValue ( const T &  val)
inline

Definition at line 53 of file flag.h.

References yaze::util::Flag< T >::value_.

◆ Get()

template<typename T >
const T & yaze::util::Flag< T >::Get ( ) const
inline

Definition at line 56 of file flag.h.

References yaze::util::Flag< T >::value_.

◆ ParseValue() [2/2]

void yaze::util::Flag< bool >::ParseValue ( const std::string &  text)
inlinevirtual

Implements yaze::util::IFlag.

Definition at line 67 of file flag.h.

Member Data Documentation

◆ name_

template<typename T >
std::string yaze::util::Flag< T >::name_
private

Definition at line 59 of file flag.h.

Referenced by yaze::util::Flag< T >::name(), and yaze::util::Flag< T >::ParseValue().

◆ value_

template<typename T >
T yaze::util::Flag< T >::value_
private

◆ default_

template<typename T >
T yaze::util::Flag< T >::default_
private

Definition at line 61 of file flag.h.

◆ help_

template<typename T >
std::string yaze::util::Flag< T >::help_
private

Definition at line 62 of file flag.h.

Referenced by yaze::util::Flag< T >::help().


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