GnuCash  5.6-150-g038405b370+
Public Member Functions
GncOptionCommodityValue Class Reference

class GncOptionCommodityValue Commodities are stored with their namespace and mnemonic instead of their gncGUID 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 ()
 
void mark_saved () noexcept
 
bool is_dirty () const noexcept
 
bool is_changed () const noexcept
 
GncOptionUIType get_ui_type () const noexcept
 
void make_internal ()
 
bool is_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 gncGUID 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 215 of file gnc-option-impl.hpp.


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