3D Repo Bouncer  1.4
repo_node_revision.h
1 
22 #pragma once
23 #include "repo_node.h"
24 
25 //------------------------------------------------------------------------------
26 //
27 // Fields specific to revision only
28 //
29 //------------------------------------------------------------------------------
30 #define REPO_NODE_REVISION_LABEL_AUTHOR "author"
31 #define REPO_NODE_REVISION_LABEL_MESSAGE "desc"
32 #define REPO_NODE_REVISION_LABEL_TAG "tag"
33 #define REPO_NODE_REVISION_LABEL_TIMESTAMP "timestamp"
34 #define REPO_NODE_REVISION_LABEL_CURRENT_UNIQUE_IDS "current"
35 #define REPO_NODE_REVISION_LABEL_ADDED_SHARED_IDS "added"
36 #define REPO_NODE_REVISION_LABEL_DELETED_SHARED_IDS "deleted"
37 #define REPO_NODE_REVISION_LABEL_MODIFIED_SHARED_IDS "modified"
38 #define REPO_NODE_REVISION_LABEL_UNMODIFIED_SHARED_IDS "unmodified"
39 #define REPO_NODE_REVISION_LABEL_BRANCH_MASTER "master"
40 #define REPO_NODE_REVISION_LABEL_REF_FILE "rFile"
41 #define REPO_NODE_REVISION_LABEL_INCOMPLETE "incomplete"
42 #define REPO_NODE_REVISION_LABEL_WORLD_COORD_SHIFT "coordOffset"
43 #define REPO_NODE_UUID_SUFFIX_REVISION "10"
44 //------------------------------------------------------------------------------
45 
46 namespace repo {
47  namespace core {
48  namespace model {
49  class REPO_API_EXPORT RevisionNode : public RepoNode
50  {
51  public:
52  enum class UploadStatus{ COMPLETE = 0, GEN_DEFAULT = 1, GEN_REPO_STASH = 2, GEN_WEB_STASH = 3, GEN_SEL_TREE = 4, UNKNOWN = 5 };
53 
59  RevisionNode(RepoBSON bson);
60 
61  RevisionNode();
62  ~RevisionNode();
63 
68  virtual std::string getType() const
69  {
70  return REPO_NODE_TYPE_REVISION;
71  }
72 
77  virtual NodeType getTypeAsEnum() const
78  {
79  return NodeType::REVISION;
80  }
81 
90  RevisionNode cloneAndUpdateStatus(
91  const UploadStatus &status) const;
92 
101  std::string getAuthor() const;
102 
107  std::vector<double> getCoordOffset() const;
108 
113  std::vector<repoUUID> getCurrentIDs() const;
114 
116  //* Get a list of IDs of nodes which were Added for this revision
117  //* @return returns a vector of shared IDs.
118  //*/
119  //std::vector<repoUUID> getAddedIDs() const;
120 
122  //* Get a list of IDs of nodes which were deleted for this revision
123  //* @return returns a vector of shared IDs.
124  //*/
125  //std::vector<repoUUID> getDeletedIDs() const;
126 
128  //* Get a list of IDs of nodes which were modified for this revision
129  //* @return returns a vector of shared IDs.
130  //*/
131  //std::vector<repoUUID> getModifiedIDs() const;
132 
137  std::string getMessage() const;
138 
143  std::string getTag() const;
144 
149  UploadStatus getUploadStatus() const;
150 
155  std::vector<std::string> getOrgFiles() const;
156 
161  int64_t getTimestampInt64() const;
162  };
163  }// end namespace model
164  } // end namespace core
165 } // end namespace repo
Definition: repo_node_revision.h:49
Definition: repo_connection_pool_mongo.h:32
virtual std::string getType() const
Definition: repo_node_revision.h:68
Definition: repo_node.h:33
Definition: repo_bson.h:53
virtual NodeType getTypeAsEnum() const
Definition: repo_node_revision.h:77