23 #include "repo_bson.h"
29 CAMERA, MAP, MATERIAL, MESH, METADATA, REFERENCE,
30 REVISION, TEXTURE, TRANSFORMATION, UNKNOWN
43 const std::unordered_map<std::string, std::pair<std::string, std::vector<uint8_t>>> &binMapping =
44 std::unordered_map<std::string, std::pair<std::string, std::vector<uint8_t>>>());
84 const repoUUID &parent,
85 const bool &newUniqueID =
false,
86 const bool &newSharedID =
false,
87 const bool &overwrite =
false)
const;
97 const std::vector<repoUUID> &parents)
const;
107 const std::vector<float> &matrix)
const
119 const std::string &newName,
120 const bool &newUniqueID =
true
123 return cloneAndAddFields(
new RepoBSON(BSON(REPO_NODE_LABEL_NAME << newName)), newUniqueID);
135 const repoUUID &parent,
136 const bool &newUniqueID =
true)
const;
148 const bool &newUniqueID =
true)
const;
160 return std::string(getStringField(REPO_NODE_LABEL_NAME));
167 repoUUID
getSharedID()
const {
return getUUIDField(REPO_NODE_LABEL_SHARED_ID); }
175 return getStringField(REPO_NODE_LABEL_TYPE);
182 virtual NodeType getTypeAsEnum()
const;
188 repoUUID
getUniqueID()
const{
return getUUIDField(REPO_NODE_LABEL_ID); }
194 std::vector<repoUUID> getParentIDs()
const;
208 repoUUID sharedID = getSharedID();
230 repoWarning <<
"sEqual() is called for RepoNode* this is not expected!";
237 repoUUID sharedID = getSharedID();
275 typedef std::set<RepoNode *, RepoNodeComparator> RepoNodeSet;
virtual bool sEqual(const RepoNode &other) const
Definition: repo_node.h:225
Definition: repo_connection_pool_mongo.h:32
repoUUID getSharedID() const
Definition: repo_node.h:167
bool operator<(const RepoNode &other) const
Returns true if the other node is greater than this one, false otherwise.
Definition: repo_node.h:206
virtual std::string getType() const
Definition: repo_node.h:173
repoUUID getUniqueID() const
Definition: repo_node.h:188
virtual RepoNode cloneAndApplyTransformation(const std::vector< float > &matrix) const
Definition: repo_node.h:106
std::string getName() const
Definition: repo_node.h:158
RepoNode()
Definition: repo_node.h:49
Definition: repo_node.h:266
bool operator>(const RepoNode &other) const
Returns true if the other node is greater than this one, false otherwise.
Definition: repo_node.h:235
Definition: repo_node.h:33
Definition: repo_bson.h:53
virtual bool positionDependant()
Definition: repo_node.h:65
std::string type
Compulsory type of this document.
Definition: repo_node.h:255
bool operator==(const RepoNode &other) const
Returns true if the node is the same, false otherwise.
Definition: repo_node.h:200
RepoNode cloneAndChangeName(const std::string &newName, const bool &newUniqueID=true) const
Definition: repo_node.h:118