Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / ACE / apps / JAWS3 / jaws3 / Config_File.h
blob4eca8925e95f0afc7069902954018b97e1552750
1 /* -*- c++ -*- */
2 #ifndef JAWS_CONFIG_FILE_H
3 #define JAWS_CONFIG_FILE_H
5 #include "jaws3/Export.h"
7 class JAWS_Config_File;
8 class JAWS_Config_File_Impl;
10 class JAWS_Export JAWS_Config_File
11 // = TITLE
12 // A simple configuration file manager.
14 // = DESCRIPTION
15 // Reads in a configuration file. The syntax of the configuration
16 // file is:
17 // = BEGIN<CODE>
18 // <configuration-file> := <configuration-seq>
20 // <configuration-seq> := <configuration-line> [<configuration-seq>]
22 // <configuration-line> := <name-value-pair-line>
23 // | <comment-line>
25 // <name-value-pair-line> := <name> '=' <value-line>
27 // <name> := <char-seq>
29 // <value-line> := [<char-seq>] <LF> [<continuation-seq>]
31 // <continuation-seq> := <continuation-line> [<continuation-seq>]
33 // <continuation-line> := <LWSP> [<char-seq>] <LF>
35 // <comment-line> := [<comment>] <LF>
37 // <comment> := '#' <char-seq>
39 // <char-seq> := <char> [<char-seq>]
40 // = END<CODE>
41 // No <configuration-line> is to exceed 4094 characters.
43 public:
44 // = Initialization
46 JAWS_Config_File (const ACE_TCHAR *config_file,
47 const ACE_TCHAR *config_dir = "./");
48 // Parse the specified <config_file> in the <config_dir>.
50 // = Searching
52 int find (const ACE_TCHAR *key, const ACE_TCHAR *&value);
53 // Find the <value> associated with <key>.
55 public:
56 void reset ();
57 // Re-read the configuration file.
59 void dump ();
60 // Dump the values of all configuration variables.
62 private:
63 JAWS_Config_File_Impl *impl_;
64 // Opaque implementation.
67 #endif /* JAWS_CONFIG_FILE_H */