Lines Matching defs:mt

70         MetaType* mt = metaComponent_->types_[i];
71 switch (mt->kind_) {
255 MetaType* mt = metaComponent_->types_[mp->typeIndex_];
257 sb.AppendFormat("%s %s", EmitType(mt, mp->attributes_, false).string(), name.c_str());
260 void CppCodeEmitter::EmitInterfaceMethodReturn(MetaType* mt, StringBuilder& sb, const String& prefix)
262 sb.Append(prefix).AppendFormat("%s result", EmitType(mt, ATTR_OUT, false).string());
659 MetaType* mt = metaComponent_->types_[mp->typeIndex_];
661 EmitWriteVariable(parcelName, name, mt, sb, prefix);
667 MetaType* mt = metaComponent_->types_[mp->typeIndex_];
669 EmitReadVariable(parcelName, name, mt, sb, prefix, false);
834 MetaType* mt = metaComponent_->types_[mp->typeIndex_];
836 EmitReadVariable("data.", name, mt, sb, prefix + TAB);
927 void CppCodeEmitter::EmitWriteVariable(const String& parcelName, const std::string& name, MetaType* mt,
930 switch (mt->kind_) {
962 EmitWriteVariableFloat(parcelName, name, mt, sb, prefix);
968 const String& parcelName, const std::string& name, MetaType* mt, StringBuilder& sb, const String& prefix)
970 switch (mt->kind_) {
990 EmitWriteVariableComplex(parcelName, name, mt, sb, prefix);
996 const String& parcelName, const std::string& name, MetaType* mt, StringBuilder& sb, const String& prefix)
998 switch (mt->kind_) {
1003 if (mt != nullptr && mt->kind_ == TypeKind::Array) {
1016 if (mt != nullptr) {
1017 MetaType* innerType = metaComponent_->types_[mt->nestedTypeIndexes_[0]];
1035 MetaType* keyType = metaComponent_->types_[mt->nestedTypeIndexes_[0]];
1036 MetaType* valueType = metaComponent_->types_[mt->nestedTypeIndexes_[1]];
1043 EmitWriteVariableObject(parcelName, name, mt, sb, prefix);
1049 const String& parcelName, const std::string& name, MetaType* mt, StringBuilder& sb, const String& prefix)
1051 switch (mt->kind_) {
1092 void CppCodeEmitter::EmitReadVariable(const String& parcelName, const std::string& name, MetaType* mt,
1095 switch (mt->kind_) {
1099 EmitType(mt, ATTR_IN, true).string(), name.c_str(), parcelName.string());
1109 sb.Append(prefix).AppendFormat("%s %s = (%s)%sReadInt32();\n", EmitType(mt, ATTR_IN, true).string(),
1110 name.c_str(), EmitType(mt, ATTR_IN, true).string(), parcelName.string());
1113 EmitType(mt, ATTR_IN, true).string(), parcelName.string());
1119 EmitType(mt, ATTR_IN, true).string(), name.c_str(), parcelName.string());
1127 EmitType(mt, ATTR_IN, true).string(), name.c_str(), parcelName.string());
1133 EmitReadVariableFloat(parcelName, name, mt, sb, prefix, emitType);
1138 void CppCodeEmitter::EmitReadVariableFloat(const String& parcelName, const std::string& name, MetaType* mt,
1141 switch (mt->kind_) {
1145 EmitType(mt, ATTR_IN, true).string(), name.c_str(), parcelName.string());
1153 EmitType(mt, ATTR_IN, true).string(), name.c_str(), parcelName.string());
1159 EmitReadVariableComplex(parcelName, name, mt, sb, prefix, emitType);
1164 void CppCodeEmitter::EmitReadVariableComplex(const String& parcelName, const std::string& name, MetaType* mt,
1167 switch (mt->kind_) {
1171 EmitType(mt, ATTR_IN, true).string(), name.c_str(), parcelName.string());
1179 sb.Append(prefix).AppendFormat("%s %s;\n", EmitType(mt, ATTR_IN, true).string(), name.c_str());
1183 MetaType* keyType = metaComponent_->types_[mt->nestedTypeIndexes_[0]];
1184 MetaType* valueType = metaComponent_->types_[mt->nestedTypeIndexes_[1]];
1192 EmitReadVariableList(parcelName, name, mt, sb, prefix, emitType);
1197 void CppCodeEmitter::EmitReadVariableList(const String& parcelName, const std::string& name, MetaType* mt,
1200 switch (mt->kind_) {
1204 sb.Append(prefix).AppendFormat("%s %s;\n", EmitType(mt, ATTR_IN, true).string(), name.c_str());
1221 MetaType* innerType = metaComponent_->types_[mt->nestedTypeIndexes_[0]];
1232 EmitReadVariableObject(parcelName, name, mt, sb, prefix, emitType);
1237 void CppCodeEmitter::EmitReadVariableObject(const String& parcelName, const std::string& name, MetaType* mt,
1240 switch (mt->kind_) {
1242 MetaSequenceable* mp = metaComponent_->sequenceables_[mt->index_];
1249 EmitType(mt, ATTR_IN, true).string(), name.c_str(), parcelName.string(), mp->name_);
1267 MetaInterface* mi = metaComponent_->interfaces_[mt->index_];
1270 EmitType(mt, ATTR_IN, true).string(), name.c_str(), mi->name_, parcelName.string());
1291 MetaType* mt = metaComponent_->types_[mp->typeIndex_];
1293 if ((mt->kind_ == TypeKind::Sequenceable) || (mt->kind_ == TypeKind::Interface)) {
1296 sb.Append(prefix).AppendFormat("%s %s;\n", EmitType(mt, ATTR_IN, true).string(), name.c_str());
1298 sb.Append(prefix).AppendFormat("%s %s;\n", EmitType(mt, ATTR_IN, true).string(), name.c_str());
1302 void CppCodeEmitter::EmitReturnParameter(const String& name, MetaType* mt, StringBuilder& sb)
1304 switch (mt->kind_) {
1326 String CppCodeEmitter::EmitType(MetaType* mt, unsigned int attributes, bool isInnerType)
1328 switch (mt->kind_) {
1372 return EmitFloatType(mt, attributes, isInnerType);
1377 String CppCodeEmitter::EmitFloatType(MetaType* mt, unsigned int attributes, bool isInnerType)
1379 switch (mt->kind_) {
1398 return EmitComplexType(mt, attributes, isInnerType);
1402 String CppCodeEmitter::EmitComplexType(MetaType* mt, unsigned int attributes, bool isInnerType)
1404 switch (mt->kind_) {
1417 MetaType* keyType = metaComponent_->types_[mt->nestedTypeIndexes_[0]];
1418 MetaType* valueType = metaComponent_->types_[mt->nestedTypeIndexes_[1]];
1434 return EmitListType(mt, attributes, isInnerType);
1438 String CppCodeEmitter::EmitListType(MetaType* mt, unsigned int attributes, bool isInnerType)
1440 switch (mt->kind_) {
1444 MetaType* elementType = metaComponent_->types_[mt->nestedTypeIndexes_[0]];
1459 return EmitObjectType(mt, attributes, isInnerType);
1463 String CppCodeEmitter::EmitObjectType(MetaType* mt, unsigned int attributes, bool isInnerType)
1465 switch (mt->kind_) {
1467 MetaSequenceable* mp = metaComponent_->sequenceables_[mt->index_];
1492 MetaInterface* mi = metaComponent_->interfaces_[mt->index_];