110 void warning(
const boost::format& what)
const {
119 filename = filesystem::absolute(filename,
cwd);
121 throw_(std::runtime_error,
122 _f(
"Cannot read journal file %1%") % filename);
124 path parent(filename.parent_path());
137 std::list<parse_context_t> parsing_context;
141 parsing_context.push_front(
parse_context_t(filesystem::current_path()));
144 const path&
cwd = filesystem::current_path()) {
148 const path&
cwd = filesystem::current_path()) {
153 parsing_context.push_front(context);
157 assert(! parsing_context.empty());
158 parsing_context.pop_front();
162 assert(! parsing_context.empty());
163 return parsing_context.front();
General utility facilities used by Ledger.
A utility class for reading encrypted journal data.
datetime_t and date_t objects
boost::filesystem::ifstream ifstream
void warning_func(const string &message)
boost::filesystem::path path
path resolve_path(const path &pathname)
parse_context_t open_for_reading(const path &pathname, const path &cwd)
string file_context(const path &file, std::size_t line)
parse_context_t(const parse_context_t &context)
static const std::size_t MAX_LINE
shared_ptr< std::istream > stream
std::istream::pos_type line_beg_pos
std::istream::pos_type curr_pos
parse_context_t(const path &cwd)
void warning(const boost::format &what) const
void warning(const string &what) const
parse_context_t(shared_ptr< std::istream > _stream, const path &cwd)
void push(const path &pathname, const path &cwd=filesystem::current_path())
void push(shared_ptr< std::istream > stream, const path &cwd=filesystem::current_path())
void push(const parse_context_t &context)
parse_context_t & get_current()
static std::istream * open_stream(const path &filename)