src/core/config.h
changeset 3787 985324e2caaa
parent 3763 e46e361a4262
child 3999 7a1a377c3900
     1.1 --- a/src/core/config.h	Fri Oct 17 14:15:52 2008 +0200
     1.2 +++ b/src/core/config.h	Fri Oct 24 12:35:28 2008 +0200
     1.3 @@ -22,6 +22,7 @@
     1.4  
     1.5  #include "ptr.h"
     1.6  #include <string>
     1.7 +#include <vector>
     1.8  
     1.9  namespace ns3 {
    1.10  
    1.11 @@ -110,6 +111,35 @@
    1.12   */
    1.13  void Disconnect (std::string path, const CallbackBase &cb);
    1.14  
    1.15 +class MatchContainer
    1.16 +{
    1.17 +public:
    1.18 +  typedef std::vector<Ptr<Object> >::const_iterator Iterator;
    1.19 +  MatchContainer ();
    1.20 +  MatchContainer (const std::vector<Ptr<Object> > &objects, 
    1.21 +                  const std::vector<std::string> &contexts, 
    1.22 +                  std::string path);
    1.23 +
    1.24 +  MatchContainer::Iterator Begin (void) const;
    1.25 +  MatchContainer::Iterator End (void) const;
    1.26 +  uint32_t GetN (void) const;
    1.27 +  Ptr<Object> Get (uint32_t i) const;
    1.28 +  std::string GetMatchedPath (uint32_t i) const;
    1.29 +  std::string GetPath (void) const;
    1.30 +
    1.31 +  void Set (std::string name, const AttributeValue &value);
    1.32 +  void Connect (std::string name, const CallbackBase &cb);
    1.33 +  void ConnectWithoutContext (std::string name, const CallbackBase &cb);
    1.34 +  void Disconnect (std::string name, const CallbackBase &cb);
    1.35 +  void DisconnectWithoutContext (std::string name, const CallbackBase &cb);
    1.36 +private:
    1.37 +  std::vector<Ptr<Object> > m_objects;
    1.38 +  std::vector<std::string> m_contexts;
    1.39 +  std::string m_path;
    1.40 +};
    1.41 +
    1.42 +MatchContainer LookupMatches (std::string path);
    1.43 +
    1.44  /**
    1.45   * \param obj a new root object
    1.46   *