Lines Matching refs:object

166     inline bool deserialize(Object* object, NodeType* root) {  in deserialize()
167 bool ret = deserialize(object, root, &mLastError); in deserialize()
174 inline bool deserialize(Object* object, NodeType* root, std::string* error) const { in deserialize()
178 return this->buildObject(object, root, error); in deserialize()
410 virtual void mutateNode(const Object &object, NodeType *root, DocType *d) const override { in mutateNode()
411 appendText(root, ::android::vintf::to_string(object), d); in mutateNode()
413 virtual bool buildObject(Object* object, NodeType* root, std::string* error) const override { in buildObject()
414 return this->parseText(root, object, error); in buildObject()
456 void mutateNode(const TransportArch &object, NodeType *root, DocType *d) const override { in mutateNode()
457 if (object.arch != Arch::ARCH_EMPTY) { in mutateNode()
458 appendAttr(root, "arch", object.arch); in mutateNode()
460 appendText(root, ::android::vintf::to_string(object.transport), d); in mutateNode()
462 bool buildObject(TransportArch* object, NodeType* root, std::string* error) const override { in buildObject()
463 if (!parseOptionalAttr(root, "arch", Arch::ARCH_EMPTY, &object->arch, error) || in buildObject()
464 !parseText(root, &object->transport, error)) { in buildObject()
467 if (!object->isValid(error)) { in buildObject()
478 … void mutateNode(const KernelConfigTypedValue &object, NodeType *root, DocType *d) const override { in mutateNode()
479 appendAttr(root, "type", object.mType); in mutateNode()
480 appendText(root, ::android::vintf::to_string(object), d); in mutateNode()
482 bool buildObject(KernelConfigTypedValue* object, NodeType* root, in buildObject()
485 if (!parseAttr(root, "type", &object->mType, error) || in buildObject()
489 if (!::android::vintf::parseKernelConfigValue(stringValue, object)) { in buildObject()
557 bool buildObject(MatrixHal* object, NodeType* root, std::string* error) const override { in buildObject()
559 if (!parseOptionalAttr(root, "format", HalFormat::HIDL, &object->format, error) || in buildObject()
560 !parseOptionalAttr(root, "optional", false /* defaultValue */, &object->optional, in buildObject()
562 !parseTextElement(root, "name", &object->name, error) || in buildObject()
563 !parseChildren(root, versionRangeConverter, &object->versionRanges, error) || in buildObject()
567 if (object->format == HalFormat::AIDL) { in buildObject()
568 if (!object->versionRanges.empty()) { in buildObject()
570 << object->name; in buildObject()
571 object->versionRanges.clear(); in buildObject()
575 object->versionRanges.push_back(details::kFakeAidlVersionRange); in buildObject()
579 auto res = object->interfaces.emplace(std::move(name), std::move(interface)); in buildObject()
589 if (!checkAdditionalRestrictionsOnHal(*object, error)) { in buildObject()
635 bool buildObject(std::vector<KernelConfig>* object, NodeType* root, in buildObject()
637 return parseChildren(root, matrixKernelConfigConverter, object, error); in buildObject()
667 bool buildObject(MatrixKernel* object, NodeType* root, std::string* error) const override { in buildObject()
669 if (!parseAttr(root, "version", &object->mMinLts, error) || in buildObject()
671 !parseOptionalChild(root, matrixKernelConditionsConverter, {}, &object->mConditions, in buildObject()
673 !parseChildren(root, matrixKernelConfigConverter, &object->mConfigs, error)) { in buildObject()
676 object->setSourceMatrixLevel(sourceMatrixLevel); in buildObject()
715 bool buildObject(ManifestHal* object, NodeType* root, std::string* error) const override { in buildObject()
717 if (!parseOptionalAttr(root, "format", HalFormat::HIDL, &object->format, error) || in buildObject()
718 !parseOptionalAttr(root, "override", false, &object->mIsOverride, error) || in buildObject()
719 !parseTextElement(root, "name", &object->name, error) || in buildObject()
720 !parseOptionalChild(root, transportArchConverter, {}, &object->transportArch, error) || in buildObject()
721 !parseChildren(root, versionConverter, &object->versions, error) || in buildObject()
726 switch (object->format) { in buildObject()
728 if (object->transportArch.empty()) { in buildObject()
729 *error = "HIDL HAL '" + object->name + "' should have <transport> defined."; in buildObject()
734 if (!object->transportArch.empty()) { in buildObject()
736 "Native HAL '" + object->name + "' should not have <transport> defined."; in buildObject()
741 if (!object->transportArch.empty()) { in buildObject()
743 << object->name; in buildObject()
744 object->transportArch = {}; in buildObject()
746 if (!object->versions.empty()) { in buildObject()
748 << object->name; in buildObject()
749 object->versions.clear(); in buildObject()
752 object->versions.push_back(details::kFakeAidlVersion); in buildObject()
757 object->format); in buildObject()
760 if (!object->transportArch.isValid(error)) return false; in buildObject()
762 object->interfaces.clear(); in buildObject()
764 auto res = object->interfaces.emplace(interface.name(), std::move(interface)); in buildObject()
772 if (!object->isValid(error)) { in buildObject()
773 error->insert(0, "'" + object->name + "' is not a valid Manifest HAL: "); in buildObject()
778 if (!checkAdditionalRestrictionsOnHal(*object, error)) { in buildObject()
793 if (object->format == HalFormat::AIDL) { in buildObject()
807 if (!object->insertInstances(fqInstancesToInsert, error)) { in buildObject()
842 void mutateNode(const Sepolicy &object, NodeType *root, DocType *d) const override { in mutateNode()
843 appendChild(root, kernelSepolicyVersionConverter(object.kernelSepolicyVersion(), d)); in mutateNode()
844 appendChildren(root, sepolicyVersionConverter, object.sepolicyVersions(), d); in mutateNode()
846 bool buildObject(Sepolicy* object, NodeType* root, std::string* error) const override { in buildObject()
847 if (!parseChild(root, kernelSepolicyVersionConverter, &object->mKernelSepolicyVersion, in buildObject()
849 !parseChildren(root, sepolicyVersionConverter, &object->mSepolicyVersionRanges, in buildObject()
865 void mutateNode(const Vndk &object, NodeType *root, DocType *d) const override { in mutateNode()
866 appendChild(root, vndkVersionRangeConverter(object.mVersionRange, d)); in mutateNode()
867 appendChildren(root, vndkLibraryConverter, object.mLibraries, d); in mutateNode()
869 bool buildObject(Vndk* object, NodeType* root, std::string* error) const override { in buildObject()
870 if (!parseChild(root, vndkVersionRangeConverter, &object->mVersionRange, error) || in buildObject()
871 !parseChildren(root, vndkLibraryConverter, &object->mLibraries, error)) { in buildObject()
882 void mutateNode(const VendorNdk& object, NodeType* root, DocType* d) const override { in mutateNode()
883 appendChild(root, vndkVersionConverter(object.mVersion, d)); in mutateNode()
884 appendChildren(root, vndkLibraryConverter, object.mLibraries, d); in mutateNode()
886 bool buildObject(VendorNdk* object, NodeType* root, std::string* error) const override { in buildObject()
887 if (!parseChild(root, vndkVersionConverter, &object->mVersion, error) || in buildObject()
888 !parseChildren(root, vndkLibraryConverter, &object->mLibraries, error)) { in buildObject()
901 void mutateNode(const SystemSdk& object, NodeType* root, DocType* d) const override { in mutateNode()
902 appendChildren(root, systemSdkVersionConverter, object.versions(), d); in mutateNode()
904 bool buildObject(SystemSdk* object, NodeType* root, std::string* error) const override { in buildObject()
905 return parseChildren(root, systemSdkVersionConverter, &object->mVersions, error); in buildObject()
916 bool buildObject(Version* object, NodeType* root, std::string* error) const override { in buildObject()
917 return parseChild(root, versionConverter, object, error); in buildObject()
931 bool buildObject(ManifestXmlFile* object, NodeType* root, std::string* error) const override { in buildObject()
932 if (!parseTextElement(root, "name", &object->mName, error) || in buildObject()
933 !parseChild(root, versionConverter, &object->mVersion, error) || in buildObject()
934 !parseOptionalTextElement(root, "path", {}, &object->mOverriddenPath, error)) { in buildObject()
1024 bool buildObject(HalManifest* object, NodeType* root, std::string* error) const override { in buildObject()
1033 if (!parseAttr(root, "type", &object->mType, error)) { in buildObject()
1042 hal.setFileName(object->fileName()); in buildObject()
1045 if (object->mType == SchemaType::DEVICE) { in buildObject()
1050 &object->device.mSepolicyVersion, error)) { in buildObject()
1054 if (!parseOptionalAttr(root, "target-level", Level::UNSPECIFIED, &object->mLevel, in buildObject()
1059 if (!parseOptionalChild(root, kernelInfoConverter, &object->device.mKernel, error)) { in buildObject()
1062 } else if (object->mType == SchemaType::FRAMEWORK) { in buildObject()
1065 if (!parseChildren(root, vndkConverter, &object->framework.mVndks, error)) { in buildObject()
1068 for (const auto &vndk : object->framework.mVndks) { in buildObject()
1077 if (!parseChildren(root, vendorNdkConverter, &object->framework.mVendorNdks, error)) { in buildObject()
1082 for (const auto& vendorNdk : object->framework.mVendorNdks) { in buildObject()
1090 if (!parseOptionalChild(root, systemSdkConverter, {}, &object->framework.mSystemSdk, in buildObject()
1097 if (!object->add(std::move(hal))) { in buildObject()
1109 if (!object->addXmlFile(std::move(xmlFile))) { in buildObject()
1128 bool buildObject(Version* object, NodeType* root, std::string* error) const override { in buildObject()
1129 return parseChild(root, avbVersionConverter, object, error); in buildObject()
1145 bool buildObject(MatrixXmlFile* object, NodeType* root, std::string* error) const override { in buildObject()
1146 if (!parseTextElement(root, "name", &object->mName, error) || in buildObject()
1147 !parseAttr(root, "format", &object->mFormat, error) || in buildObject()
1148 !parseOptionalAttr(root, "optional", false, &object->mOptional, error) || in buildObject()
1149 !parseChild(root, versionRangeConverter, &object->mVersionRange, error) || in buildObject()
1150 !parseOptionalTextElement(root, "path", {}, &object->mOverriddenPath, error)) { in buildObject()
1217 bool buildObject(CompatibilityMatrix* object, NodeType* root, in buildObject()
1228 if (!parseAttr(root, "type", &object->mType, error) || in buildObject()
1233 if (object->mType == SchemaType::FRAMEWORK) { in buildObject()
1236 if (!parseChildren(root, matrixKernelConverter, &object->framework.mKernels, error) || in buildObject()
1237 !parseOptionalChild(root, sepolicyConverter, {}, &object->framework.mSepolicy, in buildObject()
1239 !parseOptionalChild(root, avbConverter, {}, &object->framework.mAvbMetaVersion, in buildObject()
1245 for (const auto& kernel : object->framework.mKernels) { in buildObject()
1258 if (!parseOptionalAttr(root, "level", Level::UNSPECIFIED, &object->mLevel, error)) { in buildObject()
1262 } else if (object->mType == SchemaType::DEVICE) { in buildObject()
1267 if (!parseOptionalChild(root, vndkConverter, {}, &object->device.mVndk, error)) { in buildObject()
1272 if (!parseOptionalChild(root, vendorNdkConverter, {}, &object->device.mVendorNdk, in buildObject()
1277 if (!parseOptionalChild(root, systemSdkConverter, {}, &object->device.mSystemSdk, in buildObject()
1284 if (!object->add(std::move(hal))) { in buildObject()
1301 if (!object->addXmlFile(std::move(xmlFile))) { in buildObject()