Skip to content
Snippets Groups Projects

ENH: Allow insertion and deletion of single entities

Merged Florian Spreckelsen requested to merge f-insert into dev
All threads resolved!
Compare and Show latest version
2 files
+ 27
4
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 22
3
@@ -54,6 +54,8 @@ public:
}
friend class Entity;
friend class Parent;
friend class Property;
friend class Messages;
private:
@@ -74,6 +76,8 @@ public:
}
friend class Entity;
friend class Parent;
friend class Property;
private:
inline Messages() : wrapped(nullptr){};
@@ -139,15 +143,27 @@ public:
/**
* Return the error messages of this parent.
*/
[[nodiscard]] inline auto GetErrors() const -> const Messages &;
[[nodiscard]] inline auto GetErrors() const -> const Messages & {
return errors;
}
[[nodiscard]] inline auto HasErrors() const -> bool {
return this->errors.wrapped->size() > 0;
}
/**
* Return the warning messages of this parent.
*/
[[nodiscard]] inline auto GetWarnings() const -> const Messages &;
[[nodiscard]] inline auto GetWarnings() const -> const Messages & {
return warnings;
}
[[nodiscard]] inline auto HasWarnings() const -> bool {
return this->warnings.wrapped->size() > 0;
}
/**
* Return the info messages of this parent.
*/
[[nodiscard]] inline auto GetInfos() const -> const Messages &;
[[nodiscard]] inline auto GetInfos() const -> const Messages & {
return infos;
}
friend class Entity;
friend class Parents;
@@ -169,6 +185,9 @@ private:
* Message which serves as storage backend.
*/
mutable caosdb::entity::v1alpha1::Parent *wrapped;
Messages errors;
Messages warnings;
Messages infos;
};
/**
Loading