The function checks if the object satisfies the subscription and adds to changes. The actions could be: '+' - created '~' - changed '-' - deleted
910{
911
912 bool any = (class_names.empty() && objects.empty());
913
914
915
916
917
918
919 OksConfiguration::SMap::const_iterator omi = objects.end();
920
921 if (action != '+') {
922 omi = objects.find(obj_class);
923 if (omi != objects.end()) {
924 std::set<std::string>::const_iterator i = omi->second.find(obj_id);
925
926 if (i != omi->second.end()) {
928 }
929 }
930 }
931
932
933
934 if (action == '+' || omi == objects.end()) {
935 if (any || class_names.find(obj_class) != class_names.end()) {
937 }
938 }
939
940
941
942 OksConfiguration::SMap::const_iterator it = inheritance.
data().find(obj_class);
943 if (it != inheritance.
data().end()) {
944 for (std::set<std::string>::const_iterator j = it->second.begin(); j != it->second.end(); ++j) {
945 omi = (
action !=
'+' ? objects.find(*j) : objects.end());
946
947
948
949
950
951 if (any || (omi == objects.end() && class_names.find(*j) != class_names.end()) ||
952 (omi != objects.end() && omi->second.find(obj_id) != omi->second.end())) {
954 }
955 }
956 }
957}
static void add(std::vector< ConfigurationChange * > &changes, const std::string &class_name, const std::string &obj_id, const char action)
Helper method to add object to the vector of existing changes.
const OksConfiguration::SMap & data() const