mirror of
https://github.com/openharmony/developtools_global_resource_tool.git
synced 2026-07-18 17:24:42 -04:00
@@ -40,10 +40,12 @@ public:
|
||||
ModuleType GetModuleType() const;
|
||||
uint32_t ParseRefence();
|
||||
uint32_t Save(const std::string &filePath) const;
|
||||
static void SetUseModule() {
|
||||
static void SetUseModule()
|
||||
{
|
||||
useModule_ = true;
|
||||
};
|
||||
static std::string GetConfigName() {
|
||||
static std::string GetConfigName()
|
||||
{
|
||||
return useModule_ ? MODULE_JSON : CONFIG_JSON;
|
||||
};
|
||||
private:
|
||||
|
||||
@@ -28,10 +28,12 @@ namespace Restool {
|
||||
class FileManager : public Singleton<FileManager> {
|
||||
public:
|
||||
uint32_t ScanModules(const std::vector<std::string> &inputs, const std::string &output);
|
||||
const std::map<int32_t, std::vector<ResourceItem>> &GetResources() const {
|
||||
const std::map<int32_t, std::vector<ResourceItem>> &GetResources() const
|
||||
{
|
||||
return items_;
|
||||
};
|
||||
void SetModuleName(const std::string &moduleName) {
|
||||
void SetModuleName(const std::string &moduleName)
|
||||
{
|
||||
moduleName_ = moduleName;
|
||||
};
|
||||
uint32_t ScanIncrement(const std::string &output);
|
||||
|
||||
@@ -32,7 +32,8 @@ public:
|
||||
const std::map<int32_t, std::vector<ResourceItem>> &GetResult() const;
|
||||
uint32_t Compile(const FileInfo &fileInfo);
|
||||
void SetModuleName(const std::string &moduleName);
|
||||
void SetPreviewMode(bool enable) {
|
||||
void SetPreviewMode(bool enable)
|
||||
{
|
||||
previewMode_ = enable;
|
||||
};
|
||||
uint32_t CompileForAppend(const FileInfo &fileInfo);
|
||||
|
||||
@@ -44,16 +44,20 @@ public:
|
||||
virtual ~IncrementManager();
|
||||
uint32_t Init(const std::string &cachePath, const std::vector<std::string> &folder,
|
||||
const std::string &outputPath, const std::string &moduleName);
|
||||
const std::map<int32_t, std::vector<ResourceItem>> &GetResourceItems() const {
|
||||
const std::map<int32_t, std::vector<ResourceItem>> &GetResourceItems() const
|
||||
{
|
||||
return items_;
|
||||
};
|
||||
const std::map<ResType, std::vector<DirectoryInfo>> &GetScanDirs() const {
|
||||
const std::map<ResType, std::vector<DirectoryInfo>> &GetScanDirs() const
|
||||
{
|
||||
return scanDirs_;
|
||||
};
|
||||
bool FirstIncrement() const {
|
||||
bool FirstIncrement() const
|
||||
{
|
||||
return firstIncrement_;
|
||||
};
|
||||
bool Enable() const {
|
||||
bool Enable() const
|
||||
{
|
||||
return enalbe_;
|
||||
};
|
||||
|
||||
|
||||
@@ -28,7 +28,8 @@ public:
|
||||
virtual ~KeyManager() {};
|
||||
bool LoadKey(const std::string &keysPath);
|
||||
bool SaveKey(const std::string &keysPath);
|
||||
std::map<XmlKeyNode::KeyType, std::shared_ptr<XmlKeyNode>> &GetKeys() {
|
||||
std::map<XmlKeyNode::KeyType, std::shared_ptr<XmlKeyNode>> &GetKeys()
|
||||
{
|
||||
return keys_;
|
||||
};
|
||||
private:
|
||||
|
||||
@@ -28,7 +28,8 @@ public:
|
||||
PreviewManager() {};
|
||||
virtual ~PreviewManager();
|
||||
uint32_t ScanModules(const std::vector<std::string> &modulePaths, const std::string &output);
|
||||
void SetPriority(int32_t priority) {
|
||||
void SetPriority(int32_t priority)
|
||||
{
|
||||
priority_ = priority;
|
||||
};
|
||||
private:
|
||||
|
||||
@@ -31,7 +31,8 @@ public:
|
||||
const std::map<ResType, std::vector<DirectoryInfo>> &GetScanDirectorys() const;
|
||||
static uint32_t MergeResourceItem(std::map<int32_t, std::vector<ResourceItem>> &alls,
|
||||
const std::map<int32_t, std::vector<ResourceItem>> &other, bool tipError = false);
|
||||
void SetPreviewMode(bool enable) {
|
||||
void SetPreviewMode(bool enable)
|
||||
{
|
||||
previewMode_ = enable;
|
||||
};
|
||||
|
||||
|
||||
+12
-6
@@ -42,13 +42,16 @@ private:
|
||||
virtual bool LoadFrom(std::ifstream &in);
|
||||
virtual bool FlushIndex(const std::map<XmlKeyNode::KeyType, std::shared_ptr<XmlKeyNode>> &oldKeys,
|
||||
std::map<XmlKeyNode::KeyType, std::shared_ptr<XmlKeyNode>> &newKeys);
|
||||
void SetName(int32_t index) {
|
||||
void SetName(int32_t index)
|
||||
{
|
||||
name_ = index;
|
||||
};
|
||||
void SetValue(int32_t index) {
|
||||
void SetValue(int32_t index)
|
||||
{
|
||||
value_ = index;
|
||||
};
|
||||
void SetNameSpace(int32_t index) {
|
||||
void SetNameSpace(int32_t index)
|
||||
{
|
||||
nameSpace_ = index;
|
||||
};
|
||||
protected:
|
||||
@@ -65,13 +68,16 @@ private:
|
||||
bool LoadFrom(std::ifstream &in) override;
|
||||
bool FlushIndex(const std::map<XmlKeyNode::KeyType, std::shared_ptr<XmlKeyNode>> &oldKeys,
|
||||
std::map<XmlKeyNode::KeyType, std::shared_ptr<XmlKeyNode>> &newKeys) override;
|
||||
void SetChild(int32_t index) {
|
||||
void SetChild(int32_t index)
|
||||
{
|
||||
child_ = index;
|
||||
};
|
||||
void SetBrother(int32_t index) {
|
||||
void SetBrother(int32_t index)
|
||||
{
|
||||
brother_ = index;
|
||||
};
|
||||
void AddAttribute(int32_t index) {
|
||||
void AddAttribute(int32_t index)
|
||||
{
|
||||
attributes_.push_back(index);
|
||||
};
|
||||
private:
|
||||
|
||||
@@ -30,7 +30,8 @@ public:
|
||||
bool OpenDatabase();
|
||||
void CloseDatabase();
|
||||
bool Insert(const ResourceItem &resourceItem);
|
||||
void SetPriority(int32_t priority) {
|
||||
void SetPriority(int32_t priority)
|
||||
{
|
||||
priority_ = priority;
|
||||
};
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user