1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106
|
.TH ACE_Ini_ImpExp 3 "1 Dec 2001" "ACE" \" -*- nroff -*-
.ad l
.nh
.SH NAME
ACE_Ini_ImpExp \- Imports the configuration database from filename as strings. Allows non-typed values. (no #, dword: hex:, etc. prefixes) and skips whitespace (tabs and spaces) as in standard .ini and .conf files. Values (to right of equal sign) can be double quote delimited to embed tabs and spaces in the string. Caller must convert string to type.
.SH SYNOPSIS
.br
.PP
\fC#include <Configuration_Import_Export.h>\fR
.PP
Inherits \fBACE_Config_ImpExp_Base\fR.
.PP
.SS Public Methods
.in +1c
.ti -1c
.RI "\fBACE_Ini_ImpExp\fR (\fBACE_Configuration\fR&)"
.br
.ti -1c
.RI "virtual \fB~ACE_Ini_ImpExp\fR (void)"
.br
.ti -1c
.RI "virtual int \fBimport_config\fR (const \fBACE_TCHAR\fR* filename)"
.br
.ti -1c
.RI "virtual int \fBexport_config\fR (const \fBACE_TCHAR\fR* filename)"
.br
.in -1c
.SS Private Methods
.in +1c
.ti -1c
.RI "int \fBexport_section\fR (const \fBACE_Configuration_Section_Key\fR& section, const ACE_TString& path, FILE* out)"
.br
.ti -1c
.RI "const \fBACE_TCHAR\fR* \fBskip_whitespace\fR (const \fBACE_TCHAR\fR *src)"
.br
.ti -1c
.RI "int \fBstring_has_white_space\fR (const \fBACE_TCHAR\fR *string_value)"
.br
.ti -1c
.RI "\fBACE_Ini_ImpExp\fR (const ACE_Ini_ImpExp&)"
.br
.ti -1c
.RI "ACE_Ini_ImpExp& \fBoperator=\fR (const ACE_Ini_ImpExp&)"
.br
.in -1c
.SH DETAILED DESCRIPTION
.PP
Imports the configuration database from filename as strings. Allows non-typed values. (no #, dword: hex:, etc. prefixes) and skips whitespace (tabs and spaces) as in standard .ini and .conf files. Values (to right of equal sign) can be double quote delimited to embed tabs and spaces in the string. Caller must convert string to type.
.PP
.PP
This method allows for lines in the .ini or .conf file like this:
.PP
TimeToLive = 100 Delay = FALSE Flags = FF34 Heading = "\fBACE\fR - Adaptive Communication Environment"
.PP
(note leading whitespace (tabs) in examples below)
.PP
SeekIndex = 14 TraceLevel = 6 # Can comment lines like this Justification = left_justified
.PP
The caller can then retrieve the string with the regular <get_string_value> function and convert the string to the desired data type.
.PP
.TP
* - * - * -
.PP
\fB\fBTodo: \fR\fR
.in +1c
Strings with embedded newlines cause the import to fail Strings with embedded quotes " cause the import to fail Importing/exporting for values in the root section does not work Add dynamic buffer when importing. currently it will not allow importing of values greater than a fixed ammount (4096 bytes)
.PP
.SH CONSTRUCTOR & DESTRUCTOR DOCUMENTATION
.PP
.SS ACE_Ini_ImpExp::ACE_Ini_ImpExp (\fBACE_Configuration\fR &)
.PP
Construction
.SS ACE_Ini_ImpExp::~ACE_Ini_ImpExp (void)\fC [virtual]\fR
.PP
Destructor
.SS ACE_Ini_ImpExp::ACE_Ini_ImpExp (const ACE_Ini_ImpExp &)\fC [private]\fR
.PP
.SH MEMBER FUNCTION DOCUMENTATION
.PP
.SS int ACE_Ini_ImpExp::export_config (const \fBACE_TCHAR\fR * filename)\fC [virtual]\fR
.PP
This method exports the entire configuration database to <filename>. Once the file is opened this method calls 'export_section' passing the root section.
.PP
Reimplemented from \fBACE_Config_ImpExp_Base\fR.
.SS int ACE_Ini_ImpExp::export_section (const \fBACE_Configuration_Section_Key\fR & section, const ACE_TString & path, FILE * out)\fC [private]\fR
.PP
Method provided by derived classes in order to write one section to the file specified. Called by export_config when exporting the entire configuration object.
.SS int ACE_Ini_ImpExp::import_config (const \fBACE_TCHAR\fR * filename)\fC [virtual]\fR
.PP
Imports the configuration database from filename. No existing data is removed.
.PP
Reimplemented from \fBACE_Config_ImpExp_Base\fR.
.SS ACE_Ini_ImpExp& ACE_Ini_ImpExp::operator= (const ACE_Ini_ImpExp &)\fC [private]\fR
.PP
.SS const \fBACE_TCHAR\fR * ACE_Ini_ImpExp::skip_whitespace (const \fBACE_TCHAR\fR * src)\fC [private]\fR
.PP
Method to skip whitespaces in a string. Whitespace is defined as: spaces (' ') and tabs ('\\t'). Returns a pointer to the first non-whitespace character in the buffer provided. It does return null ('\\0') if it is reached
.SS int ACE_Ini_ImpExp::string_has_white_space (const \fBACE_TCHAR\fR * string_value)\fC [private]\fR
.PP
Looks in provided string for whitespace. Whitespace is defined as spaces (' ') and tabs ('\\t'). Returns true if found and false if not found
.SH AUTHOR
.PP
Generated automatically by Doxygen for ACE from the source code.
|