GnuCash c935c2f+
Loading...
Searching...
No Matches
csv-export-helpers.hpp
1/*******************************************************************\
2 * This program is free software; you can redistribute it and/or *
3 * modify it under the terms of the GNU General Public License as *
4 * published by the Free Software Foundation; either version 2 of *
5 * the License, or (at your option) any later version. *
6 * *
7 * This program is distributed in the hope that it will be useful, *
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
10 * GNU General Public License for more details. *
11 * *
12 * You should have received a copy of the GNU General Public License*
13 * along with this program; if not, contact: *
14 * *
15 * Free Software Foundation Voice: +1-617-542-5942 *
16 * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
17 * Boston, MA 02110-1301, USA gnu@gnu.org *
18\********************************************************************/
19
20#ifndef CSV_EXPORT_HELPERS
21#define CSV_EXPORT_HELPERS
22
23#include <config.h>
24#include "Account.h"
25
26#include <string>
27#include <cstdio>
28#include <fstream>
29#include <vector>
30
31using StringVec = std::vector<std::string>;
32
33// add a csv-formatted line onto output stream. charsvec is the vector
34// of std::strings, sep is the separator string. use_quotes to always
35// "quote"; some strings may be quoted anyway if contains separator
36// string, quote, \r or \n. This function returns a bool indicating
37// success.
38bool gnc_csv_add_line (std::ostream& ss, const StringVec& charsvec,
39 bool use_quotes, const char* sep);
40
41std::string account_get_fullname_str (Account*);
42
43#endif
44
Account handling public routines.
STRUCTS.