IDependencyInfo.h
1 
27 #ifndef COSMO_DEPENDENCY_INFO_INTERFACE_H
28 #define COSMO_DEPENDENCY_INFO_INTERFACE_H
29 
30 #include <Pt/Cosmo/Api.h>
31 
32 #include <string>
33 
34 namespace Pt {
35 
36 namespace Cosmo {
37 
47 {
48  public:
51  virtual ~IDependencyInfo()
52  {}
53 
56  const std::string& featureId() const
57  {
58  return onGetFeatureId();
59  }
60 
63  const std::string& instanceId() const
64  {
65  return onGetInstanceId();
66  }
67 
70  bool isResolved() const
71  {
72  return onIsResolved();
73  }
74 
75  void setTarget(const std::string& instanceId,
76  bool isResolved)
77  {
78  onSetTarget(instanceId, isResolved);
79  }
80 
81  protected:
82  virtual const std::string& onGetFeatureId() const = 0;
83 
84  virtual const std::string& onGetInstanceId() const = 0;
85 
86  virtual bool onIsResolved() const = 0;
87 
88  virtual void onSetTarget(const std::string& instanceId,
89  bool isResolved) = 0;
90 };
91 
92 } // namespace Cosmo
93 
94 } // namespace Pt
95 
96 #endif
Core module.
Definition: Allocator.h:33
Dependency information.
Definition: IDependencyInfo.h:47
const std::string & featureId() const
Returns the feature ID of the dependency.
Definition: IDependencyInfo.h:56
bool isResolved() const
Returns true if the dependency is resolved.
Definition: IDependencyInfo.h:70
const std::string & instanceId() const
Returns the instance ID of the resolved component.
Definition: IDependencyInfo.h:63
virtual ~IDependencyInfo()
Destructor.
Definition: IDependencyInfo.h:51