Home
last modified time | relevance | path

Searched refs:prefix (Results 1 – 25 of 109) sorted by relevance

12345

/drivers/hdf_core/framework/tools/hdi-gen/ast/
Dast_array_type.cpp83 const std::string &gotoLabel, StringBuilder &sb, const std::string &prefix) const in EmitCWriteVar()
87 …sb.Append(prefix).AppendFormat("if (!WritePodArray(%s, %s, sizeof(%s), %s)) {\n", parcelName.c_str… in EmitCWriteVar()
89 sb.Append(prefix + TAB) in EmitCWriteVar()
91 sb.Append(prefix + TAB).AppendFormat("%s = HDF_ERR_INVALID_PARAM;\n", ecName.c_str()); in EmitCWriteVar()
92 sb.Append(prefix + TAB).AppendFormat("goto %s;\n", gotoLabel.c_str()); in EmitCWriteVar()
93 sb.Append(prefix).Append("}\n"); in EmitCWriteVar()
96 sb.Append(prefix).AppendFormat( in EmitCWriteVar()
98 sb.Append(prefix + TAB) in EmitCWriteVar()
100 sb.Append(prefix + TAB).AppendFormat("%s = HDF_ERR_INVALID_PARAM;\n", ecName.c_str()); in EmitCWriteVar()
101 sb.Append(prefix + TAB).AppendFormat("goto %s;\n", gotoLabel.c_str()); in EmitCWriteVar()
[all …]
Dast_fd_type.cpp66 const std::string &gotoLabel, StringBuilder &sb, const std::string &prefix) const in EmitCWriteVar()
68 …sb.Append(prefix).AppendFormat("if (!WriteFileDescriptor(%s, %s)) {\n", parcelName.c_str(), name.c… in EmitCWriteVar()
69 …sb.Append(prefix + TAB).AppendFormat("HDF_LOGE(\"%%{public}s: write %s failed!\", __func__);\n", n… in EmitCWriteVar()
70 sb.Append(prefix + TAB).AppendFormat("%s = HDF_ERR_INVALID_PARAM;\n", ecName.c_str()); in EmitCWriteVar()
71 sb.Append(prefix + TAB).AppendFormat("goto %s;\n", gotoLabel.c_str()); in EmitCWriteVar()
72 sb.Append(prefix).Append("}\n"); in EmitCWriteVar()
76 …::string &ecName, const std::string &gotoLabel, StringBuilder &sb, const std::string &prefix) const in EmitCProxyReadVar()
79 …sb.Append(prefix).AppendFormat("if (!ReadFileDescriptor(%s, &%s)) {\n", parcelName.c_str(), name.c… in EmitCProxyReadVar()
81 …sb.Append(prefix).AppendFormat("if (!ReadFileDescriptor(%s, %s)) {\n", parcelName.c_str(), name.c_… in EmitCProxyReadVar()
83 …sb.Append(prefix + TAB).AppendFormat("HDF_LOGE(\"%%{public}s: read %s failed!\", __func__);\n", na… in EmitCProxyReadVar()
[all …]
Dast_string_type.cpp66 const std::string &gotoLabel, StringBuilder &sb, const std::string &prefix) const in EmitCWriteVar()
68 …sb.Append(prefix).AppendFormat("if (!HdfSbufWriteString(%s, %s)) {\n", parcelName.c_str(), name.c_… in EmitCWriteVar()
69 …sb.Append(prefix + TAB).AppendFormat("HDF_LOGE(\"%%{public}s: write %s failed!\", __func__);\n", n… in EmitCWriteVar()
70 sb.Append(prefix + TAB).AppendFormat("%s = HDF_ERR_INVALID_PARAM;\n", ecName.c_str()); in EmitCWriteVar()
71 sb.Append(prefix + TAB).AppendFormat("goto %s;\n", gotoLabel.c_str()); in EmitCWriteVar()
72 sb.Append(prefix).Append("}\n"); in EmitCWriteVar()
76 …::string &ecName, const std::string &gotoLabel, StringBuilder &sb, const std::string &prefix) const in EmitCProxyWriteOutVar()
79 sb.Append(prefix).AppendFormat("if (%s == NULL || %s == 0) {\n", name.c_str(), lenName.c_str()); in EmitCProxyWriteOutVar()
80 …sb.Append(prefix + TAB).AppendFormat("HDF_LOGE(\"%%{public}s: %s is invalid\", __func__);\n", name… in EmitCProxyWriteOutVar()
81 sb.Append(prefix + TAB).AppendFormat("%s = HDF_ERR_INVALID_PARAM;\n", ecName.c_str()); in EmitCProxyWriteOutVar()
[all …]
Dast_ulong_type.cpp67 const std::string &gotoLabel, StringBuilder &sb, const std::string &prefix) const in EmitCWriteVar()
69 …sb.Append(prefix).AppendFormat("if (!HdfSbufWriteUint64(%s, %s)) {\n", parcelName.c_str(), name.c_… in EmitCWriteVar()
70 …sb.Append(prefix + TAB).AppendFormat("HDF_LOGE(\"%%{public}s: write %s failed!\", __func__);\n", n… in EmitCWriteVar()
71 sb.Append(prefix + TAB).AppendFormat("%s = HDF_ERR_INVALID_PARAM;\n", ecName.c_str()); in EmitCWriteVar()
72 sb.Append(prefix + TAB).AppendFormat("goto %s;\n", gotoLabel.c_str()); in EmitCWriteVar()
73 sb.Append(prefix).Append("}\n"); in EmitCWriteVar()
77 …::string &ecName, const std::string &gotoLabel, StringBuilder &sb, const std::string &prefix) const in EmitCProxyReadVar()
79 …sb.Append(prefix).AppendFormat("if (!HdfSbufReadUint64(%s, %s)) {\n", parcelName.c_str(), name.c_s… in EmitCProxyReadVar()
80 …sb.Append(prefix + TAB).AppendFormat("HDF_LOGE(\"%%{public}s: read %s failed!\", __func__);\n", na… in EmitCProxyReadVar()
81 sb.Append(prefix + TAB).AppendFormat("%s = HDF_ERR_INVALID_PARAM;\n", ecName.c_str()); in EmitCProxyReadVar()
[all …]
Dast_uchar_type.cpp67 const std::string &gotoLabel, StringBuilder &sb, const std::string &prefix) const in EmitCWriteVar()
69 …sb.Append(prefix).AppendFormat("if (!HdfSbufWriteUint8(%s, %s)) {\n", parcelName.c_str(), name.c_s… in EmitCWriteVar()
70 …sb.Append(prefix + TAB).AppendFormat("HDF_LOGE(\"%%{public}s: write %s failed!\", __func__);\n", n… in EmitCWriteVar()
71 sb.Append(prefix + TAB).AppendFormat("%s = HDF_ERR_INVALID_PARAM;\n", ecName.c_str()); in EmitCWriteVar()
72 sb.Append(prefix + TAB).AppendFormat("goto %s;\n", gotoLabel.c_str()); in EmitCWriteVar()
73 sb.Append(prefix).Append("}\n"); in EmitCWriteVar()
77 …::string &ecName, const std::string &gotoLabel, StringBuilder &sb, const std::string &prefix) const in EmitCProxyReadVar()
79 …sb.Append(prefix).AppendFormat("if (!HdfSbufReadUint8(%s, %s)) {\n", parcelName.c_str(), name.c_st… in EmitCProxyReadVar()
80 …sb.Append(prefix + TAB).AppendFormat("HDF_LOGE(\"%%{public}s: read %s failed!\", __func__);\n", na… in EmitCProxyReadVar()
81 sb.Append(prefix + TAB).AppendFormat("%s = HDF_ERR_INVALID_PARAM;\n", ecName.c_str()); in EmitCProxyReadVar()
[all …]
Dast_ushort_type.cpp67 const std::string &gotoLabel, StringBuilder &sb, const std::string &prefix) const in EmitCWriteVar()
69 …sb.Append(prefix).AppendFormat("if (!HdfSbufWriteUint16(%s, %s)) {\n", parcelName.c_str(), name.c_… in EmitCWriteVar()
70 …sb.Append(prefix + TAB).AppendFormat("HDF_LOGE(\"%%{public}s: write %s failed!\", __func__);\n", n… in EmitCWriteVar()
71 sb.Append(prefix + TAB).AppendFormat("%s = HDF_ERR_INVALID_PARAM;\n", ecName.c_str()); in EmitCWriteVar()
72 sb.Append(prefix + TAB).AppendFormat("goto %s;\n", gotoLabel.c_str()); in EmitCWriteVar()
73 sb.Append(prefix).Append("}\n"); in EmitCWriteVar()
77 …::string &ecName, const std::string &gotoLabel, StringBuilder &sb, const std::string &prefix) const in EmitCProxyReadVar()
79 …sb.Append(prefix).AppendFormat("if (!HdfSbufReadUint16(%s, %s)) {\n", parcelName.c_str(), name.c_s… in EmitCProxyReadVar()
80 …sb.Append(prefix + TAB).AppendFormat("HDF_LOGE(\"%%{public}s: read %s failed!\", __func__);\n", na… in EmitCProxyReadVar()
81 sb.Append(prefix + TAB).AppendFormat("%s = HDF_ERR_INVALID_PARAM;\n", ecName.c_str()); in EmitCProxyReadVar()
[all …]
Dast_uint_type.cpp67 const std::string &gotoLabel, StringBuilder &sb, const std::string &prefix) const in EmitCWriteVar()
69 …sb.Append(prefix).AppendFormat("if (!HdfSbufWriteUint32(%s, %s)) {\n", parcelName.c_str(), name.c_… in EmitCWriteVar()
70 …sb.Append(prefix + TAB).AppendFormat("HDF_LOGE(\"%%{public}s: write %s failed!\", __func__);\n", n… in EmitCWriteVar()
71 sb.Append(prefix + TAB).AppendFormat("%s = HDF_ERR_INVALID_PARAM;\n", ecName.c_str()); in EmitCWriteVar()
72 sb.Append(prefix + TAB).AppendFormat("goto %s;\n", gotoLabel.c_str()); in EmitCWriteVar()
73 sb.Append(prefix).Append("}\n"); in EmitCWriteVar()
77 …::string &ecName, const std::string &gotoLabel, StringBuilder &sb, const std::string &prefix) const in EmitCProxyReadVar()
79 …sb.Append(prefix).AppendFormat("if (!HdfSbufReadUint32(%s, %s)) {\n", parcelName.c_str(), name.c_s… in EmitCProxyReadVar()
80 …sb.Append(prefix + TAB).AppendFormat("HDF_LOGE(\"%%{public}s: read %s failed!\", __func__);\n", na… in EmitCProxyReadVar()
81 sb.Append(prefix + TAB).AppendFormat("%s = HDF_ERR_INVALID_PARAM;\n", ecName.c_str()); in EmitCProxyReadVar()
[all …]
Dast_double_type.cpp66 const std::string &gotoLabel, StringBuilder &sb, const std::string &prefix) const in EmitCWriteVar()
68 …sb.Append(prefix).AppendFormat("if (!HdfSbufWriteDouble(%s, %s)) {\n", parcelName.c_str(), name.c_… in EmitCWriteVar()
69 …sb.Append(prefix + TAB).AppendFormat("HDF_LOGE(\"%%{public}s: write %s failed!\", __func__);\n", n… in EmitCWriteVar()
70 sb.Append(prefix + TAB).AppendFormat("%s = HDF_ERR_INVALID_PARAM;\n", ecName.c_str()); in EmitCWriteVar()
71 sb.Append(prefix + TAB).AppendFormat("goto %s;\n", gotoLabel.c_str()); in EmitCWriteVar()
72 sb.Append(prefix).Append("}\n"); in EmitCWriteVar()
76 …::string &ecName, const std::string &gotoLabel, StringBuilder &sb, const std::string &prefix) const in EmitCProxyReadVar()
78 …sb.Append(prefix).AppendFormat("if (!HdfSbufReadDouble(%s, %s)) {\n", parcelName.c_str(), name.c_s… in EmitCProxyReadVar()
79 …sb.Append(prefix + TAB).AppendFormat("HDF_LOGE(\"%%{public}s: read %s failed!\", __func__);\n", na… in EmitCProxyReadVar()
80 sb.Append(prefix + TAB).AppendFormat("%s = HDF_ERR_INVALID_PARAM;\n", ecName.c_str()); in EmitCProxyReadVar()
[all …]
Dast_short_type.cpp66 const std::string &gotoLabel, StringBuilder &sb, const std::string &prefix) const in EmitCWriteVar()
68 …sb.Append(prefix).AppendFormat("if (!HdfSbufWriteInt16(%s, %s)) {\n", parcelName.c_str(), name.c_s… in EmitCWriteVar()
69 …sb.Append(prefix + TAB).AppendFormat("HDF_LOGE(\"%%{public}s: write %s failed!\", __func__);\n", n… in EmitCWriteVar()
70 sb.Append(prefix + TAB).AppendFormat("%s = HDF_ERR_INVALID_PARAM;\n", ecName.c_str()); in EmitCWriteVar()
71 sb.Append(prefix + TAB).AppendFormat("goto %s;\n", gotoLabel.c_str()); in EmitCWriteVar()
72 sb.Append(prefix).Append("}\n"); in EmitCWriteVar()
76 …::string &ecName, const std::string &gotoLabel, StringBuilder &sb, const std::string &prefix) const in EmitCProxyReadVar()
78 …sb.Append(prefix).AppendFormat("if (!HdfSbufReadInt16(%s, %s)) {\n", parcelName.c_str(), name.c_st… in EmitCProxyReadVar()
79 …sb.Append(prefix + TAB).AppendFormat("HDF_LOGE(\"%%{public}s: read %s failed!\", __func__);\n", na… in EmitCProxyReadVar()
80 sb.Append(prefix + TAB).AppendFormat("%s = HDF_ERR_INVALID_PARAM;\n", ecName.c_str()); in EmitCProxyReadVar()
[all …]
Dast_byte_type.cpp66 const std::string &gotoLabel, StringBuilder &sb, const std::string &prefix) const in EmitCWriteVar()
68 …sb.Append(prefix).AppendFormat("if (!HdfSbufWriteInt8(%s, %s)) {\n", parcelName.c_str(), name.c_st… in EmitCWriteVar()
69 …sb.Append(prefix + TAB).AppendFormat("HDF_LOGE(\"%%{public}s: write %s failed!\", __func__);\n", n… in EmitCWriteVar()
70 sb.Append(prefix + TAB).AppendFormat("%s = HDF_ERR_INVALID_PARAM;\n", ecName.c_str()); in EmitCWriteVar()
71 sb.Append(prefix + TAB).AppendFormat("goto %s;\n", gotoLabel.c_str()); in EmitCWriteVar()
72 sb.Append(prefix).Append("}\n"); in EmitCWriteVar()
76 …::string &ecName, const std::string &gotoLabel, StringBuilder &sb, const std::string &prefix) const in EmitCProxyReadVar()
78 …sb.Append(prefix).AppendFormat("if (!HdfSbufReadInt8(%s, %s)) {\n", parcelName.c_str(), name.c_str… in EmitCProxyReadVar()
79 …sb.Append(prefix + TAB).AppendFormat("HDF_LOGE(\"%%{public}s: read %s failed!\", __func__);\n", na… in EmitCProxyReadVar()
80 sb.Append(prefix + TAB).AppendFormat("%s = HDF_ERR_INVALID_PARAM;\n", ecName.c_str()); in EmitCProxyReadVar()
[all …]
Dast_boolean_type.cpp66 const std::string &gotoLabel, StringBuilder &sb, const std::string &prefix) const in EmitCWriteVar()
68 …sb.Append(prefix).AppendFormat("if (!HdfSbufWriteInt8(%s, %s ? 1 : 0)) {\n", parcelName.c_str(), n… in EmitCWriteVar()
69 …sb.Append(prefix + TAB).AppendFormat("HDF_LOGE(\"%%{public}s: write %s failed!\", __func__);\n", n… in EmitCWriteVar()
70 sb.Append(prefix + TAB).AppendFormat("%s = HDF_ERR_INVALID_PARAM;\n", ecName.c_str()); in EmitCWriteVar()
71 sb.Append(prefix + TAB).AppendFormat("goto %s;\n", gotoLabel.c_str()); in EmitCWriteVar()
72 sb.Append(prefix).Append("}\n"); in EmitCWriteVar()
76 …::string &ecName, const std::string &gotoLabel, StringBuilder &sb, const std::string &prefix) const in EmitCProxyReadVar()
78 …sb.Append(prefix).AppendFormat("if (!HdfSbufReadInt8(%s, (int8_t *)%s)) {\n", parcelName.c_str(), … in EmitCProxyReadVar()
79 …sb.Append(prefix + TAB).AppendFormat("HDF_LOGE(\"%%{public}s: read %s failed!\", __func__);\n", na… in EmitCProxyReadVar()
80 sb.Append(prefix + TAB).AppendFormat("%s = HDF_ERR_INVALID_PARAM;\n", ecName.c_str()); in EmitCProxyReadVar()
[all …]
Dast_float_type.cpp66 const std::string &gotoLabel, StringBuilder &sb, const std::string &prefix) const in EmitCWriteVar()
68 …sb.Append(prefix).AppendFormat("if (!HdfSbufWriteFloat(%s, %s)) {\n", parcelName.c_str(), name.c_s… in EmitCWriteVar()
69 …sb.Append(prefix + TAB).AppendFormat("HDF_LOGE(\"%%{public}s: write %s failed!\", __func__);\n", n… in EmitCWriteVar()
70 sb.Append(prefix + TAB).AppendFormat("%s = HDF_ERR_INVALID_PARAM;\n", ecName.c_str()); in EmitCWriteVar()
71 sb.Append(prefix + TAB).AppendFormat("goto %s;\n", gotoLabel.c_str()); in EmitCWriteVar()
72 sb.Append(prefix).Append("}\n"); in EmitCWriteVar()
76 …::string &ecName, const std::string &gotoLabel, StringBuilder &sb, const std::string &prefix) const in EmitCProxyReadVar()
78 …sb.Append(prefix).AppendFormat("if (!HdfSbufReadFloat(%s, %s)) {\n", parcelName.c_str(), name.c_st… in EmitCProxyReadVar()
79 …sb.Append(prefix + TAB).AppendFormat("HDF_LOGE(\"%%{public}s: read %s failed!\", __func__);\n", na… in EmitCProxyReadVar()
80 sb.Append(prefix + TAB).AppendFormat("%s = HDF_ERR_INVALID_PARAM;\n", ecName.c_str()); in EmitCProxyReadVar()
[all …]
Dast_long_type.cpp66 const std::string &gotoLabel, StringBuilder &sb, const std::string &prefix) const in EmitCWriteVar()
68 …sb.Append(prefix).AppendFormat("if (!HdfSbufWriteInt64(%s, %s)) {\n", parcelName.c_str(), name.c_s… in EmitCWriteVar()
69 …sb.Append(prefix + TAB).AppendFormat("HDF_LOGE(\"%%{public}s: write %s failed!\", __func__);\n", n… in EmitCWriteVar()
70 sb.Append(prefix + TAB).AppendFormat("%s = HDF_ERR_INVALID_PARAM;\n", ecName.c_str()); in EmitCWriteVar()
71 sb.Append(prefix + TAB).AppendFormat("goto %s;\n", gotoLabel.c_str()); in EmitCWriteVar()
72 sb.Append(prefix).Append("}\n"); in EmitCWriteVar()
76 …::string &ecName, const std::string &gotoLabel, StringBuilder &sb, const std::string &prefix) const in EmitCProxyReadVar()
78 …sb.Append(prefix).AppendFormat("if (!HdfSbufReadInt64(%s, %s)) {\n", parcelName.c_str(), name.c_st… in EmitCProxyReadVar()
79 …sb.Append(prefix + TAB).AppendFormat("HDF_LOGE(\"%%{public}s: read %s failed!\", __func__);\n", na… in EmitCProxyReadVar()
80 sb.Append(prefix + TAB).AppendFormat("%s = HDF_ERR_INVALID_PARAM;\n", ecName.c_str()); in EmitCProxyReadVar()
[all …]
Dast_integer_type.cpp66 const std::string &gotoLabel, StringBuilder &sb, const std::string &prefix) const in EmitCWriteVar()
68 …sb.Append(prefix).AppendFormat("if (!HdfSbufWriteInt32(%s, %s)) {\n", parcelName.c_str(), name.c_s… in EmitCWriteVar()
69 …sb.Append(prefix + TAB).AppendFormat("HDF_LOGE(\"%%{public}s: write %s failed!\", __func__);\n", n… in EmitCWriteVar()
70 sb.Append(prefix + TAB).AppendFormat("%s = HDF_ERR_INVALID_PARAM;\n", ecName.c_str()); in EmitCWriteVar()
71 sb.Append(prefix + TAB).AppendFormat("goto %s;\n", gotoLabel.c_str()); in EmitCWriteVar()
72 sb.Append(prefix).Append("}\n"); in EmitCWriteVar()
76 …::string &ecName, const std::string &gotoLabel, StringBuilder &sb, const std::string &prefix) const in EmitCProxyReadVar()
78 …sb.Append(prefix).AppendFormat("if (!HdfSbufReadInt32(%s, %s)) {\n", parcelName.c_str(), name.c_st… in EmitCProxyReadVar()
79 …sb.Append(prefix + TAB).AppendFormat("HDF_LOGE(\"%%{public}s: read %s failed!\", __func__);\n", na… in EmitCProxyReadVar()
80 sb.Append(prefix + TAB).AppendFormat("%s = HDF_ERR_INVALID_PARAM;\n", ecName.c_str()); in EmitCProxyReadVar()
[all …]
Dast_native_buffer_type.cpp61 …::string &ecName, const std::string &gotoLabel, StringBuilder &sb, const std::string &prefix) const in EmitCWriteVar()
63 …sb.Append(prefix).AppendFormat("if (!HdfSbufWriteNativeBufferHandle(%s, %s)) {\n", parcelName.c_st… in EmitCWriteVar()
65 …sb.Append(prefix + TAB).AppendFormat("HDF_LOGE(\"%%{public}s: failed to write %s\", __func__);\n",… in EmitCWriteVar()
66 sb.Append(prefix + TAB).Append("return HDF_ERR_INVALID_PARAM;\n"); in EmitCWriteVar()
67 sb.Append(prefix).Append("}\n"); in EmitCWriteVar()
71 …::string &ecName, const std::string &gotoLabel, StringBuilder &sb, const std::string &prefix) const in EmitCProxyReadVar()
73 sb.Append(prefix); in EmitCProxyReadVar()
78 sb.Append(prefix).AppendFormat("if (%s == NULL) {\n", name.c_str()); in EmitCProxyReadVar()
79 …sb.Append(prefix + TAB).AppendFormat("HDF_LOGE(\"%%{public}s: read %s failed!\", __func__);\n", na… in EmitCProxyReadVar()
80 sb.Append(prefix + TAB).AppendFormat("%s = HDF_ERR_INVALID_PARAM;\n", ecName.c_str()); in EmitCProxyReadVar()
[all …]
Dast_union_type.cpp30 std::string ASTUnionType::Dump(const std::string &prefix) in Dump() argument
33 sb.Append(prefix).Append(attr_->Dump(prefix)).Append(" "); in Dump()
37 sb.Append(prefix + " "); in Dump()
41 sb.Append(prefix).Append("};\n"); in Dump()
129 const std::string &gotoLabel, StringBuilder &sb, const std::string &prefix) const in EmitCWriteVar()
132 … sb.Append(prefix).AppendFormat("if (!HdfSbufWriteBuffer(%s, (const void *)%s, sizeof(%s))) {\n", in EmitCWriteVar()
135 …sb.Append(prefix).AppendFormat("if (!HdfSbufWriteUnpadBuffer(%s, (const uint8_t *)%s, sizeof(%s)))… in EmitCWriteVar()
138 …sb.Append(prefix + TAB).AppendFormat("HDF_LOGE(\"%%{public}s: write %s failed!\", __func__);\n", n… in EmitCWriteVar()
139 sb.Append(prefix + TAB).AppendFormat("%s = HDF_ERR_INVALID_PARAM;\n", ecName.c_str()); in EmitCWriteVar()
140 sb.Append(prefix + TAB).AppendFormat("goto %s;\n", gotoLabel.c_str()); in EmitCWriteVar()
[all …]
Dast_interface_type.cpp70 std::string ASTInterfaceType::Dump(const std::string &prefix) in Dump() argument
74 sb.Append(prefix); in Dump()
75 sb.Append(prefix).Append(attr_->Dump(prefix)).Append(" "); in Dump()
78 std::string info = method->Dump(prefix + " "); in Dump()
84 sb.Append(prefix).Append("}\n"); in Dump()
148 const std::string &gotoLabel, StringBuilder &sb, const std::string &prefix) const in EmitCWriteVar()
150 sb.Append(prefix).AppendFormat("if (!WriteInterface(%s, %s, %s)) {\n", parcelName.c_str(), in EmitCWriteVar()
152 …sb.Append(prefix + TAB).AppendFormat("HDF_LOGE(\"%%{public}s: write %s failed!\", __func__);\n", n… in EmitCWriteVar()
153 sb.Append(prefix + TAB).AppendFormat("%s = HDF_ERR_INVALID_PARAM;\n", ecName.c_str()); in EmitCWriteVar()
154 sb.Append(prefix + TAB).AppendFormat("goto %s;\n", gotoLabel.c_str()); in EmitCWriteVar()
[all …]
Dast_enum_type.cpp32 std::string ASTEnumType::Dump(const std::string &prefix) in Dump() argument
35 sb.Append(prefix).Append(attr_->Dump(prefix)).Append(" "); in Dump()
53 sb.Append(prefix).Append("};\n"); in Dump()
147 const std::string &gotoLabel, StringBuilder &sb, const std::string &prefix) const in EmitCWriteVar()
149 …sb.Append(prefix).AppendFormat("if (!HdfSbufWriteUint64(%s, (uint64_t)%s)) {\n", parcelName.c_str(… in EmitCWriteVar()
150 …sb.Append(prefix + TAB).AppendFormat("HDF_LOGE(\"%%{public}s: write %s failed!\", __func__);\n", n… in EmitCWriteVar()
151 sb.Append(prefix + TAB).AppendFormat("%s = HDF_ERR_INVALID_PARAM;\n", ecName.c_str()); in EmitCWriteVar()
152 sb.Append(prefix + TAB).AppendFormat("goto %s;\n", gotoLabel.c_str()); in EmitCWriteVar()
153 sb.Append(prefix).Append("}\n"); in EmitCWriteVar()
157 …::string &ecName, const std::string &gotoLabel, StringBuilder &sb, const std::string &prefix) const in EmitCProxyReadVar()
[all …]
Dast_map_type.cpp86 const std::string &prefix, unsigned int innerLevel) const in EmitCppWriteVar() argument
88 …sb.Append(prefix).AppendFormat("if (!%s.WriteUint32(%s.size())) {\n", parcelName.c_str(), name.c_s… in EmitCppWriteVar()
89 …sb.Append(prefix + TAB).AppendFormat("HDF_LOGE(\"%%{public}s: write %s failed!\", __func__);\n", n… in EmitCppWriteVar()
90 sb.Append(prefix + TAB).Append("return HDF_ERR_INVALID_PARAM;\n"); in EmitCppWriteVar()
91 sb.Append(prefix).Append("}\n"); in EmitCppWriteVar()
93 sb.Append(prefix).AppendFormat("for (auto %s : %s) {\n", elementName.c_str(), name.c_str()); in EmitCppWriteVar()
97 keyType_->EmitCppWriteVar(parcelName, keyName, sb, prefix + TAB, innerLevel); in EmitCppWriteVar()
98 valueType_->EmitCppWriteVar(parcelName, valueName, sb, prefix + TAB, innerLevel); in EmitCppWriteVar()
99 sb.Append(prefix).Append("}\n"); in EmitCppWriteVar()
103 const std::string &prefix, bool initVariable, unsigned int innerLevel) const in EmitCppReadVar() argument
[all …]
Dast_smq_type.cpp59 const std::string &prefix, unsigned int innerLevel) const in EmitCppWriteVar() argument
61 sb.Append(prefix).AppendFormat( in EmitCppWriteVar()
64 …sb.Append(prefix + TAB).AppendFormat("HDF_LOGE(\"%%{public}s: write %s failed!\", __func__);\n", n… in EmitCppWriteVar()
65 sb.Append(prefix + TAB).Append("return HDF_ERR_INVALID_PARAM;\n"); in EmitCppWriteVar()
66 sb.Append(prefix).Append("}\n"); in EmitCppWriteVar()
70 const std::string &prefix, bool initVariable, unsigned int innerLevel) const in EmitCppReadVar() argument
73 sb.Append(prefix).AppendFormat( in EmitCppReadVar()
77 sb.Append(prefix).AppendFormat("if (%s == nullptr) {\n", metaVarName.c_str()); in EmitCppReadVar()
78 …sb.Append(prefix + TAB).AppendFormat("HDF_LOGE(\"%%{public}s: SharedMemQueueMeta is nullptr\", __f… in EmitCppReadVar()
79 sb.Append(prefix + TAB).Append("return HDF_ERR_INVALID_PARAM;\n"); in EmitCppReadVar()
[all …]
Dast_struct_type.cpp33 std::string ASTStructType::Dump(const std::string &prefix) in Dump() argument
36 sb.Append(prefix).Append(attr_->Dump(prefix)).Append(" "); in Dump()
40 sb.Append(prefix + " "); in Dump()
44 sb.Append(prefix).Append("};\n"); in Dump()
141 const std::string &gotoLabel, StringBuilder &sb, const std::string &prefix) const in EmitCWriteVar()
143 sb.Append(prefix).AppendFormat( in EmitCWriteVar()
145 …sb.Append(prefix + TAB).AppendFormat("HDF_LOGE(\"%%{public}s: write %s failed!\", __func__);\n", n… in EmitCWriteVar()
146 sb.Append(prefix + TAB).AppendFormat("%s = HDF_ERR_INVALID_PARAM;\n", ecName.c_str()); in EmitCWriteVar()
147 sb.Append(prefix + TAB).AppendFormat("goto %s;\n", gotoLabel.c_str()); in EmitCWriteVar()
148 sb.Append(prefix).Append("}\n"); in EmitCWriteVar()
[all …]
/drivers/hdf_core/framework/tools/hdi-gen/codegen/
Dcpp_service_stub_code_emitter.cpp102 void CppServiceStubCodeEmitter::EmitStubBody(StringBuilder &sb, const std::string &prefix) const in EmitStubBody()
105 EmitStubConstructorDecl(sb, prefix); in EmitStubBody()
107 EmitStubOnRequestDecl(sb, prefix); in EmitStubBody()
109 EmitStubMethodDecls(sb, prefix); in EmitStubBody()
111 EmitStubPrivateData(sb, prefix); in EmitStubBody()
114 …ServiceStubCodeEmitter::EmitStubConstructorDecl(StringBuilder &sb, const std::string &prefix) const in EmitStubConstructorDecl()
116 …sb.Append(prefix).AppendFormat("explicit %s(const sptr<%s> &impl);\n", stubName_.c_str(), interfac… in EmitStubConstructorDecl()
117 sb.Append(prefix).AppendFormat("virtual ~%s();\n", stubName_.c_str()); in EmitStubConstructorDecl()
120 void CppServiceStubCodeEmitter::EmitStubOnRequestDecl(StringBuilder &sb, const std::string &prefix)… in EmitStubOnRequestDecl()
122 …sb.Append(prefix).Append("int32_t OnRemoteRequest(uint32_t code, MessageParcel &data, MessageParce… in EmitStubOnRequestDecl()
[all …]
Dcpp_client_proxy_code_emitter.cpp96 void CppClientProxyCodeEmitter::EmitProxyDecl(StringBuilder &sb, const std::string &prefix) in EmitProxyDecl() argument
98 (void)prefix; in EmitProxyDecl()
111 void CppClientProxyCodeEmitter::EmitProxyConstructor(StringBuilder &sb, const std::string &prefix) … in EmitProxyConstructor()
113 …sb.Append(prefix).AppendFormat("explicit %s(const sptr<IRemoteObject>& remote)", proxyName_.c_str(… in EmitProxyConstructor()
116 sb.Append(prefix).AppendFormat("virtual ~%s() = default;\n", proxyName_.c_str()); in EmitProxyConstructor()
119 void CppClientProxyCodeEmitter::EmitProxyMethodDecls(StringBuilder &sb, const std::string &prefix) … in EmitProxyMethodDecls()
124 EmitProxyMethodDecl(method, sb, prefix); in EmitProxyMethodDecls()
129 EmitProxyMethodDecl(interface_->GetVersionMethod(), sb, prefix); in EmitProxyMethodDecls()
132 EmitProxyStaticMethodDecl(method, sb, prefix); in EmitProxyMethodDecls()
136 EmitProxyStaticMethodDecl(interface_->GetVersionMethod(), sb, prefix); in EmitProxyMethodDecls()
[all …]
Djava_client_proxy_code_emitter.cpp128 void JavaClientProxyCodeEmitter::EmitProxyConstants(StringBuilder &sb, const std::string &prefix) in EmitProxyConstants() argument
130 sb.Append(prefix).AppendFormat( in EmitProxyConstants()
132 EmitInterfaceMethodCommands(sb, prefix); in EmitProxyConstants()
135 void JavaClientProxyCodeEmitter::EmitProxyConstructor(StringBuilder &sb, const std::string &prefix)… in EmitProxyConstructor()
137 sb.Append(prefix).AppendFormat("public %s(IRemoteObject remote) {\n", proxyName_.c_str()); in EmitProxyConstructor()
138 sb.Append(prefix + TAB).Append("this.remote = remote;\n"); in EmitProxyConstructor()
139 sb.Append(prefix).Append("}\n"); in EmitProxyConstructor()
141 sb.Append(prefix).AppendFormat("@Override\n"); in EmitProxyConstructor()
142 sb.Append(prefix).Append("public IRemoteObject asObject() {\n"); in EmitProxyConstructor()
143 sb.Append(prefix + TAB).Append("return remote;\n"); in EmitProxyConstructor()
[all …]
Dcpp_service_stub_code_emitter.h38 void EmitStubBody(StringBuilder &sb, const std::string &prefix) const;
40 void EmitStubConstructorDecl(StringBuilder &sb, const std::string &prefix) const;
42 void EmitStubOnRequestDecl(StringBuilder &sb, const std::string &prefix) const;
44 void EmitStubMethodDecls(StringBuilder &sb, const std::string &prefix) const;
46 …ubMethodDecl(const AutoPtr<ASTMethod> &method, StringBuilder &sb, const std::string &prefix) const;
48 void EmitStubPrivateData(StringBuilder &sb, const std::string &prefix) const;
57 void EmitInterfaceGetMethodImpl(StringBuilder &sb, const std::string &prefix) const;
59 void EmitGetMethodImpl(StringBuilder &sb, const std::string &prefix) const;
61 void EmitGetInstanceMethodImpl(StringBuilder &sb, const std::string &prefix) const;
63 void EmitStubConstructorImpl(StringBuilder &sb, const std::string &prefix) const;
[all …]

12345