编码规范修改

Signed-off-by: fangyunzhong <fangyunzhong2@huawei.com>
This commit is contained in:
fangyunzhong
2022-09-13 09:47:14 +08:00
parent e3bba54f70
commit cbae03f02c
9 changed files with 38 additions and 19 deletions
+4 -2
View File
@@ -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:
+4 -2
View File
@@ -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);
+2 -1
View File
@@ -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);
+8 -4
View File
@@ -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_;
};
+2 -1
View File
@@ -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:
+2 -1
View File
@@ -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:
+2 -1
View File
@@ -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
View File
@@ -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:
+2 -1
View File
@@ -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: