Home | History | Annotate | Download | only in cpp

Lines Matching refs:instance

191        reflection->GetRepeated##TYPE(instance, field, index) :           \
192 reflection->Get##TYPE(instance, field))
194 static Handle<Value> ToJs(const Message& instance,
199 DBG("Type::ToJs(instance, refelction, field, message_type) E:");
239 Handle<Object> ToJs(const Message& instance) const {
241 const Reflection* reflection = instance.GetReflection();
242 const Descriptor* descriptor = instance.GetDescriptor();
250 if (repeated && !reflection->FieldSize(instance, field)) {
254 if (!repeated && !reflection->HasField(instance, field)) {
265 int size = reflection->FieldSize(instance, field);
268 array->Set(j, ToJs(instance, reflection, field, child_type, j));
272 value = ToJs(instance, reflection, field, child_type, -1);
298 if (repeated) reflection->Add##TYPE(instance, field, EXPR); \
299 else reflection->Set##TYPE(instance, field, EXPR)
301 static bool ToProto(Message* instance,
306 DBG("Type::ToProto(instance, field, value, type, repeated) E:");
311 const Reflection* reflection = instance->GetReflection();
316 reflection->AddMessage(instance, field) :
317 reflection->MutableMessage(instance, field),
385 reflection->AddEnum(instance, field, vd);
387 reflection->SetEnum(instance, field, vd);
395 DBG("Type::ToProto(instance, field, value, type, repeated) X: ok=%d", ok);
400 bool ToProto(Message* instance, Handle<Object> src) const {
416 ok = ToProto(instance, field, value, child_type, true);
421 ok = ToProto(instance, field, array->Get(j), child_type, true);
425 ok = ToProto(instance, field, value, child_type, false);