3D Repo Bouncer  1.4
repo_node_metadata.h
1 
21 #pragma once
22 #include "repo_node.h"
23 
24 namespace repo {
25  namespace core {
26  namespace model {
27  //------------------------------------------------------------------------------
28  //
29  // Fields specific to metadata only
30  //
31  //------------------------------------------------------------------------------
32 #define REPO_NODE_LABEL_METADATA "metadata"
33  //------------------------------------------------------------------------------
34 
35  class REPO_API_EXPORT MetadataNode :public RepoNode
36  {
37  public:
38 
42  MetadataNode();
43 
49  const std::unordered_map<std::string, std::pair<std::string, std::vector<uint8_t>>> &binMapping =
50  std::unordered_map<std::string, std::pair<std::string, std::vector<uint8_t>>>());
51 
55  ~MetadataNode();
56 
61  virtual std::string getType() const
62  {
63  return REPO_NODE_TYPE_METADATA;
64  }
65 
70  virtual NodeType getTypeAsEnum() const
71  {
72  return NodeType::METADATA;
73  }
74 
82  virtual bool sEqual(const RepoNode &other) const;
83 
89  MetadataNode cloneAndAddMetadata(
90  const RepoBSON &metadata) const;
91  };
92  } //namespace model
93  } //namespace core
94 } //namespace repo
Definition: repo_connection_pool_mongo.h:32
virtual NodeType getTypeAsEnum() const
Definition: repo_node_metadata.h:70
Definition: repo_node.h:33
Definition: repo_bson.h:53
virtual std::string getType() const
Definition: repo_node_metadata.h:61
Definition: repo_node_metadata.h:35