1
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
2
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
3
3
<title>LibOFX: file_preproc.cpp File Reference</title>
4
4
<link href="doxygen.css" rel="stylesheet" type="text/css">
5
5
<link href="tabs.css" rel="stylesheet" type="text/css">
7
<!-- Generated by Doxygen 1.4.6 -->
7
<!-- Generated by Doxygen 1.5.3 -->
10
10
<li><a href="main.html"><span>Main Page</span></a></li>
11
11
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
12
12
<li><a href="annotated.html"><span>Data Structures</span></a></li>
13
<li id="current"><a href="files.html"><span>Files</span></a></li>
17
<li><a href="files.html"><span>File List</span></a></li>
18
<li><a href="globals.html"><span>Globals</span></a></li>
13
<li class="current"><a href="files.html"><span>Files</span></a></li>
20
16
<h1>file_preproc.cpp File Reference</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
21
17
File type detection, etc.
23
19
Implements AutoDetection of file type, and handoff to specific parsers.
25
Definition in file <a class="el" href="fx-0_88_82_2lib_2file__preproc_8cpp-source.html">fx-0.8.2/lib/file_preproc.cpp</a>.
20
<p>Definition in file <a class="el" href="fx-0_88_82_2lib_2file__preproc_8cpp-source.html">fx-0.8.2/lib/file_preproc.cpp</a>.</p>
29
25
<a href="fx-0_88_82_2lib_2file__preproc_8cpp-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
31
27
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
32
<tr><td class="memItemLeft" nowrap align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="fx-0_88_82_2lib_2file__preproc_8cpp.html#02f1a3ffa44b420a4c04018a7c609673">libofx_get_file_format_description</a> (const struct <a class="el" href="structLibofxFileFormatInfo.html">LibofxFileFormatInfo</a> format_list[], enum <a class="el" href="inc_2libofx_8h.html#b13650ecdb69a39a228ec00b995ffd84">LibofxFileFormat</a> file_format)</td></tr>
34
<tr><td class="mdescLeft"> </td><td class="mdescRight">get_file_format_description returns a string description of a LibofxFileType. <a href="#02f1a3ffa44b420a4c04018a7c609673"></a><br></td></tr>
35
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum <a class="el" href="inc_2libofx_8h.html#b13650ecdb69a39a228ec00b995ffd84">LibofxFileFormat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="fx-0_88_82_2lib_2file__preproc_8cpp.html#ff38c12e4e1b9537d55f1ef4c4b8556d">libofx_get_file_format_from_str</a> (const struct <a class="el" href="structLibofxFileFormatInfo.html">LibofxFileFormatInfo</a> format_list[], const char *file_type_string)</td></tr>
37
<tr><td class="mdescLeft"> </td><td class="mdescRight">libofx_get_file_type returns a proper enum from a file type string. <a href="#ff38c12e4e1b9537d55f1ef4c4b8556d"></a><br></td></tr>
38
<tr><td class="memItemLeft" nowrap align="right" valign="top">CFCT int </td><td class="memItemRight" valign="bottom"><a class="el" href="fx-0_88_82_2lib_2file__preproc_8cpp.html#a89d39d1d9d75a129183026eca85c967">libofx_proc_file</a> (<a class="el" href="libofx-0_88_82_2inc_2libofx_8h.html#15e5ea23015b0e379679d9e8db1057c0">LibofxContextPtr</a> p_libofx_context, const char *p_filename, <a class="el" href="inc_2libofx_8h.html#b13650ecdb69a39a228ec00b995ffd84">LibofxFileFormat</a> p_file_type)</td></tr>
40
<tr><td class="mdescLeft"> </td><td class="mdescRight">libofx_proc_file is the entry point of the library. <a href="#a89d39d1d9d75a129183026eca85c967"></a><br></td></tr>
41
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum <a class="el" href="inc_2libofx_8h.html#b13650ecdb69a39a228ec00b995ffd84">LibofxFileFormat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="fx-0_88_82_2lib_2file__preproc_8cpp.html#66c966ce570524cb29e39babf2f303d5">libofx_detect_file_type</a> (const char *p_filename)</td></tr>
43
<tr><td class="mdescLeft"> </td><td class="mdescRight">libofx_detect_file_type tries to analyze a file to determine it's format. <a href="#66c966ce570524cb29e39babf2f303d5"></a><br></td></tr>
28
<tr><td class="memItemLeft" nowrap align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="fx-0_88_82_2lib_2file__preproc_8cpp.html#01e232aea6806e09e048c98c94a49b66">libofx_get_file_format_description</a> (const struct <a class="el" href="structLibofxFileFormatInfo.html">LibofxFileFormatInfo</a> format_list[], enum <a class="el" href="inc_2libofx_8h.html#954c5e33f48105c5d932d4842e7736de">LibofxFileFormat</a> file_format)</td></tr>
30
<tr><td class="mdescLeft"> </td><td class="mdescRight">get_file_format_description returns a string description of a LibofxFileType. <a href="#01e232aea6806e09e048c98c94a49b66"></a><br></td></tr>
31
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum <a class="el" href="inc_2libofx_8h.html#954c5e33f48105c5d932d4842e7736de">LibofxFileFormat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="fx-0_88_82_2lib_2file__preproc_8cpp.html#3bf84ecbf6ca512ea73d204c64972dbc">libofx_get_file_format_from_str</a> (const struct <a class="el" href="structLibofxFileFormatInfo.html">LibofxFileFormatInfo</a> format_list[], const char *file_type_string)</td></tr>
33
<tr><td class="mdescLeft"> </td><td class="mdescRight">libofx_get_file_type returns a proper enum from a file type string. <a href="#3bf84ecbf6ca512ea73d204c64972dbc"></a><br></td></tr>
34
<tr><td class="memItemLeft" nowrap align="right" valign="top">CFCT int </td><td class="memItemRight" valign="bottom"><a class="el" href="fx-0_88_82_2lib_2file__preproc_8cpp.html#29b78b5f31a8c75206a8e2b4d665099f">libofx_proc_file</a> (<a class="el" href="libofx-0_89_80_2inc_2libofx_8h.html#cb05196108aab07092d1b4931577b87c">LibofxContextPtr</a> p_libofx_context, const char *p_filename, <a class="el" href="inc_2libofx_8h.html#954c5e33f48105c5d932d4842e7736de">LibofxFileFormat</a> p_file_type)</td></tr>
36
<tr><td class="mdescLeft"> </td><td class="mdescRight">libofx_proc_file is the entry point of the library. <a href="#29b78b5f31a8c75206a8e2b4d665099f"></a><br></td></tr>
37
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum <a class="el" href="inc_2libofx_8h.html#954c5e33f48105c5d932d4842e7736de">LibofxFileFormat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="fx-0_88_82_2lib_2file__preproc_8cpp.html#34e14069654b16390599d24154b1f8d0">libofx_detect_file_type</a> (const char *p_filename)</td></tr>
39
<tr><td class="mdescLeft"> </td><td class="mdescRight">libofx_detect_file_type tries to analyze a file to determine it's format. <a href="#34e14069654b16390599d24154b1f8d0"></a><br></td></tr>
44
40
<tr><td colspan="2"><br><h2>Variables</h2></td></tr>
45
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9eee3543dcaefab6e13ffd2868c07aaa"></a><!-- doxytag: member="fx-0.8.2/lib/file_preproc.cpp::READ_BUFFER_SIZE" ref="9eee3543dcaefab6e13ffd2868c07aaa" args="" -->
46
const unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="fx-0_88_82_2lib_2file__preproc_8cpp.html#9eee3543dcaefab6e13ffd2868c07aaa">READ_BUFFER_SIZE</a> = 1024</td></tr>
41
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3a4f15870bd5573d14fceb17c65162ee"></a><!-- doxytag: member="fx-0.8.2/lib/file_preproc.cpp::READ_BUFFER_SIZE" ref="3a4f15870bd5573d14fceb17c65162ee" args="" -->
42
const unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="fx-0_88_82_2lib_2file__preproc_8cpp.html#3a4f15870bd5573d14fceb17c65162ee">READ_BUFFER_SIZE</a> = 1024</td></tr>
49
45
<hr><h2>Function Documentation</h2>
50
<a class="anchor" name="66c966ce570524cb29e39babf2f303d5"></a><!-- doxytag: member="fx-0.8.2/lib/file_preproc.cpp::libofx_detect_file_type" ref="66c966ce570524cb29e39babf2f303d5" args="(const char *p_filename)" --><p>
51
<table class="mdTable" cellpadding="2" cellspacing="0">
54
<table cellpadding="0" cellspacing="0" border="0">
46
<a class="anchor" name="34e14069654b16390599d24154b1f8d0"></a><!-- doxytag: member="fx-0.8.2/lib/file_preproc.cpp::libofx_detect_file_type" ref="34e14069654b16390599d24154b1f8d0" args="(const char *p_filename)" -->
48
<div class="memproto">
49
<table class="memname">
56
<td class="md" nowrap valign="top">enum <a class="el" href="inc_2libofx_8h.html#b13650ecdb69a39a228ec00b995ffd84">LibofxFileFormat</a> libofx_detect_file_type </td>
57
<td class="md" valign="top">( </td>
58
<td class="md" nowrap valign="top">const char * </td>
59
<td class="mdname1" valign="top" nowrap> <em>p_filename</em> </td>
60
<td class="md" valign="top"> ) </td>
61
<td class="md" nowrap></td>
51
<td class="memname">enum <a class="el" href="inc_2libofx_8h.html#954c5e33f48105c5d932d4842e7736de">LibofxFileFormat</a> libofx_detect_file_type </td>
53
<td class="paramtype">const char * </td>
54
<td class="paramname"> <em>p_filename</em> </td>
55
<td> ) </td>
56
<td width="100%"></td>
67
<table cellspacing="5" cellpadding="0" border="0">
75
63
libofx_detect_file_type tries to analyze a file to determine it's format.
79
67
<tr><td valign="top"></td><td valign="top"><em>p_filename</em> </td><td>File name of the file to process </td></tr>
82
<dl compact><dt><b>Returns:</b></dt><dd>Detected file format, UNKNOWN if unsuccessfull. </dd></dl>
85
Definition at line <a class="el" href="fx-0_88_82_2lib_2file__preproc_8cpp-source.html#l00099">99</a> of file <a class="el" href="fx-0_88_82_2lib_2file__preproc_8cpp-source.html">fx-0.8.2/lib/file_preproc.cpp</a>. </td>
88
<a class="anchor" name="02f1a3ffa44b420a4c04018a7c609673"></a><!-- doxytag: member="fx-0.8.2/lib/file_preproc.cpp::libofx_get_file_format_description" ref="02f1a3ffa44b420a4c04018a7c609673" args="(const struct LibofxFileFormatInfo format_list[], enum LibofxFileFormat file_format)" --><p>
89
<table class="mdTable" cellpadding="2" cellspacing="0">
92
<table cellpadding="0" cellspacing="0" border="0">
94
<td class="md" nowrap valign="top">const char* libofx_get_file_format_description </td>
95
<td class="md" valign="top">( </td>
96
<td class="md" nowrap valign="top">const struct <a class="el" href="structLibofxFileFormatInfo.html">LibofxFileFormatInfo</a> </td>
97
<td class="mdname" nowrap> <em>format_list</em>[], </td>
100
<td class="md" nowrap align="right"></td>
102
<td class="md" nowrap>enum <a class="el" href="inc_2libofx_8h.html#b13650ecdb69a39a228ec00b995ffd84">LibofxFileFormat</a> </td>
103
<td class="mdname" nowrap> <em>file_format</em></td>
107
<td class="md">) </td>
108
<td class="md" colspan="2"></td>
70
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Detected file format, UNKNOWN if unsuccessfull. </dd></dl>
72
<p>Definition at line <a class="el" href="fx-0_88_82_2lib_2file__preproc_8cpp-source.html#l00099">99</a> of file <a class="el" href="fx-0_88_82_2lib_2file__preproc_8cpp-source.html">fx-0.8.2/lib/file_preproc.cpp</a>.</p>
76
<a class="anchor" name="01e232aea6806e09e048c98c94a49b66"></a><!-- doxytag: member="fx-0.8.2/lib/file_preproc.cpp::libofx_get_file_format_description" ref="01e232aea6806e09e048c98c94a49b66" args="(const struct LibofxFileFormatInfo format_list[], enum LibofxFileFormat file_format)" -->
78
<div class="memproto">
79
<table class="memname">
81
<td class="memname">const char* libofx_get_file_format_description </td>
83
<td class="paramtype">const struct <a class="el" href="structLibofxFileFormatInfo.html">LibofxFileFormatInfo</a> </td>
84
<td class="paramname"> <em>format_list</em>[], </td>
87
<td class="paramkey"></td>
89
<td class="paramtype">enum <a class="el" href="inc_2libofx_8h.html#954c5e33f48105c5d932d4842e7736de">LibofxFileFormat</a> </td>
90
<td class="paramname"> <em>file_format</em></td><td> </td>
95
<td></td><td></td><td width="100%"></td>
114
<table cellspacing="5" cellpadding="0" border="0">
122
102
get_file_format_description returns a string description of a LibofxFileType.
124
The file format list in which the format should be looked up, usually LibofxImportFormatList or LibofxExportFormatList The file format which should match one of the formats in the list. <dl compact><dt><b>Returns:</b></dt><dd>null terminated string suitable for debugging output or user communication. </dd></dl>
127
Definition at line <a class="el" href="fx-0_88_82_2lib_2file__preproc_8cpp-source.html#l00037">37</a> of file <a class="el" href="fx-0_88_82_2lib_2file__preproc_8cpp-source.html">fx-0.8.2/lib/file_preproc.cpp</a>. </td>
130
<a class="anchor" name="ff38c12e4e1b9537d55f1ef4c4b8556d"></a><!-- doxytag: member="fx-0.8.2/lib/file_preproc.cpp::libofx_get_file_format_from_str" ref="ff38c12e4e1b9537d55f1ef4c4b8556d" args="(const struct LibofxFileFormatInfo format_list[], const char *file_type_string)" --><p>
131
<table class="mdTable" cellpadding="2" cellspacing="0">
134
<table cellpadding="0" cellspacing="0" border="0">
136
<td class="md" nowrap valign="top">enum <a class="el" href="inc_2libofx_8h.html#b13650ecdb69a39a228ec00b995ffd84">LibofxFileFormat</a> libofx_get_file_format_from_str </td>
137
<td class="md" valign="top">( </td>
138
<td class="md" nowrap valign="top">const struct <a class="el" href="structLibofxFileFormatInfo.html">LibofxFileFormatInfo</a> </td>
139
<td class="mdname" nowrap> <em>format_list</em>[], </td>
142
<td class="md" nowrap align="right"></td>
144
<td class="md" nowrap>const char * </td>
145
<td class="mdname" nowrap> <em>file_type_string</em></td>
149
<td class="md">) </td>
150
<td class="md" colspan="2"></td>
104
The file format list in which the format should be looked up, usually LibofxImportFormatList or LibofxExportFormatList The file format which should match one of the formats in the list. <dl class="return" compact><dt><b>Returns:</b></dt><dd>null terminated string suitable for debugging output or user communication. </dd></dl>
106
<p>Definition at line <a class="el" href="fx-0_88_82_2lib_2file__preproc_8cpp-source.html#l00037">37</a> of file <a class="el" href="fx-0_88_82_2lib_2file__preproc_8cpp-source.html">fx-0.8.2/lib/file_preproc.cpp</a>.</p>
110
<a class="anchor" name="3bf84ecbf6ca512ea73d204c64972dbc"></a><!-- doxytag: member="fx-0.8.2/lib/file_preproc.cpp::libofx_get_file_format_from_str" ref="3bf84ecbf6ca512ea73d204c64972dbc" args="(const struct LibofxFileFormatInfo format_list[], const char *file_type_string)" -->
111
<div class="memitem">
112
<div class="memproto">
113
<table class="memname">
115
<td class="memname">enum <a class="el" href="inc_2libofx_8h.html#954c5e33f48105c5d932d4842e7736de">LibofxFileFormat</a> libofx_get_file_format_from_str </td>
117
<td class="paramtype">const struct <a class="el" href="structLibofxFileFormatInfo.html">LibofxFileFormatInfo</a> </td>
118
<td class="paramname"> <em>format_list</em>[], </td>
121
<td class="paramkey"></td>
123
<td class="paramtype">const char * </td>
124
<td class="paramname"> <em>file_type_string</em></td><td> </td>
129
<td></td><td></td><td width="100%"></td>
156
<table cellspacing="5" cellpadding="0" border="0">
164
136
libofx_get_file_type returns a proper enum from a file type string.
166
The file format list in which the format string should be found, usually LibofxImportFormatList or LibofxExportFormatList The string which contain the file format matching one of the format_name of the list. <dl compact><dt><b>Returns:</b></dt><dd>the file format, or UNKNOWN if the format wasn't recognised. </dd></dl>
169
Definition at line <a class="el" href="fx-0_88_82_2lib_2file__preproc_8cpp-source.html#l00054">54</a> of file <a class="el" href="fx-0_88_82_2lib_2file__preproc_8cpp-source.html">fx-0.8.2/lib/file_preproc.cpp</a>. </td>
172
<a class="anchor" name="a89d39d1d9d75a129183026eca85c967"></a><!-- doxytag: member="fx-0.8.2/lib/file_preproc.cpp::libofx_proc_file" ref="a89d39d1d9d75a129183026eca85c967" args="(LibofxContextPtr p_libofx_context, const char *p_filename, LibofxFileFormat p_file_type)" --><p>
173
<table class="mdTable" cellpadding="2" cellspacing="0">
176
<table cellpadding="0" cellspacing="0" border="0">
178
<td class="md" nowrap valign="top">CFCT int libofx_proc_file </td>
179
<td class="md" valign="top">( </td>
180
<td class="md" nowrap valign="top"><a class="el" href="libofx-0_88_82_2inc_2libofx_8h.html#15e5ea23015b0e379679d9e8db1057c0">LibofxContextPtr</a> </td>
181
<td class="mdname" nowrap> <em>libofx_context</em>, </td>
184
<td class="md" nowrap align="right"></td>
186
<td class="md" nowrap>const char * </td>
187
<td class="mdname" nowrap> <em>p_filename</em>, </td>
190
<td class="md" nowrap align="right"></td>
192
<td class="md" nowrap>enum <a class="el" href="inc_2libofx_8h.html#b13650ecdb69a39a228ec00b995ffd84">LibofxFileFormat</a> </td>
193
<td class="mdname" nowrap> <em>ftype</em></td>
197
<td class="md">) </td>
198
<td class="md" colspan="2"></td>
138
The file format list in which the format string should be found, usually LibofxImportFormatList or LibofxExportFormatList The string which contain the file format matching one of the format_name of the list. <dl class="return" compact><dt><b>Returns:</b></dt><dd>the file format, or UNKNOWN if the format wasn't recognised. </dd></dl>
140
<p>Definition at line <a class="el" href="fx-0_88_82_2lib_2file__preproc_8cpp-source.html#l00054">54</a> of file <a class="el" href="fx-0_88_82_2lib_2file__preproc_8cpp-source.html">fx-0.8.2/lib/file_preproc.cpp</a>.</p>
144
<a class="anchor" name="29b78b5f31a8c75206a8e2b4d665099f"></a><!-- doxytag: member="fx-0.8.2/lib/file_preproc.cpp::libofx_proc_file" ref="29b78b5f31a8c75206a8e2b4d665099f" args="(LibofxContextPtr p_libofx_context, const char *p_filename, LibofxFileFormat p_file_type)" -->
145
<div class="memitem">
146
<div class="memproto">
147
<table class="memname">
149
<td class="memname">CFCT int libofx_proc_file </td>
151
<td class="paramtype"><a class="el" href="libofx-0_89_80_2inc_2libofx_8h.html#cb05196108aab07092d1b4931577b87c">LibofxContextPtr</a> </td>
152
<td class="paramname"> <em>libofx_context</em>, </td>
155
<td class="paramkey"></td>
157
<td class="paramtype">const char * </td>
158
<td class="paramname"> <em>p_filename</em>, </td>
161
<td class="paramkey"></td>
163
<td class="paramtype">enum <a class="el" href="inc_2libofx_8h.html#954c5e33f48105c5d932d4842e7736de">LibofxFileFormat</a> </td>
164
<td class="paramname"> <em>ftype</em></td><td> </td>
169
<td></td><td></td><td width="100%"></td>
204
<table cellspacing="5" cellpadding="0" border="0">
212
176
libofx_proc_file is the entry point of the library.
214
178
libofx_proc_file must be called by the client, with a list of 1 or more OFX files to be parsed in command line format.
216
Definition at line <a class="el" href="fx-0_88_82_2lib_2file__preproc_8cpp-source.html#l00067">67</a> of file <a class="el" href="fx-0_88_82_2lib_2file__preproc_8cpp-source.html">fx-0.8.2/lib/file_preproc.cpp</a>. </td>
219
<hr size="1"><address style="align: right;"><small>Generated on Fri Aug 25 13:25:22 2006 for LibOFX by
179
<p>Definition at line <a class="el" href="fx-0_88_82_2lib_2file__preproc_8cpp-source.html#l00067">67</a> of file <a class="el" href="fx-0_88_82_2lib_2file__preproc_8cpp-source.html">fx-0.8.2/lib/file_preproc.cpp</a>.</p>
183
<hr size="1"><address style="text-align: right;"><small>Generated on Mon Nov 19 20:27:59 2007 for LibOFX by
220
184
<a href="http://www.doxygen.org/index.html">
221
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address>
185
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address>