Lines Matching refs:value
88 ConfigItem(const ConfigItem& value)
90 *this = value;
92 ConfigItem& operator=(const ConfigItem& value)
95 switch (value.type_) {
97 mapValue_ = new std::map<std::string, ConfigItem>(*value.mapValue_);
100 boolValue_ = value.boolValue_;
103 new(&stringValue_)std::string(value.stringValue_);
106 intsValue_ = new std::vector<int>(*value.intsValue_);
109 floatsValue_ = new std::vector<float>(*value.floatsValue_);
112 stringsValue_ = new std::vector<std::string>(*value.stringsValue_);
117 type_ = value.type_;
118 if (value.property_) {
119 property_ = new std::map<std::string, ConfigItem>(*value.property_);
123 ConfigItem(ConfigItem&& value) noexcept
125 *this = std::move(value);
127 ConfigItem& operator=(ConfigItem&& value) noexcept
130 switch (value.type_) {
132 mapValue_ = value.mapValue_;
133 value.mapValue_ = nullptr;
136 boolValue_ = value.boolValue_;
139 new(&stringValue_)std::string(std::move(value.stringValue_));
142 intsValue_ = value.intsValue_;
143 value.intsValue_ = nullptr;
146 floatsValue_ = value.floatsValue_;
147 value.floatsValue_ = nullptr;
150 stringsValue_ = value.stringsValue_;
151 value.stringsValue_ = nullptr;
156 type_ = value.type_;
157 property_ = value.property_;
158 value.type_ = ValueType::UNDIFINED;
159 value.property_ = nullptr;
169 // set map value
170 void SetValue(const std::map<std::string, ConfigItem>& value)
174 mapValue_ = new std::map<std::string, ConfigItem>(value);
176 // set bool value
177 void SetValue(bool value)
181 boolValue_ = value;
183 // set string value
184 void SetValue(const std::string& value)
188 new(&stringValue_)std::string(value);
190 // set ints value
191 void SetValue(const std::vector<int>& value)
195 intsValue_ = new std::vector<int>(value);
197 // set floats value
198 void SetValue(const std::vector<float>& value)
202 floatsValue_ = new std::vector<float>(value);
204 // set strings value
205 void SetValue(const std::vector<std::string>& value)
209 stringsValue_ = new std::vector<std::string>(value);