@@ -11307,13 +11307,40 @@ namespace BinaryNinja {
1130711307 */
1130811308 static std::vector<Ref<Workflow>> GetList();
1130911309
11310- /*! Get an instance of a workflow by name. If it is already registered, this will return the registered Workflow .
11311- If not, it will create and return a new Workflow .
11310+ /*! Get an instance of an existing registered workflow by name .
11311+ If no registered workflow exists, nullptr will be returned .
1131211312
1131311313 \param name Workflow name
1131411314 \return The registered workflow.
1131511315 */
11316- static Ref<Workflow> Instance(const std::string& name = "");
11316+ static Ref<Workflow> Get(const std::string& name);
11317+
11318+ /*! Get an instance of a workflow by name. If it is already registered,
11319+ this will return the registered Workflow. If not, a new Workflow will
11320+ be created and returned.
11321+
11322+ \note If a new workflow is returned it will have no activities. Attempting
11323+ to register new activities on it via `Insert` and `InsertAfter` will fail.
11324+
11325+ \param name Workflow name
11326+ \return The workflow.
11327+ */
11328+ static Ref<Workflow> GetOrCreate(const std::string& name);
11329+
11330+ /*! Get an instance of a workflow by name. If it is already registered,
11331+ this will return the registered Workflow. If not, a new Workflow will
11332+ be created and returned.
11333+
11334+ \deprecated Use `Get` or `GetOrCreate` instead.
11335+
11336+ \note If a new workflow is returned it will have no activities. Attempting
11337+ to register new activities on it via `Insert` and `InsertAfter` will fail.
11338+
11339+ \param name Workflow name
11340+ \return The workflow.
11341+ */
11342+ static Ref<Workflow> Instance(const std::string& name = "") { return GetOrCreate(name); }
11343+
1131711344 /*! Register a workflow, making it immutable and available for use
1131811345
1131911346 \param workflow The workflow to register
0 commit comments