4 // Fraunhofer Institute for Open Communication Systems (FOKUS)
5 // Competence Center NETwork research (NET), St. Augustin, GERMANY
6 // Stefan Bund <g0dil@berlios.de>
8 // This program is free software; you can redistribute it and/or modify
9 // it under the terms of the GNU General Public License as published by
10 // the Free Software Foundation; either version 2 of the License, or
11 // (at your option) any later version.
13 // This program is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU General Public License for more details.
18 // You should have received a copy of the GNU General Public License
19 // along with this program; if not, write to the
20 // Free Software Foundation, Inc.,
21 // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 \brief Config public header */
26 #ifndef HH_Console_Config_
27 #define HH_Console_Config_ 1
30 #include <boost/utility.hpp>
32 #include "Executor.hh"
34 //#include "Config.mpp"
36 ///////////////////////////////hh.p////////////////////////////////////////
46 ///////////////////////////////////////////////////////////////////////////
49 ///////////////////////////////////////////////////////////////////////////
50 ///\name Structors and default members
54 ConfigBundle(DirectoryNode & root);
56 // default default constructor
57 // default copy constructor
58 // default copy assignment
61 // no conversion constructors
64 ///////////////////////////////////////////////////////////////////////////
66 void add(detail::ConfigSource::ptr source);
68 void parse(); ///< Parse config file
69 /**< All nodes already parsed are skipped */
70 void parse(DirectoryNode & restrict); ///< Parse config file under \a restrict
71 /**< Only nodes which are children of \a restrict are
74 bool complete() const; ///< \c true, if all nodes have been parsed
75 bool parsed(GenericNode & node) const; ///< \c true. if \a node has been parsed
76 void reset(); ///< Reset node parse info state
77 /**< After a call to reset(), all information about already
78 parsed nodes is cleared. Calling parse() will parse the
79 complete config file again. */
86 typedef std::vector<detail::ConfigSource::ptr> Sources;
89 detail::RestrictedExecutor executor_;
93 // hrmpf ... Can't place this into Config.ih ...
99 BundleMixin(DirectoryNode & root);
101 void parse(); ///< Parse config file
102 /**< All nodes already parsed are skipped */
103 void parse(DirectoryNode & restrict); ///< Parse config file under \a restrict
104 /**< Only nodes which are children of \a restrict are
107 bool complete() const; ///< \c true, if all nodes have been parsed
108 bool parsed(GenericNode & node) const; ///< \c true. if \a node has been parsed
109 void reset(); ///< Reset node parse info state
110 /**< After a call to reset(), all information about already
111 parsed nodes is cleared. Calling parse() will parse the
112 complete config file again. */
115 void add(ConfigSource::ptr source);
118 ConfigBundle bundle_;
123 ///////////////////////////////hh.e////////////////////////////////////////
124 #include "Config.cci"
125 //#include "Config.ct"
126 //#include "Config.cti"
133 // comment-column: 40
134 // c-file-style: "senf"
135 // indent-tabs-mode: nil
136 // ispell-local-dictionary: "american"
137 // compile-command: "scons -u test"