62class r_base_t :
public supports_flags<uint_least16_t>,
86 void acquire()
const {
90 void release()
const {
126 const journal_t * ptr()
const {
159 r_xacts_list::iterator xacts_begin() {
160 return xacts.begin();
162 r_xacts_list::iterator xacts_end() {
174 r_posts_list::iterator posts_begin() {
175 return posts.begin();
177 r_posts_list::iterator posts_end() {
195 const item_t * ptr()
const {
221 std::size_t seq()
const {
226 void set_date(
const date_t& when);
231 string payee()
const;
232 void set_payee(
const string& name);
238 bool has_tag(
const string& tag)
const {
239 return ptr()->has_tag(tag);
241 bool has_tag(
const mask_t&
tag_mask,
247 return ptr()->get_tag(tag);
254 void set_tag(
const string& tag,
256 const bool overwrite_existing =
true) {
257 ptr()->set_tag(tag, value, overwrite_existing);
275 return reinterpret_cast<xact_t *
>(
base_item);
277 const xact_t * ptr()
const {
278 return reinterpret_cast<const xact_t *
>(
base_item);
297 virtual string description();
306 r_posts_list::iterator posts_begin() {
307 return posts.begin();
309 r_posts_list::iterator posts_end() {
314 string payee()
const;
323 return reinterpret_cast<post_t *
>(
base_item);
325 const post_t * ptr()
const {
326 return reinterpret_cast<const post_t *
>(
base_item);
356 virtual string description();
358 string payee()
const;
363 value_t amount()
const;
364 value_t cost()
const;
366 std::size_t count()
const;
387 mutable string _fullname;
400 accounts(
other.accounts),
403 _fullname(
other._fullname) {
410 virtual string description();
414 r_posts_list::iterator posts_begin() {
415 return posts.begin();
417 r_posts_list::iterator posts_end() {
423 string fullname()
const;
431 const string&
fname) {
439template <
typename PostsIterator>
446 journal->add_post(
post);
General utility facilities used by Ledger.
#define TRACE_CTOR(cls, args)
void put_post(property_tree::ptree &pt, const post_t &post)
void put_account(property_tree::ptree &pt, const account_t &acct, function< bool(const account_t &)> pred)
boost::gregorian::date date_t
void put_xact(property_tree::ptree &pt, const xact_t &xact)
intrusive_ptr< op_t > ptr_op_t