Skip to content

Commit f49f1ad

Browse files
committed
remove get_
1 parent 4de683e commit f49f1ad

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

src/viam/sdk/resource/resource_api.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ const std::string& ModelFamily::get_namespace() const {
195195
return namespace_;
196196
}
197197

198-
const std::string& ModelFamily::get_family() const {
198+
const std::string& ModelFamily::family() const {
199199
return family_;
200200
}
201201

@@ -205,11 +205,11 @@ Model::Model(ModelFamily model_family, std::string model_name)
205205
Model::Model(std::string namespace_, std::string family, std::string model_name)
206206
: Model(ModelFamily(std::move(namespace_), std::move(family)), std::move(model_name)) {}
207207

208-
const ModelFamily& Model::get_model_family() const {
208+
const ModelFamily& Model::model_family() const {
209209
return model_family_;
210210
}
211211

212-
const std::string& Model::get_model_name() const {
212+
const std::string& Model::model_name() const {
213213
return model_name_;
214214
}
215215

src/viam/sdk/resource/resource_api.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ class ModelFamily {
115115
ModelFamily(std::string namespace_, std::string family);
116116

117117
const std::string& get_namespace() const;
118-
const std::string& get_family() const;
118+
const std::string& family() const;
119119

120120
std::string to_string() const;
121121

@@ -132,8 +132,8 @@ class Model {
132132
Model(ModelFamily model, std::string model_name);
133133
Model();
134134

135-
const ModelFamily& get_model_family() const;
136-
const std::string& get_model_name() const;
135+
const ModelFamily& model_family() const;
136+
const std::string& model_name() const;
137137

138138
std::string to_string() const;
139139

src/viam/sdk/tests/test_resource.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -78,31 +78,31 @@ BOOST_AUTO_TEST_CASE(test_model) {
7878
ModelFamily mf("ns", "mf");
7979
BOOST_CHECK_EQUAL(mf.to_string(), "ns:mf");
8080
BOOST_CHECK_EQUAL(mf.get_namespace(), "ns");
81-
BOOST_CHECK_EQUAL(mf.get_family(), "mf");
81+
BOOST_CHECK_EQUAL(mf.family(), "mf");
8282

8383
Model model1(mf, "model1");
8484
BOOST_CHECK_EQUAL(model1.to_string(), "ns:mf:model1");
85-
BOOST_CHECK_EQUAL(model1.get_model_family().to_string(), "ns:mf");
86-
BOOST_CHECK_EQUAL(model1.get_model_name(), "model1");
85+
BOOST_CHECK_EQUAL(model1.model_family().to_string(), "ns:mf");
86+
BOOST_CHECK_EQUAL(model1.model_name(), "model1");
8787
Model model2("ns", "mf", "model2");
8888
BOOST_CHECK_EQUAL(model2.to_string(), "ns:mf:model2");
89-
BOOST_CHECK_EQUAL(model2.get_model_family().to_string(), "ns:mf");
90-
BOOST_CHECK_EQUAL(model2.get_model_name(), "model2");
89+
BOOST_CHECK_EQUAL(model2.model_family().to_string(), "ns:mf");
90+
BOOST_CHECK_EQUAL(model2.model_name(), "model2");
9191

9292
Model model3 = Model::from_str("ns:mf:model3");
9393
BOOST_CHECK_EQUAL(model3.to_string(), "ns:mf:model3");
94-
BOOST_CHECK_EQUAL(model3.get_model_family().to_string(), "ns:mf");
95-
BOOST_CHECK_EQUAL(model3.get_model_name(), "model3");
94+
BOOST_CHECK_EQUAL(model3.model_family().to_string(), "ns:mf");
95+
BOOST_CHECK_EQUAL(model3.model_name(), "model3");
9696
Model model4 = Model::from_str("model4");
9797
BOOST_CHECK_EQUAL(model4.to_string(), "rdk:builtin:model4");
98-
BOOST_CHECK_EQUAL(model4.get_model_family().to_string(), "rdk:builtin");
99-
BOOST_CHECK_EQUAL(model4.get_model_name(), "model4");
98+
BOOST_CHECK_EQUAL(model4.model_family().to_string(), "rdk:builtin");
99+
BOOST_CHECK_EQUAL(model4.model_name(), "model4");
100100

101101
ModelFamily empty("", "");
102102
Model model5(empty, "model5");
103103
BOOST_CHECK_EQUAL(model5.to_string(), "model5");
104-
BOOST_CHECK_EQUAL(model5.get_model_family().to_string(), "");
105-
BOOST_CHECK_EQUAL(model5.get_model_name(), "model5");
104+
BOOST_CHECK_EQUAL(model5.model_family().to_string(), "");
105+
BOOST_CHECK_EQUAL(model5.model_name(), "model5");
106106

107107
BOOST_CHECK_THROW(Model::from_str("@"), Exception);
108108
}

0 commit comments

Comments
 (0)