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 template <class Source>
67 Source & add(boost::intrusive_ptr<Source> source);
69 void parse(); ///< Parse config file
70 /**< All nodes already parsed are skipped */
71 void parse(DirectoryNode & restrict); ///< Parse config file under \a restrict
72 /**< Only nodes which are children of \a restrict are
75 bool complete() const; ///< \c true, if all nodes have been parsed
76 bool parsed(GenericNode & node) const; ///< \c true. if \a node has been parsed
77 void reset(); ///< Reset node parse info state
78 /**< After a call to reset(), all information about already
79 parsed nodes is cleared. Calling parse() will parse the
80 complete config file again. */
87 typedef std::vector<detail::ConfigSource::ptr> Sources;
90 detail::RestrictedExecutor executor_;
94 // hrmpf ... Can't place this into Config.ih ...
100 BundleMixin(DirectoryNode & root);
102 void parse(); ///< Parse config file
103 /**< All nodes already parsed are skipped */
104 void parse(DirectoryNode & restrict); ///< Parse config file under \a restrict
105 /**< Only nodes which are children of \a restrict are
108 bool complete() const; ///< \c true, if all nodes have been parsed
109 bool parsed(GenericNode & node) const; ///< \c true. if \a node has been parsed
110 void reset(); ///< Reset node parse info state
111 /**< After a call to reset(), all information about already
112 parsed nodes is cleared. Calling parse() will parse the
113 complete config file again. */
116 template <class Source>
117 Source & add(boost::intrusive_ptr<Source> source);
120 ConfigBundle bundle_;
125 ///////////////////////////////hh.e////////////////////////////////////////
126 #include "Config.cci"
127 //#include "Config.ct"
128 #include "Config.cti"
135 // comment-column: 40
136 // c-file-style: "senf"
137 // indent-tabs-mode: nil
138 // ispell-local-dictionary: "american"
139 // compile-command: "scons -u test"