Lines Matching refs:this

4  * Use of this source code is governed by a BSD-style license that can be
24 * created with this class must have a top-level object or array. Free-floating values of other
61 this->flush();
86 SkASSERT(Scope::kObject == this->scope());
89 this->write(",", 1);
91 this->separator(this->multiline());
92 this->write("\"", 1);
93 this->write(name, strlen(name));
94 this->write("\":", 2);
102 * This can be overridden for a particular object by passing false for multiline, this will
104 * In kFast mode, this parameter is ignored.
107 this->appendName(name);
108 this->beginValue(true);
109 this->write("{", 1);
119 SkASSERT(Scope::kObject == this->scope());
122 bool wasMultiline = this->multiline();
123 this->popScope();
125 this->separator(wasMultiline);
127 this->write("}", 1);
134 * This can be overridden for a particular array by passing false for multiline, this will
136 * In kFast mode, this parameter is ignored.
139 this->appendName(name);
140 this->beginValue(true);
141 this->write("[", 1);
151 SkASSERT(Scope::kArray == this->scope());
154 bool wasMultiline = this->multiline();
155 this->popScope();
157 this->separator(wasMultiline);
159 this->write("]", 1);
169 this->beginValue();
170 this->write("\"", 1);
174 case '"': this->write("\\\"", 2); break;
175 case '\\': this->write("\\\\", 2); break;
176 case '\b': this->write("\\b", 2); break;
177 case '\f': this->write("\\f", 2); break;
178 case '\n': this->write("\\n", 2); break;
179 case '\r': this->write("\\r", 2); break;
180 case '\t': this->write("\\t", 2); break;
181 default: this->write(value, 1); break;
186 this->write("\"", 1);
189 void appendPointer(const void* value) { this->beginValue(); this->appendf("\"%p\"", value); }
191 this->beginValue();
193 this->write("true", 4);
195 this->write("false", 5);
198 void appendS32(int32_t value) { this->beginValue(); this->appendf("%d", value); }
200 void appendU32(uint32_t value) { this->beginValue(); this->appendf("%u", value); }
202 void appendFloat(float value) { this->beginValue(); this->appendf("%g", value); }
203 void appendDouble(double value) { this->beginValue(); this->appendf("%g", value); }
205 this->beginValue();
206 this->appendf("%.*g", digits, value);
209 this->beginValue();
210 this->appendf("%.*g", digits, value);
212 void appendHexU32(uint32_t value) { this->beginValue(); this->appendf("\"0x%x\"", value); }
216 void function(const char* name, type value) { this->appendName(name); this->function(value); }
237 this->appendName(name);
238 this->appendFloatDigits(value, digits);
241 this->appendName(name);
242 this->appendDoubleDigits(value, digits);
277 this->write(",", 1);
279 if (Scope::kArray == this->scope()) {
280 this->separator(this->multiline());
281 } else if (Scope::kObject == this->scope() && Mode::kPretty == fMode) {
282 this->write(" ", 1);
287 fState = Scope::kArray == this->scope() ? State::kArrayValue : State::kObjectValue;
294 this->write("\n", 1);
296 this->write(" ", 3);
299 this->write(" ", 1);
307 this->flush();
331 switch (this->scope()) {