Make sure PluginInformation setter are private

This commit is contained in:
Maschell 2024-03-24 09:30:43 +01:00
parent 8cacf6efe8
commit d4d829a39f

View File

@ -44,36 +44,22 @@ class PluginInformation {
public: public:
PluginInformation(const PluginInformation &) = delete; PluginInformation(const PluginInformation &) = delete;
PluginInformation(PluginInformation &&src); PluginInformation(PluginInformation &&src);
PluginInformation &operator=(PluginInformation &&src); PluginInformation &operator=(PluginInformation &&src);
void addHookData(HookData hook_data);
[[nodiscard]] const std::vector<HookData> &getHookDataList() const; [[nodiscard]] const std::vector<HookData> &getHookDataList() const;
void addFunctionData(FunctionData function_data);
[[nodiscard]] const std::vector<FunctionData> &getFunctionDataList() const; [[nodiscard]] const std::vector<FunctionData> &getFunctionDataList() const;
[[nodiscard]] std::vector<FunctionData> &getFunctionDataList(); [[nodiscard]] std::vector<FunctionData> &getFunctionDataList();
void addRelocationData(RelocationData relocation_data);
[[nodiscard]] const std::vector<RelocationData> &getRelocationDataList() const; [[nodiscard]] const std::vector<RelocationData> &getRelocationDataList() const;
void addFunctionSymbolData(const FunctionSymbolData &symbol_data);
void addSectionInfo(const SectionInfo &sectionInfo);
[[nodiscard]] const std::map<std::string, SectionInfo> &getSectionInfoList() const; [[nodiscard]] const std::map<std::string, SectionInfo> &getSectionInfoList() const;
[[nodiscard]] std::optional<SectionInfo> getSectionInfo(const std::string &sectionName) const; [[nodiscard]] std::optional<SectionInfo> getSectionInfo(const std::string &sectionName) const;
void setTrampolineId(uint8_t trampolineId);
[[nodiscard]] uint8_t getTrampolineId() const; [[nodiscard]] uint8_t getTrampolineId() const;
[[nodiscard]] const FunctionSymbolData *getNearestFunctionSymbolData(uint32_t address) const; [[nodiscard]] const FunctionSymbolData *getNearestFunctionSymbolData(uint32_t address) const;
@ -84,6 +70,19 @@ public:
private: private:
PluginInformation() = default; PluginInformation() = default;
void addHookData(HookData hook_data);
void addFunctionData(FunctionData function_data);
void addRelocationData(RelocationData relocation_data);
void addFunctionSymbolData(const FunctionSymbolData &symbol_data);
void addSectionInfo(const SectionInfo &sectionInfo);
void setTrampolineId(uint8_t trampolineId);
std::vector<HookData> mHookDataList; std::vector<HookData> mHookDataList;
std::vector<FunctionData> mFunctionDataList; std::vector<FunctionData> mFunctionDataList;
std::vector<RelocationData> mRelocationDataList; std::vector<RelocationData> mRelocationDataList;