Lines Matching refs:Format
30 * a format string and a vector of index values, and performs string formatting when an accessor function is called to
39 * With the ParameterName class, a format string and a vector of format values are stored by the ParameterName object that is
49 /// Format specifier for the parameter name string, to be replaced by an index value. The parameter name string must contain
50 /// one format specifier for each index value specified.
57 * @param source Paramater name string without format specifiers.
59 * @pre The source string must not contain the %i format specifier.
66 * @param source Paramater name string without format specifiers.
68 * @pre The source string must not contain the %i format specifier.
75 * @param source Paramater name string without format specifiers.
77 * @pre The source string must not contain the %i format specifier.
84 * @param source Paramater name string with format specifiers.
87 * @pre The number of %i format specifiers contained by the source string must match the number of elements contained
95 * @param source Paramater name string with format specifiers.
98 * @pre The number of %i format specifiers contained by the source string must match the number of elements contained
106 std::string get_name() const { return (args_.empty()) ? source_ : Format(); }
109 /// Replace the %i format specifiers in the source string with the values from the index vector.
110 std::string Format() const {
113 std::stringstream format;
120 format << source_.substr(last, (current - last)) << index;
124 format << source_.substr(last, std::string::npos);
126 return format.str();
129 /// Check that the number of %i format specifiers in the source string matches the number of elements in the index vector.
131 // Count the number of occurances of the format specifier
144 std::string source_; ///< Format string.