X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=senf%2FUtils%2FConsole%2FExample.dox;h=1c425fc672842c1ece4cbe14afeaf949302b9ec0;hb=f08685d9795a3be20ce5c7a337087358ccd77eb5;hp=c571c36a923ace220b7aba8097b8cb361edfe5aa;hpb=601d1f509f5bb24df167a4dd5a20da67a0af9af8;p=senf.git diff --git a/senf/Utils/Console/Example.dox b/senf/Utils/Console/Example.dox index c571c36..1c425fc 100644 --- a/senf/Utils/Console/Example.dox +++ b/senf/Utils/Console/Example.dox @@ -1,24 +1,29 @@ // $Id$ // -// Copyright (C) 2008 +// Copyright (C) 2008 // Fraunhofer Institute for Open Communication Systems (FOKUS) -// Competence Center NETwork research (NET), St. Augustin, GERMANY -// Stefan Bund // -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. +// The contents of this file are subject to the Fraunhofer FOKUS Public License +// Version 1.0 (the "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// http://senf.berlios.de/license.html // -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. +// The Fraunhofer FOKUS Public License Version 1.0 is based on, +// but modifies the Mozilla Public License Version 1.1. +// See the full license text for the amendments. // -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the -// Free Software Foundation, Inc., -// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// Software distributed under the License is distributed on an "AS IS" basis, +// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +// for the specific language governing rights and limitations under the License. +// +// The Original Code is Fraunhofer FOKUS code. +// +// The Initial Developer of the Original Code is Fraunhofer-Gesellschaft e.V. +// (registered association), Hansastraße 27 c, 80686 Munich, Germany. +// +// Contributor(s): +// Stefan Bund + /** \page console_testserver Test Server @@ -66,7 +71,7 @@ built-in command at the console. The next callback accesses the client instance directly to manipulate the logging: - + \until } The senf::console::Client instance can be accessed using the senf::console::Client::get() helper @@ -74,12 +79,12 @@ messages to the console instance. We now define \c main() which initializes the node tree and starts the console server - + \until route - + Here we just setup more verbose logging and set \c SIGPIPE signals to be ignored. \c SIGPIPE's are a pain and really should be disabled. - + \until settings This shows, how to set the top-level documentation and create a new subdirectory. @@ -90,24 +95,24 @@ directly. All the add commands return such a node reference of the correct type (this is a lie, but it works like this anyways and it's an implementation detail that must not concern you here). - + Instead of creating a new directory directly and later sotring a reference, it is better to use \c senf::console::ScopedDirectory<> like this: \until functions - + This will automatically remove the node from the tree when the \c senf::console::ScopedDirectory instance is destroyed. It also protects against the problem of dangling references: When using a plain reference, removing the directory from the tree will destroy the node. The reference however will still reference the (now nonexistent) directory and any access via the reference - will crash the program. + will crash the program. The next statements add commands to the various directories declared so far - + \until Example We now continue by creating an instance of our test class \c TestObject - + \until Example We add that objects directory to the \c test dir. We now have created a directory structure like