Config::Connect -> Config::ConnectWithoutContext && Config::ConnectWithContext -> Config::Connect
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
3 * Copyright (c) 2008 INRIA
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation;
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 * Authors: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
23 #include "attribute.h"
33 * \param path a path to match attributes.
34 * \param value the value to set in all matching attributes.
36 * This function will attempt to find attributes which
37 * match the input path and will then set their value to the input
40 void Set (std::string path, Attribute value);
42 * \param name the full name of the attribute
43 * \param value the value to set.
45 * This method overrides the initial value of the
46 * matching attribute. This method cannot fail: it will
47 * crash if the input attribute name or value is invalid.
49 void SetDefault (std::string name, Attribute value);
51 * \param name the full name of the attribute
52 * \param value the value to set.
53 * \returns true if the value was set successfully, false otherwise.
55 * This method overrides the initial value of the
58 bool SetDefaultFailSafe (std::string name, Attribute value);
60 * \param name the name of the requested GlobalValue.
61 * \param value the value to set
63 * This method is equivalent to GlobalValue::Bind
65 void SetGlobal (std::string name, Attribute value);
67 * \param name the name of the requested GlobalValue.
68 * \param value the value to set
70 * This method is equivalent to GlobalValue::BindFailSafe
72 bool SetGlobalFailSafe (std::string name, Attribute value);
74 * \param path a path to match trace sources.
75 * \param cb the callback to connect to the matching trace sources.
77 * This function will attempt to find all trace sources which
78 * match the input path and will then connect the input callback
81 void ConnectWithoutContext (std::string path, const CallbackBase &cb);
83 * \param path a path to match trace sources.
84 * \param cb the callback to disconnect to the matching trace sources.
86 * This function undoes the work of Config::Connect.
88 void DisconnectWithoutContext (std::string path, const CallbackBase &cb);
90 * \param path a path to match trace sources.
91 * \param cb the callback to connect to the matching trace sources.
93 * This function will attempt to find all trace sources which
94 * match the input path and will then connect the input callback
95 * to them in such a way that the callback will receive an extra
96 * context string upon trace event notification.
98 void Connect (std::string path, const CallbackBase &cb);
100 * \param path a path to match trace sources.
101 * \param cb the callback to connect to the matching trace sources.
103 * This function undoes the work of Config::ConnectWithContext.
105 void Disconnect (std::string path, const CallbackBase &cb);
108 * \param obj a new root object
110 * Each root object is used during path matching as
111 * the root of the path by Config::Connect, and Config::Set.
113 void RegisterRootNamespaceObject (Ptr<Object> obj);
115 * \param obj a new root object
117 * This function undoes the work of Config::RegisterRootNamespaceObject.
119 void UnregisterRootNamespaceObject (Ptr<Object> obj);
121 } // namespace Config
125 #endif /* CONFIG_H */