.
This commit is contained in:
@@ -49,7 +49,7 @@ class RulePackageImpl;
|
||||
|
||||
class RuleEngineServiceImpl :
|
||||
public virtual RuleEngineService,
|
||||
public virtual implementation::Service<RuleEngineServiceImpl> {
|
||||
public implementation::Service<RuleEngineServiceImpl> {
|
||||
|
||||
private:
|
||||
typedef std::map<std::string, std::shared_ptr<rules::RulePackageImpl>> rulePkgMap_t;
|
||||
|
||||
@@ -65,7 +65,7 @@ public:
|
||||
static std::shared_ptr<RuleImpl> createRule(RulePackageImpl* parent, const std::string name, Variant raw);
|
||||
|
||||
virtual RulePackage* getParent() noexcept {
|
||||
return dynamic_cast<RulePackage*>(parent);
|
||||
return parent->castPtr<RulePackage>();
|
||||
}
|
||||
|
||||
virtual const std::string& getName() noexcept {
|
||||
|
||||
@@ -65,7 +65,7 @@ public:
|
||||
const std::string language;
|
||||
|
||||
virtual service::ruleengine::RuleEngineService* getParent() noexcept override {
|
||||
return dynamic_cast<service::ruleengine::RuleEngineService*>(parent);
|
||||
return parent->castPtr<service::ruleengine::RuleEngineService>();
|
||||
}
|
||||
|
||||
virtual const std::string& getName() noexcept override {
|
||||
|
||||
+3
-3
@@ -75,7 +75,7 @@ public:
|
||||
|
||||
|
||||
class DeviceStatusMsgConditionFactory
|
||||
: public RuleConditionFactory {
|
||||
: public virtual RuleConditionFactory {
|
||||
public:
|
||||
virtual std::shared_ptr<RuleCondition> createCondition(rules::Rule* parent, const Variant& raw) override;
|
||||
};
|
||||
@@ -98,7 +98,7 @@ public:
|
||||
|
||||
|
||||
class DeviceCommandMsgConditionFactory
|
||||
: public RuleConditionFactory {
|
||||
: public virtual RuleConditionFactory {
|
||||
public:
|
||||
virtual std::shared_ptr<RuleCondition> createCondition(rules::Rule* parent, const Variant& raw) override;
|
||||
};
|
||||
@@ -125,7 +125,7 @@ public:
|
||||
|
||||
|
||||
class DeviceStateChangeConditionFactory
|
||||
: public RuleConditionFactory {
|
||||
: public virtual RuleConditionFactory {
|
||||
public:
|
||||
virtual std::shared_ptr<RuleCondition> createCondition(rules::Rule* parent, const Variant& raw) override;
|
||||
};
|
||||
|
||||
+1
-1
@@ -42,7 +42,7 @@ public:
|
||||
|
||||
|
||||
class LogicalAndConditionFactory
|
||||
: public RuleConditionFactory {
|
||||
: public virtual RuleConditionFactory {
|
||||
public:
|
||||
virtual std::shared_ptr<RuleCondition> createCondition(rules::Rule* parent, const Variant& raw) override;
|
||||
};
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ public:
|
||||
|
||||
|
||||
class LogicalOrConditionFactory
|
||||
: public RuleConditionFactory {
|
||||
: public virtual RuleConditionFactory {
|
||||
public:
|
||||
virtual std::shared_ptr<RuleCondition> createCondition(rules::Rule* parent, const Variant& raw) override;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user