GnuCash  4.11-354-g0815ab64c1
Public Member Functions
GncOptionCommodityValue Class Reference

class GncOptionCommodityValue Commodities are stored with their namespace and mnemonic instead of their gncGIUD so that they can be correctly retrieved even if they're deleted and recreated. More...

#include <gnc-option-impl.hpp>

Inheritance diagram for GncOptionCommodityValue:
OptionClassifier

Public Member Functions

 GncOptionCommodityValue (const char *section, const char *name, const char *key, const char *doc_string, gnc_commodity *value, GncOptionUIType ui_type=GncOptionUIType::COMMODITY)
 
 GncOptionCommodityValue (const GncOptionCommodityValue &)=default
 
 GncOptionCommodityValue (GncOptionCommodityValue &&)=default
 
GncOptionCommodityValueoperator= (const GncOptionCommodityValue &)=default
 
GncOptionCommodityValueoperator= (GncOptionCommodityValue &&)=default
 
gnc_commodity * get_value () const
 
gnc_commodity * get_default_value () const
 
bool validate (gnc_commodity *) const noexcept
 
void set_value (gnc_commodity *value)
 
void set_default_value (gnc_commodity *value)
 
void reset_default_value ()
 
bool is_changed () const noexcept
 
GncOptionUIType get_ui_type () const noexcept
 
void make_internal ()
 
std::string serialize () const noexcept
 
bool deserialize (const std::string &str) noexcept
 

Additional Inherited Members

- Data Fields inherited from OptionClassifier
std::string m_section
 
std::string m_name
 
std::string m_sort_tag
 
std::string m_doc_string
 

Detailed Description

class GncOptionCommodityValue Commodities are stored with their namespace and mnemonic instead of their gncGIUD so that they can be correctly retrieved even if they're deleted and recreated.

Additionally if GncOptionCommodityValue is created with GncOptionUIType::CURRENCY it will throw std::invalid_argument if one attempts to set a value that isn't a currency.

Definition at line 161 of file gnc-option-impl.hpp.


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