Home
last modified time | relevance | path

Searched refs:resourceItem (Results 1 – 17 of 17) sorted by relevance

/developtools/global_resource_tool/src/
Djson_compiler.cpp147 ResourceItem resourceItem(nameNode->valuestring, fileInfo.keyParams, fileInfo.fileType); in ParseJsonObjectLevel() local
148 resourceItem.SetFilePath(fileInfo.filePath); in ParseJsonObjectLevel()
149 resourceItem.SetLimitKey(fileInfo.limitKey); in ParseJsonObjectLevel()
156 if (!ret->second(objectNode, resourceItem)) { in ParseJsonObjectLevel()
160 return MergeResourceItem(resourceItem); in ParseJsonObjectLevel()
163 bool JsonCompiler::HandleString(const cJSON *objectNode, ResourceItem &resourceItem) const in HandleString()
166 if (!CheckJsonStringValue(valueNode, resourceItem)) { in HandleString()
169 return PushString(valueNode->valuestring, resourceItem); in HandleString()
172 bool JsonCompiler::HandleInteger(const cJSON *objectNode, ResourceItem &resourceItem) const in HandleInteger()
175 if (!CheckJsonIntegerValue(valueNode, resourceItem)) { in HandleInteger()
[all …]
Dreference_parser.cpp70 for (auto &resourceItem : iter.second) { in ParseRefInResources() local
71 … if (IsElementRef(resourceItem) && ParseRefInResourceItem(resourceItem) != RESTOOL_SUCCESS) { in ParseRefInResources()
74 if ((IsMediaRef(resourceItem) || IsProfileRef(resourceItem)) && in ParseRefInResources()
75 ParseRefInJsonFile(resourceItem, output) != RESTOOL_SUCCESS) { in ParseRefInResources()
83 uint32_t ReferenceParser::ParseRefInResourceItem(ResourceItem &resourceItem) const in ParseRefInResourceItem()
85 ResType resType = resourceItem.GetResType(); in ParseRefInResourceItem()
89 …data = string(reinterpret_cast<const char *>(resourceItem.GetData()), resourceItem.GetDataLength()… in ParseRefInResourceItem()
91 … cerr << "Error: please check JSON file." << NEW_LINE_PATH << resourceItem.GetFilePath() << endl; in ParseRefInResourceItem()
98 if (!ParseRefResourceItemData(resourceItem, data, update)) { in ParseRefInResourceItem()
105 …if (update && !resourceItem.SetData(reinterpret_cast<const int8_t *>(data.c_str()), data.length())… in ParseRefInResourceItem()
[all …]
Dresource_append.cpp282 for (const auto &resourceItem : item.second) { in ScanFile() local
283 if (!WriteResourceItem(resourceItem, outStream)) { in ScanFile()
358 bool ResourceAppend::WriteResourceItem(const ResourceItem &resourceItem, ostringstream &out) in WriteResourceItem() argument
360 uint32_t size = resourceItem.GetName().length(); in WriteResourceItem()
362 out.write(reinterpret_cast<const char *>(resourceItem.GetName().c_str()), size); in WriteResourceItem()
364 size = resourceItem.GetLimitKey().length(); in WriteResourceItem()
366 out.write(reinterpret_cast<const char *>(resourceItem.GetLimitKey().c_str()), size); in WriteResourceItem()
368 size = resourceItem.GetFilePath().length(); in WriteResourceItem()
370 out.write(reinterpret_cast<const char *>(resourceItem.GetFilePath().c_str()), size); in WriteResourceItem()
372 int32_t type = static_cast<int32_t>(resourceItem.GetResType()); in WriteResourceItem()
[all …]
Di_resource_compiler.cpp124 bool IResourceCompiler::MergeResourceItem(const ResourceItem &resourceItem) in MergeResourceItem() argument
126 string idName = ResourceUtil::GetIdName(resourceItem.GetName(), resourceItem.GetResType()); in MergeResourceItem()
128 …cerr << "Error: invalid idName '" << idName << "'."<< NEW_LINE_PATH << resourceItem.GetFilePath()… in MergeResourceItem()
133 auto item = nameInfos_.find(make_pair(resourceItem.GetResType(), idName)); in MergeResourceItem()
135 nameInfos_[make_pair(resourceItem.GetResType(), idName)].push_back(resourceItem); in MergeResourceItem()
139 auto ret = find_if(item->second.begin(), item->second.end(), [resourceItem](auto &iter) { in MergeResourceItem()
140 return resourceItem.GetLimitKey() == iter.GetLimitKey(); in MergeResourceItem()
144 cerr << "but declare again." << NEW_LINE_PATH << resourceItem.GetFilePath() << endl; in MergeResourceItem()
148 nameInfos_[make_pair(resourceItem.GetResType(), idName)].push_back(resourceItem); in MergeResourceItem()
Dappend_compiler.cpp30 ResourceItem resourceItem(fileInfo.filename, fileInfo.keyParams, type_); in CompileSingleFile() local
31 resourceItem.SetFilePath(fileInfo.filePath); in CompileSingleFile()
32 resourceItem.SetLimitKey(fileInfo.limitKey); in CompileSingleFile()
35 if (!resourceItem.SetData(reinterpret_cast<const int8_t *>(data.c_str()), data.length())) { in CompileSingleFile()
40 if (!MergeResourceItem(resourceItem)) { in CompileSingleFile()
Dresource_module.cpp86 for (const auto &resourceItem : iter.second) { in MergeResourceItem() local
87 …t = find_if(result.first->second.begin(), result.first->second.end(), [&resourceItem](auto &iter) { in MergeResourceItem()
88 return resourceItem.GetLimitKey() == iter.GetLimitKey(); in MergeResourceItem()
91 result.first->second.push_back(resourceItem); in MergeResourceItem()
95 cerr << "Error: '"<< resourceItem.GetName() <<"' conflict, first declared."; in MergeResourceItem()
97 cerr << "but declared again." <<NEW_LINE_PATH << resourceItem.GetFilePath() << endl; in MergeResourceItem()
100 cout << "Warning: '"<< resourceItem.GetName() <<"' conflict, first declared."; in MergeResourceItem()
102 cout << "but declared again." << NEW_LINE_PATH << resourceItem.GetFilePath() << endl; in MergeResourceItem()
Dgeneric_compiler.cpp52 ResourceItem resourceItem(fileInfo.filename, fileInfo.keyParams, type_); in PostFile() local
53 resourceItem.SetFilePath(fileInfo.filePath); in PostFile()
54 resourceItem.SetLimitKey(fileInfo.limitKey); in PostFile()
59 if (!resourceItem.SetData(reinterpret_cast<const int8_t *>(data.c_str()), data.length())) { in PostFile()
63 return MergeResourceItem(resourceItem); in PostFile()
Dresource_check.cpp43 for (auto resourceItem : res->second) { in CheckConfigJson() local
44 CheckNodeInResourceItem(it->first, resourceItem); in CheckConfigJson()
66 void ResourceCheck::CheckNodeInResourceItem(const string &key, const ResourceItem &resourceItem) in CheckNodeInResourceItem() argument
68 string filePath = resourceItem.GetFilePath(); in CheckNodeInResourceItem()
82 uint32_t normalSize = ResourceUtil::GetNormalSize(resourceItem.GetKeyParam(), result->second); in CheckNodeInResourceItem()
Dresource_table.cpp48 for (const auto &resourceItem : item.second) { in CreateResourceTable() local
49 if (resourceItem.GetResType() == ResType::ID) { in CreateResourceTable()
54 tableData.resourceItem = resourceItem; in CreateResourceTable()
55 configs[resourceItem.GetLimitKey()].push_back(tableData); in CreateResourceTable()
83 tableData.resourceItem = *resourceItemPtr; in CreateResourceTable()
249 const auto &keyParams = config.second.at(0).resourceItem.GetKeyParam(); in Prepare()
298 recordItem.resType = static_cast<int32_t>(tableData.resourceItem.GetResType()); in SaveRecordItem()
300 string value(reinterpret_cast<const char *>(tableData.resourceItem.GetData()), in SaveRecordItem()
301 tableData.resourceItem.GetDataLength()); in SaveRecordItem()
303 string name = ResourceUtil::GetIdName(tableData.resourceItem.GetName(), in SaveRecordItem()
[all …]
Dresource_pack.cpp537 ResourceItem resourceItem(fileName, it.GetKeyParam(), ResType::MEDIA); in HandleIcon() local
538 resourceItem.SetLimitKey(it.GetLimitKey()); in HandleIcon()
539 if (!resourceItem.SetData(reinterpret_cast<const int8_t *>(data.c_str()), data.length())) { in HandleIcon()
545 SaveResourceItem(resourceItem, nextId); in HandleIcon()
552 void ResourcePack::SaveResourceItem(const ResourceItem &resourceItem, int64_t nextId) const in SaveResourceItem() argument
556 vet.push_back(resourceItem); in SaveResourceItem()
/developtools/global_resource_tool/include/
Djson_compiler.h39 bool HandleString(const cJSON *objectNode, ResourceItem &resourceItem) const;
40 bool HandleInteger(const cJSON *objectNode, ResourceItem &resourceItem) const;
41 bool HandleBoolean(const cJSON *objectNode, ResourceItem &resourceItem) const;
42 bool HandleColor(const cJSON *objectNode, ResourceItem &resourceItem) const;
43 bool HandleFloat(const cJSON *objectNode, ResourceItem &resourceItem) const;
44 bool HandleStringArray(const cJSON *objectNode, ResourceItem &resourceItem) const;
45 bool HandleIntegerArray(const cJSON *objectNode, ResourceItem &resourceItem) const;
46 bool HandleTheme(const cJSON *objectNode, ResourceItem &resourceItem) const;
47 bool HandlePattern(const cJSON *objectNode, ResourceItem &resourceItem) const;
48 bool HandlePlural(const cJSON *objectNode, ResourceItem &resourceItem) const;
[all …]
Dreference_parser.h31 uint32_t ParseRefInResourceItem(ResourceItem &resourceItem) const;
32 …uint32_t ParseRefInJsonFile(ResourceItem &resourceItem, const std::string &output, const bool isIn…
36 …bool ParseRefResourceItemData(const ResourceItem &resourceItem, std::string &data, bool &update) c…
39 bool IsElementRef(const ResourceItem &resourceItem) const;
40 bool IsMediaRef(const ResourceItem &resourceItem) const;
41 bool IsProfileRef(const ResourceItem &resourceItem) const;
Dresource_append.h53 bool WriteResourceItem(const ResourceItem &resourceItem, std::ostringstream &out);
57 bool Push(const std::shared_ptr<ResourceItem> &resourceItem);
58 void AddRef(const std::shared_ptr<ResourceItem> &resourceItem);
63 bool CheckModuleResourceItem(const std::shared_ptr<ResourceItem> &resourceItem, int64_t id);
Dresource_check.h42 void CheckNodeInResourceItem(const std::string &key, const ResourceItem &resourceItem);
Di_resource_compiler.h39 bool MergeResourceItem(const ResourceItem &resourceItem);
Dresource_pack.h59 void SaveResourceItem(const ResourceItem &resourceItem, int64_t nextId) const;
Dresource_table.h38 ResourceItem resourceItem; member