33 std::vector<std::shared_ptr<PropertyRepository>> m_propertyRepositories;
34 std::vector<std::shared_ptr<PropertyRepository>> m_mutablePropertyRepositories;
35 std::vector<std::shared_ptr<PropertyRepository>> m_shadowPropertyRepositories;
36 std::vector<std::shared_ptr<AbstractServiceInterface>> m_abstractServices;
38 std::map<std::string, std::shared_ptr<PropertyBase>>
40 std::map<PropertyRepositoryType, std::shared_ptr<PropertyRepository>> m_typeRepositoryMap;
41 std::shared_ptr<IEventBus> m_changeBus;
42 std::string m_changeSubscriber;
46 static std::string createIdentifier(
const std::string &name,
47 const std::string &instanceName,
48 const std::string &className,
49 const std::string &processName);
52 static std::map<std::string, std::shared_ptr<PropertyBase>> init(
53 const std::vector<std::shared_ptr<PropertyRepository>> &
repoProperties,
57 static std::vector<std::shared_ptr<PropertyRepository>> filterEnabledRepositories(
61 static std::vector<std::shared_ptr<PropertyRepository>> filterMutableRepositories(
65 static std::vector<std::shared_ptr<PropertyRepository>> filterShadowRepositories(
69 void getOrCreate(
const std::vector<std::shared_ptr<PropertyBase>> &
propertiesVec,
74 void publishChange(
const std::shared_ptr<PropertyBase> &
property);
104 std::map<PropertyRepositoryType, std::vector<std::shared_ptr<PropertyBase>>>
map;
121 std::shared_ptr<Property<T>> getOrCreate(
const std::string &name,
122 const std::string &instanceName,
123 const std::string &className,
124 const std::string &processName,
133 std::shared_ptr<PropertyBase> &
get(
const std::string &name,
134 const std::string &instanceName,
135 const std::string &className,
136 const std::string &processName);
139 std::vector<std::shared_ptr<PropertyBase>>
allOf();
142 std::vector<std::shared_ptr<PropertyBase>>
allOf(
const std::string &processName);
145 std::vector<std::shared_ptr<PropertyBase>>
allOf(
const std::string &processName,
const std::string &className);
148 std::vector<std::shared_ptr<PropertyBase>>
149 allOf(
const std::string &processName,
const std::string &className,
const std::string &instanceName);
170 std::map<PropertyRepositoryType, std::shared_ptr<PropertyRepository>>
buildMap(
171 const std::vector<std::shared_ptr<PropertyRepository>> &
vector);
176std::shared_ptr<Property<T>> PropertyService::getOrCreate(
const std::string &name,
177 const std::string &instanceName,
178 const std::string &className,
179 const std::string &processName,
184 auto id = createIdentifier(name, instanceName, className, processName);
187 return std::static_pointer_cast<Property<T>>(
propertyBase);
189 auto property = std::make_shared<Property<T>>(
191 m_properties.insert({
property->getIdentifier(),
property });
192 if (m_mutablePropertyRepositories.empty()) {
193 LOG_ERROR(
"no mutable property repositories available");
196 for (
const auto &
item : m_mutablePropertyRepositories) {
item->save(
property); }