src/core/trace-resolver.h
changeset 1370 d5339e1c95df
parent 1368 e75dc1a2a5fb
child 1371 bebf690257c9
equal deleted inserted replaced
1369:ca4667a61c57 1370:d5339e1c95df
    69    * This method should behave as Connect.
    69    * This method should behave as Connect.
    70    */
    70    */
    71   virtual void Disconnect (std::string path, CallbackBase const &cb) = 0;
    71   virtual void Disconnect (std::string path, CallbackBase const &cb) = 0;
    72 
    72 
    73   virtual void PrintAvailable (std::string path, const TraceContext &context, std::ostream &os) = 0;
    73   virtual void PrintAvailable (std::string path, const TraceContext &context, std::ostream &os) = 0;
       
    74 
       
    75 
       
    76   class SourceCollection
       
    77   {
       
    78   public:
       
    79     void Print (std::ostream &os) const;
       
    80     void AddUnique (std::string path, const TraceContext &context,
       
    81                     std::string help);
       
    82   private:
       
    83     struct Source
       
    84     {
       
    85       std::string path;
       
    86       TraceContext context;
       
    87       std::string help;
       
    88     };
       
    89     typedef std::vector<struct Source> SourceVector;
       
    90     SourceVector m_sources;
       
    91   };
       
    92   virtual void CollectSources (std::string path, const TraceContext &context, 
       
    93                                SourceCollection *collection) {}
    74 protected:
    94 protected:
    75   /**
    95   /**
    76    * \param path a namespace path
    96    * \param path a namespace path
    77    * \returns the initial element of the path.
    97    * \returns the initial element of the path.
    78    *
    98    *