Loading...
Searching...
No Matches
ledger::commodity_history_t Class Reference

#include <history.h>

Inherits boost::noncopyable.

Public Member Functions

void add_commodity (commodity_t &comm)
 
void add_price (const commodity_t &source, const datetime_t &when, const amount_t &price)
 
 commodity_history_t ()
 
boost::optional< price_point_tfind_price (const commodity_t &source, const commodity_t &target, const datetime_t &moment, const datetime_t &oldest=datetime_t())
 
boost::optional< price_point_tfind_price (const commodity_t &source, const datetime_t &moment, const datetime_t &oldest=datetime_t())
 
void map_prices (function< void(datetime_t, const amount_t &)> fn, const commodity_t &source, const datetime_t &moment, const datetime_t &_oldest=datetime_t(), bool bidirectionally=false)
 
void print_map (std::ostream &out, const datetime_t &moment=datetime_t())
 
void remove_price (const commodity_t &source, const commodity_t &target, const datetime_t &date)
 
 ~commodity_history_t ()
 

Detailed Description

Definition at line 56 of file history.h.

Constructor & Destructor Documentation

◆ commodity_history_t()

ledger::commodity_history_t::commodity_history_t ( )

◆ ~commodity_history_t()

ledger::commodity_history_t::~commodity_history_t ( )

Member Function Documentation

◆ add_commodity()

void ledger::commodity_history_t::add_commodity ( commodity_t & comm)

◆ add_price()

void ledger::commodity_history_t::add_price ( const commodity_t & source,
const datetime_t & when,
const amount_t & price )

◆ find_price() [1/2]

boost::optional< price_point_t > ledger::commodity_history_t::find_price ( const commodity_t & source,
const commodity_t & target,
const datetime_t & moment,
const datetime_t & oldest = datetime_t() )

◆ find_price() [2/2]

boost::optional< price_point_t > ledger::commodity_history_t::find_price ( const commodity_t & source,
const datetime_t & moment,
const datetime_t & oldest = datetime_t() )

◆ map_prices()

void ledger::commodity_history_t::map_prices ( function< void(datetime_t, const amount_t &)> fn,
const commodity_t & source,
const datetime_t & moment,
const datetime_t & _oldest = datetime_t(),
bool bidirectionally = false )

◆ print_map()

void ledger::commodity_history_t::print_map ( std::ostream & out,
const datetime_t & moment = datetime_t() )

◆ remove_price()

void ledger::commodity_history_t::remove_price ( const commodity_t & source,
const commodity_t & target,
const datetime_t & date )

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