dox doc
authorMathieu Lacage <mathieu.lacage@sophia.inria.fr>
Mon, 10 Mar 2008 14:51:15 -0700
changeset 2585b74a38fc7a9a
parent 2584 5011c132ed6c
child 2586 50d78910a997
dox doc
src/core/config.h
     1.1 --- a/src/core/config.h	Mon Mar 10 14:05:26 2008 -0700
     1.2 +++ b/src/core/config.h	Mon Mar 10 14:51:15 2008 -0700
     1.3 @@ -10,17 +10,93 @@
     1.4  
     1.5  namespace Config {
     1.6  
     1.7 +/**
     1.8 + * \param path a path to match attributes.
     1.9 + * \param value the value to set in all matching attributes.
    1.10 + *
    1.11 + * This function will attempt to find attributes which
    1.12 + * match the input path and will then set their value to the input
    1.13 + * value.
    1.14 + */
    1.15  void Set (std::string path, Attribute value);
    1.16 +/**
    1.17 + * \param name the full name of the attribute
    1.18 + * \param value the value to set.
    1.19 + *
    1.20 + * This method overrides the initial value of the 
    1.21 + * matching attribute. This method cannot fail: it will
    1.22 + * crash if the input attribute name or value is invalid.
    1.23 + */
    1.24  void SetDefault (std::string name, Attribute value);
    1.25 +/**
    1.26 + * \param name the full name of the attribute
    1.27 + * \param value the value to set.
    1.28 + * \returns true if the value was set successfully, false otherwise.
    1.29 + *
    1.30 + * This method overrides the initial value of the 
    1.31 + * matching attribute. 
    1.32 + */
    1.33  bool SetDefaultFailSafe (std::string name, Attribute value);
    1.34 +/**
    1.35 + * \param name the name of the requested GlobalValue.
    1.36 + * \param value the value to set
    1.37 + *
    1.38 + * This method is equivalent to GlobalValue::Bind
    1.39 + */
    1.40  void SetGlobal (std::string name, Attribute value);
    1.41 +/**
    1.42 + * \param name the name of the requested GlobalValue.
    1.43 + * \param value the value to set
    1.44 + *
    1.45 + * This method is equivalent to GlobalValue::BindFailSafe
    1.46 + */
    1.47  bool SetGlobalFailSafe (std::string name, Attribute value);
    1.48 +/**
    1.49 + * \param path a path to match trace sources.
    1.50 + * \param cb the callback to connect to the matching trace sources.
    1.51 + *
    1.52 + * This function will attempt to find all trace sources which
    1.53 + * match the input path and will then connect the input callback
    1.54 + * to them.
    1.55 + */
    1.56  void Connect (std::string path, const CallbackBase &cb);
    1.57 +/**
    1.58 + * \param path a path to match trace sources.
    1.59 + * \param cb the callback to disconnect to the matching trace sources.
    1.60 + *
    1.61 + * This function undoes the work of Config::Connect.
    1.62 + */
    1.63  void Disconnect (std::string path, const CallbackBase &cb);
    1.64 +/**
    1.65 + * \param path a path to match trace sources.
    1.66 + * \param cb the callback to connect to the matching trace sources.
    1.67 + *
    1.68 + * This function will attempt to find all trace sources which
    1.69 + * match the input path and will then connect the input callback
    1.70 + * to them in such a way that the callback will receive an extra
    1.71 + * context string upon trace event notification.
    1.72 + */
    1.73  void ConnectWithContext (std::string path, const CallbackBase &cb);
    1.74 +/**
    1.75 + * \param path a path to match trace sources.
    1.76 + * \param cb the callback to connect to the matching trace sources.
    1.77 + *
    1.78 + * This function undoes the work of Config::ConnectWithContext.
    1.79 + */
    1.80  void DisconnectWithContext (std::string path, const CallbackBase &cb);
    1.81  
    1.82 +/**
    1.83 + * \param obj a new root object
    1.84 + *
    1.85 + * Each root object is used during path matching as
    1.86 + * the root of the path by Config::Connect, and Config::Set.
    1.87 + */
    1.88  void RegisterRootNamespaceObject (Ptr<Object> obj);
    1.89 +/**
    1.90 + * \param obj a new root object
    1.91 + *
    1.92 + * This function undoes the work of Config::RegisterRootNamespaceObject.
    1.93 + */
    1.94  void UnregisterRootNamespaceObject (Ptr<Object> obj);
    1.95  
    1.96  } // namespace Config