3D Repo Bouncer  1.4
repo_bson_project_settings.h
1 
22 #pragma once
23 #include "repo_bson.h"
24 
25 namespace repo {
26  namespace core {
27  namespace model {
28  // TODO: make into header only
29 
30  class REPO_API_EXPORT RepoProjectSettings : public RepoBSON
31  {
32  public:
33 
35 
36  RepoProjectSettings(RepoBSON bson) : RepoBSON(bson){}
37 
39 
45  RepoProjectSettings cloneAndMergeProjectSettings(const RepoProjectSettings &proj) const;
46 
52  double getAvatarHeight() const
53  {
54  return getEmbeddedDouble(
55  REPO_LABEL_PROPERTIES,
56  REPO_LABEL_AVATAR_HEIGHT,
57  (double)REPO_DEFAULT_PROJECT_AVATAR_HEIGHT);
58  }
59 
64  std::string getDescription() const
65  {
66  return getStringField(REPO_LABEL_DESCRIPTION);
67  }
68 
73  std::string getOwner() const
74  {
75  return getStringField(REPO_LABEL_OWNER);
76  }
77 
78  double getPinSize() const
79  {
80  return getEmbeddedDouble(
81  REPO_LABEL_PROPERTIES,
82  REPO_LABEL_PIN_SIZE,
83  REPO_DEFAULT_PROJECT_PIN_SIZE);
84  }
85 
90  std::string getProjectName() const
91  {
92  return getStringField(REPO_LABEL_ID);
93  }
94 
95  double getSpeed() const
96  {
97  return getEmbeddedDouble(
98  REPO_LABEL_PROPERTIES,
99  REPO_LABEL_SPEED,
100  REPO_DEFAULT_PROJECT_SPEED);
101  }
102 
107  std::string getType() const
108  {
109  return getStringField(REPO_LABEL_TYPE);
110  }
111 
112  double getVisibilityLimit() const
113  {
114  return getEmbeddedDouble(
115  REPO_LABEL_PROPERTIES,
116  REPO_LABEL_VISIBILITY_LIMIT,
117  REPO_DEFAULT_PROJECT_VISIBILITY_LIMIT);
118  }
119 
120  double getZFar() const
121  {
122  return getEmbeddedDouble(
123  REPO_LABEL_PROPERTIES,
124  REPO_LABEL_ZFAR,
125  REPO_DEFAULT_PROJECT_ZFAR);
126  }
127 
132  double getZNear() const
133  {
134  return getEmbeddedDouble(
135  REPO_LABEL_PROPERTIES,
136  REPO_LABEL_ZNEAR,
137  REPO_DEFAULT_PROJECT_ZNEAR);
138  }
139  };
140  }// end namespace model
141  } // end namespace core
142 } // end namespace repo
std::string getDescription() const
Definition: repo_bson_project_settings.h:64
Definition: repo_connection_pool_mongo.h:32
std::string getProjectName() const
Definition: repo_bson_project_settings.h:90
std::string getOwner() const
Definition: repo_bson_project_settings.h:73
double getZNear() const
Definition: repo_bson_project_settings.h:132
Definition: repo_bson_project_settings.h:30
Definition: repo_bson.h:53
std::string getType() const
Definition: repo_bson_project_settings.h:107
double getAvatarHeight() const
getAvatarHeight
Definition: repo_bson_project_settings.h:52