LibOFX: ofx_utilities.hh Source File

LibOFX

- Main Page
- Related Pages
- Namespaces
- Data Structures
- Files

- File List
- Globals

ofx_utilities.hh
Go to the documentation of this file.
1 /***************************************************************************
2 ofx_util.h
3 -------------------
4 copyright : (C) 2002 by Benoit Gr�goire
5 email : benoitg@coeus.ca
6 ***************************************************************************/
10 /***************************************************************************
11 * *
12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. *
16 * *
17 ***************************************************************************/
18 #ifndef OFX_UTIL_H
19 #define OFX_UTIL_H
20 #include <string.h>
21 #include <time.h> // for time_t
22 #include "ParserEventGeneratorKit.h"
23 using namespace std;
24 /* This file contains various simple functions for type conversion & al */
25
26 /*wostream &operator<<(wostream &os, SGMLApplication::CharString s); */
27
29 ostream &operator<<(ostream &os, SGMLApplication::CharString s);
30
32 wchar_t* CharStringtowchar_t(SGMLApplication::CharString source, wchar_t *dest);
33
35 string CharStringtostring(const SGMLApplication::CharString source, string &dest);
36
38 string AppendCharStringtostring(const SGMLApplication::CharString source, string &dest);
39
41 time_t ofxdate_to_time_t(const string ofxdate);
42
44 double ofxamount_to_double(const string ofxamount);
45
47 string strip_whitespace(const string para_string);
48
49 int mkTempFileName(const char *tmpl, char *buffer, unsigned int size);
50
51 #endif
operator<<
ostream & operator<<(ostream &os, SGMLApplication::CharString s)
Convert OpenSP CharString to a C++ stream.
strip_whitespace
string strip_whitespace(const string para_string)
Sanitize a string coming from OpenSP.
Definition: ofx_utilities.cpp:228
CharStringtostring
string CharStringtostring(const SGMLApplication::CharString source, string &dest)
Convert OpenSP CharString to a C++ STL string.
Definition: ofx_utilities.cpp:70
AppendCharStringtostring
string AppendCharStringtostring(const SGMLApplication::CharString source, string &dest)
Append an OpenSP CharString to an existing C++ STL string.
Definition: ofx_utilities.cpp:83
ofxamount_to_double
double ofxamount_to_double(const string ofxamount)
Convert OFX amount of money to double float.
Definition: ofx_utilities.cpp:205
ofxdate_to_time_t
time_t ofxdate_to_time_t(const string ofxdate)
Convert a C++ string containing a time in OFX format to a C time_t.
Definition: ofx_utilities.cpp:108
CharStringtowchar_t
wchar_t * CharStringtowchar_t(SGMLApplication::CharString source, wchar_t *dest)
Convert OpenSP CharString and put it in the C wchar_t string provided.