Lines Matching defs:std

39 const std::string DEFAULT_DOMAIN = "default";

42 std::string TrimRightZero(const std::string& str)
45 if (endIndex == std::string::npos) {
125 std::string GetValueStr(const T& value)
127 return std::to_string(value);
130 std::string GetValueStr(bool value)
135 std::string GetValueStr(char value)
137 return "\"" + std::to_string(value) + "\"";
140 std::string GetValueStr(float value)
142 return TrimRightZero(std::to_string(value));
145 std::string GetValueStr(double value)
147 return TrimRightZero(std::to_string(value));
150 std::string GetValueStr(const std::string& value)
156 std::string GetValuesStr(const std::vector<T>& values)
158 std::string valuesStr;
162 if constexpr (std::is_same_v<std::decay_t<T>, bool>) { // vector<bool> is stored as bit type
176 std::string GetEmptyParamValueStr(const AppEventParamValue& value)
181 std::string GetBoolParamValueStr(const AppEventParamValue& value)
186 std::string GetCharParamValueStr(const AppEventParamValue& value)
191 std::string GetShortParamValueStr(const AppEventParamValue& value)
196 std::string GetIntParamValueStr(const AppEventParamValue& value)
201 std::string GetLongParamValueStr(const AppEventParamValue& value)
206 std::string GetFloatParamValueStr(const AppEventParamValue& value)
211 std::string GetDoubleParamValueStr(const AppEventParamValue& value)
216 std::string GetStrParamValueStr(const AppEventParamValue& value)
221 std::string GetBoolsParamValueStr(const AppEventParamValue& value)
226 std::string GetCharsParamValueStr(const AppEventParamValue& value)
231 std::string GetShortsParamValueStr(const AppEventParamValue& value)
236 std::string GetIntsParamValueStr(const AppEventParamValue& value)
241 std::string GetLongsParamValueStr(const AppEventParamValue& value)
246 std::string GetFloatsParamValueStr(const AppEventParamValue& value)
251 std::string GetDoublesParamValueStr(const AppEventParamValue& value)
256 std::string GetStrsParamValueStr(const AppEventParamValue& value)
261 using GetParamValueFunc = std::string (*)(const AppEventParamValue& value);
262 const std::unordered_map<AppEventParamType, GetParamValueFunc> GET_PARAM_VALUE_FUNCS = {
282 std::string GetParamValueStr(const AppEventParam& param)
339 AppEventParam::AppEventParam(std::string n, AppEventParamType t) : name(n), type(t), value(t)
348 AppEventPack::AppEventPack(const std::string& name, int type) : AppEventPack(DEFAULT_DOMAIN, name, type)
351 AppEventPack::AppEventPack(const std::string& domain, const std::string& name, int type)
394 void AppEventPack::AddParam(const std::string& key)
400 void AppEventPack::AddParam(const std::string& key, bool b)
407 void AppEventPack::AddParam(const std::string& key, char c)
414 void AppEventPack::AddParam(const std::string& key, int8_t num)
421 void AppEventPack::AddParam(const std::string& key, int16_t s)
428 void AppEventPack::AddParam(const std::string& key, int i)
435 void AppEventPack::AddParam(const std::string& key, int64_t ll)
442 void AppEventPack::AddParam(const std::string& key, float f)
449 void AppEventPack::AddParam(const std::string& key, double d)
456 void AppEventPack::AddParam(const std::string& key, const char *s)
463 void AppEventPack::AddParam(const std::string& key, const std::string& s)
470 void AppEventPack::AddParam(const std::string& key, const std::vector<bool>& bs)
477 void AppEventPack::AddParam(const std::string& key, const std::vector<char>& cs)
484 void AppEventPack::AddParam(const std::string& key, const std::vector<int8_t>& shs)
491 void AppEventPack::AddParam(const std::string& key, const std::vector<int16_t>& shs)
498 void AppEventPack::AddParam(const std::string& key, const std::vector<int>& is)
505 void AppEventPack::AddParam(const std::string& key, const std::vector<int64_t>& lls)
512 void AppEventPack::AddParam(const std::string& key, const std::vector<float>& fs)
519 void AppEventPack::AddParam(const std::string& key, const std::vector<double>& ds)
526 void AppEventPack::AddParam(const std::string& key, const std::vector<const char*>& cps)
529 std::vector<std::string> strs;
541 void AppEventPack::AddParam(const std::string& key, const std::vector<std::string>& strs)
548 void AppEventPack::AddCustomParams(const std::unordered_map<std::string, std::string>& customParams)
553 std::string paramStr = GetParamStr();
555 std::stringstream jsonStr;
562 std::string customParamStr = jsonStr.str();
569 std::string AppEventPack::GetEventStr() const
571 std::stringstream jsonStr;
575 jsonStr << "}" << std::endl;
579 std::string AppEventPack::GetParamStr() const
585 std::stringstream jsonStr;
588 jsonStr << "}" << std::endl;
592 void AppEventPack::AddBaseInfoToJsonString(std::stringstream& jsonStr) const
597 jsonStr << "\"" << "time_" << "\":" << std::to_string(time_) << ",";
604 void AppEventPack::AddTraceInfoToJsonString(std::stringstream& jsonStr) const
615 void AppEventPack::AddParamsInfoToJsonString(std::stringstream& jsonStr) const
631 void AppEventPack::AddParamsToJsonString(std::stringstream& jsonStr) const
639 jsonStr.seekp(-1, std::ios_base::end); // -1 for delete ','
642 void AppEventPack::GetCustomParams(std::vector<CustomEventParam>& customParams) const
659 std::string AppEventPack::GetDomain() const
664 std::string AppEventPack::GetName() const
679 std::string AppEventPack::GetTimeZone() const
714 std::string AppEventPack::GetRunningId() const
724 void AppEventPack::SetDomain(const std::string& domain)
729 void AppEventPack::SetName(const std::string& name)
744 void AppEventPack::SetTimeZone(const std::string& timeZone)
779 void AppEventPack::SetParamStr(const std::string& paramStr)
784 void AppEventPack::SetRunningId(const std::string& runningId)