Search:

SENF Extensible Network Framework

  • Home
  • Download
  • Wiki
  • BerliOS
  • ChangeLog
  • Browse SVN
  • Bug Tracker
  • Overview
  • Examples
  • HowTos
  • Glossary
  • PPI
  • Packets
  • Scheduler
  • Socket
  • Utils
  • Console
  • Daemon
  • Logger
  • Termlib
  • Main Page
  • Related Pages
  • Modules
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

Config.cci

Go to the documentation of this file.
00001 // $Id: Config.cci 1742 2010-11-04 14:51:56Z g0dil $
00002 //
00003 // Copyright (C) 2008
00004 // Fraunhofer (FOKUS)
00005 // Competence Center NETwork research (NET), St. Augustin, GERMANY
00006 //     Stefan Bund <g0dil@berlios.de>
00007 //
00008 // This program is free software; you can redistribute it and/or modify
00009 // it under the terms of the GNU General Public License as published by
00010 // the Free Software Foundation; either version 2 of the License, or
00011 // (at your option) any later version.
00012 //
00013 // This program is distributed in the hope that it will be useful,
00014 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016 // GNU General Public License for more details.
00017 //
00018 // You should have received a copy of the GNU General Public License
00019 // along with this program; if not, write to the
00020 // Free Software Foundation, Inc.,
00021 // 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00022 
00026 #include "Config.ih"
00027 
00028 // Custom includes
00029 
00030 #define prefix_ inline
00031 //-/////////////////////////////////////////////////////////////////////////////////////////////////
00032 
00033 //-/////////////////////////////////////////////////////////////////////////////////////////////////
00034 // senf::console::detail::RestrictedExecutor
00035 
00036 prefix_ bool senf::console::detail::RestrictedExecutor::complete()
00037     const
00038 {
00039     return parsedNodes_.size() == 1
00040         && ! parsedNodes_[0].expired()
00041         && *parsedNodes_[0].lock() == executor_.chroot();
00042 }
00043 
00044 prefix_ void senf::console::detail::RestrictedExecutor::reset()
00045 {
00046     parsedNodes_.clear();
00047 }
00048 
00049 prefix_ senf::console::DirectoryNode & senf::console::detail::RestrictedExecutor::root()
00050     const
00051 {
00052     return executor_.chroot();
00053 }
00054 
00055 prefix_ void senf::console::detail::RestrictedExecutor::chroot(DirectoryNode & node)
00056 {
00057     executor_.chroot(node);
00058 }
00059 
00060 prefix_ std::ostream & senf::console::detail::RestrictedExecutor::stream()
00061 {
00062     return stream_;
00063 }
00064 
00065 //-/////////////////////////////////////////////////////////////////////////////////////////////////
00066 // senf::console::ConfigBundle
00067 
00068 prefix_ senf::console::ConfigBundle::ConfigBundle()
00069 {}
00070 
00071 prefix_ senf::console::ConfigBundle::ConfigBundle(DirectoryNode & root)
00072     : executor_ (root)
00073 {}
00074 
00075 prefix_ bool senf::console::ConfigBundle::complete()
00076     const
00077 {
00078     return executor_.complete();
00079 }
00080 
00081 prefix_ bool senf::console::ConfigBundle::parsed(GenericNode & node)
00082     const
00083 {
00084     return executor_.parsed(node);
00085 }
00086 
00087 prefix_ void senf::console::ConfigBundle::reset()
00088 {
00089     executor_.reset();
00090 }
00091 
00092 prefix_ senf::console::DirectoryNode & senf::console::ConfigBundle::root()
00093     const
00094 {
00095     return executor_.root();
00096 }
00097 
00098 prefix_ void senf::console::ConfigBundle::chroot(DirectoryNode & node)
00099 {
00100     executor_.chroot(node);
00101 }
00102 
00103 //-/////////////////////////////////////////////////////////////////////////////////////////////////
00104 // senf::console::detail::ConfigSource
00105 
00106 prefix_ void senf::console::detail::ConfigSource::parse(RestrictedExecutor & executor)
00107 {
00108     v_parse(executor);
00109 }
00110 
00111 //-/////////////////////////////////////////////////////////////////////////////////////////////////
00112 // senf::console::detail::BundleMixin
00113 
00114 prefix_ senf::console::detail::BundleMixin::BundleMixin()
00115 {}
00116 
00117 prefix_ senf::console::detail::BundleMixin::BundleMixin(DirectoryNode & root)
00118     : bundle_ (root)
00119 {}
00120 
00121 prefix_ void senf::console::detail::BundleMixin::parse()
00122 {
00123     bundle_.parse();
00124 }
00125 
00126 prefix_ void senf::console::detail::BundleMixin::parse(DirectoryNode & restrict)
00127 {
00128     bundle_.parse(restrict);
00129 }
00130 
00131 prefix_ bool senf::console::detail::BundleMixin::complete()
00132     const
00133 {
00134     return bundle_.complete();
00135 }
00136 
00137 prefix_ bool senf::console::detail::BundleMixin::parsed(GenericNode & node)
00138     const
00139 {
00140     return bundle_.parsed(node);
00141 }
00142 
00143 prefix_ void senf::console::detail::BundleMixin::reset()
00144 {
00145     bundle_.reset();
00146 }
00147 
00148 //-/////////////////////////////////////////////////////////////////////////////////////////////////
00149 #undef prefix_
00150 
00151 
00152 // Local Variables:
00153 // mode: c++
00154 // fill-column: 100
00155 // comment-column: 40
00156 // c-file-style: "senf"
00157 // indent-tabs-mode: nil
00158 // ispell-local-dictionary: "american"
00159 // compile-command: "scons -u test"
00160 // End:

Contact: senf-dev@lists.berlios.de | © 2006-2010 Fraunhofer Institute for Open Communication Systems, Network Research