68 [[nodiscard]]
UniqueId GetId()
const noexcept;
69 [[nodiscard]] ExtensionType GetType()
const noexcept;
70 [[nodiscard]] ExtensionState GetState()
const noexcept;
71 [[nodiscard]]
const std::string& GetName()
const noexcept;
72 [[nodiscard]]
const Version& GetVersion()
const noexcept;
73 [[nodiscard]]
const std::string& GetLanguage()
const noexcept;
74 [[nodiscard]]
const std::filesystem::path& GetLocation()
const noexcept;
77 [[nodiscard]]
const std::string& GetDescription()
const noexcept;
78 [[nodiscard]]
const std::string& GetAuthor()
const noexcept;
79 [[nodiscard]]
const std::string& GetWebsite()
const noexcept;
80 [[nodiscard]]
const std::string& GetLicense()
const noexcept;
83 [[nodiscard]]
const std::vector<std::string>& GetPlatforms()
const noexcept;
84 [[nodiscard]]
const std::vector<Dependency>& GetDependencies()
const noexcept;
85 [[nodiscard]]
const std::vector<Conflict>& GetConflicts()
const noexcept;
86 [[nodiscard]]
const std::vector<Obsolete>& GetObsoletes()
const noexcept;
89 [[nodiscard]]
const std::string& GetEntry()
const noexcept;
90 [[nodiscard]]
const std::vector<Method>& GetMethods()
const noexcept;
91 [[nodiscard]]
const std::vector<MethodData>& GetMethodsData()
const noexcept;
94 [[nodiscard]]
const std::filesystem::path& GetRuntime()
const noexcept;
95 [[nodiscard]]
const std::vector<std::filesystem::path>& GetDirectories()
const noexcept;
96 [[nodiscard]] std::shared_ptr<IAssembly> GetAssembly()
const noexcept;
99 [[nodiscard]]
MemAddr GetUserData()
const noexcept;
100 [[nodiscard]]
MethodTable GetMethodTable()
const noexcept;
102 [[nodiscard]]
const Manifest& GetManifest()
const noexcept;
105 [[nodiscard]]
const std::vector<std::string>& GetErrors()
const noexcept;
106 [[nodiscard]]
const std::vector<std::string>& GetWarnings()
const noexcept;
107 [[nodiscard]]
bool HasErrors()
const noexcept;
108 [[nodiscard]]
bool HasWarnings()
const noexcept;
111 [[nodiscard]]
bool IsPlugin()
const noexcept {
112 return GetType() == ExtensionType::Plugin;
115 [[nodiscard]]
bool IsModule()
const noexcept {
116 return GetType() == ExtensionType::Module;
120 [[nodiscard]] std::chrono::milliseconds GetOperationTime(ExtensionState state)
const;
121 [[nodiscard]] std::chrono::milliseconds GetTotalTime()
const;
122 [[nodiscard]] std::string GetPerformanceReport()
const;
125 void StartOperation(ExtensionState newState);
126 void EndOperation(ExtensionState newState);
127 void SetState(ExtensionState state);
130 void AddError(std::string error);
131 void AddWarning(std::string warning);
133 void ClearWarnings();
136 void SetUserData(
MemAddr data);
139 void SetManifest(
Manifest manifest);
142 void SetMethodsData(std::vector<MethodData> methodsData);
145 void SetAssembly(std::shared_ptr<IAssembly> assembly);
148 [[nodiscard]]
bool operator==(
const Extension& other)
const noexcept;
149 [[nodiscard]]
auto operator<=>(
const Extension& other)
const noexcept;
152 [[nodiscard]]
static plg::path_view GetFileExtension(ExtensionType type);
153 [[nodiscard]]
static ExtensionType GetExtensionType(
const std::filesystem::path& path);
156 [[nodiscard]]
static bool IsValidTransition(ExtensionState from, ExtensionState to);
157 [[nodiscard]] std::string ToString()
const;
158 [[nodiscard]]
const std::string& GetVersionString()
const noexcept;
163 void AddDependency(std::string dep);
168 PLUGIFY_NO_DLL_EXPORT_WARNING(std::unique_ptr<Impl> _impl;)