From 367d43687b68bfe594dd77894fa98bc1133e5766 Mon Sep 17 00:00:00 2001 From: bgk Date: Mon, 8 Apr 2024 20:49:12 -0700 Subject: [PATCH 1/4] Create trigger-docs workflow --- .github/workflows/trigger-docs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/trigger-docs diff --git a/.github/workflows/trigger-docs b/.github/workflows/trigger-docs new file mode 100644 index 0000000..fd113c9 --- /dev/null +++ b/.github/workflows/trigger-docs @@ -0,0 +1,23 @@ +name: trigger-docs + +on: + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Trigger Docs + uses: actions/github-script@v6 + with: + github-token: ${{ secrets.PAT }} + script: | + await github.rest.actions.createWorkflowDispatch({ + owner: 'peartreegames', + repo: 'website', + workflow_id: 'main.yml', + ref: 'main' + }) From 92bbb0de70e3e6d42a3d3e6aa904a4d015590c69 Mon Sep 17 00:00:00 2001 From: bgk Date: Mon, 8 Apr 2024 20:52:17 -0700 Subject: [PATCH 2/4] Rename trigger-docs to trigger-docs.yml --- .github/workflows/{trigger-docs => trigger-docs.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{trigger-docs => trigger-docs.yml} (100%) diff --git a/.github/workflows/trigger-docs b/.github/workflows/trigger-docs.yml similarity index 100% rename from .github/workflows/trigger-docs rename to .github/workflows/trigger-docs.yml From abcded8246fe301dd3ff94281b595099434c90c0 Mon Sep 17 00:00:00 2001 From: bgk- Date: Mon, 8 Apr 2024 21:52:14 -0700 Subject: [PATCH 3/4] Split api docs into individual files --- Topiary/Topiary.csproj | 8 - docs/api.md | 1835 ----------------- docs/peartreegames.topiary.bytecode.md | 31 + docs/peartreegames.topiary.choice.md | 94 + docs/peartreegames.topiary.delegates.md | 15 + docs/peartreegames.topiary.dialogue.md | 407 ++++ docs/peartreegames.topiary.embeddedloader.md | 31 + docs/peartreegames.topiary.function.md | 104 + docs/peartreegames.topiary.iallocator.md | 33 + docs/peartreegames.topiary.iloader.md | 65 + docs/peartreegames.topiary.library.md | 268 +++ docs/peartreegames.topiary.line.md | 49 + docs/peartreegames.topiary.macloader.md | 112 + .../peartreegames.topiary.managedallocator.md | 44 + docs/peartreegames.topiary.topiattribute.md | 52 + docs/peartreegames.topiary.topivalue.md | 260 +++ docs/peartreegames.topiary.windowsloader.md | 117 ++ 17 files changed, 1682 insertions(+), 1843 deletions(-) delete mode 100644 docs/api.md create mode 100644 docs/peartreegames.topiary.bytecode.md create mode 100644 docs/peartreegames.topiary.choice.md create mode 100644 docs/peartreegames.topiary.delegates.md create mode 100644 docs/peartreegames.topiary.dialogue.md create mode 100644 docs/peartreegames.topiary.embeddedloader.md create mode 100644 docs/peartreegames.topiary.function.md create mode 100644 docs/peartreegames.topiary.iallocator.md create mode 100644 docs/peartreegames.topiary.iloader.md create mode 100644 docs/peartreegames.topiary.library.md create mode 100644 docs/peartreegames.topiary.line.md create mode 100644 docs/peartreegames.topiary.macloader.md create mode 100644 docs/peartreegames.topiary.managedallocator.md create mode 100644 docs/peartreegames.topiary.topiattribute.md create mode 100644 docs/peartreegames.topiary.topivalue.md create mode 100644 docs/peartreegames.topiary.windowsloader.md diff --git a/Topiary/Topiary.csproj b/Topiary/Topiary.csproj index 54c5b72..17bb176 100644 --- a/Topiary/Topiary.csproj +++ b/Topiary/Topiary.csproj @@ -18,8 +18,6 @@ README.md 8 net471 - true - $(MSBuildProjectDirectory)\..\docs\api.md @@ -48,12 +46,6 @@ - - - all - runtime; build; native; contentfiles; analyzers - - diff --git a/docs/api.md b/docs/api.md deleted file mode 100644 index 20a80d9..0000000 --- a/docs/api.md +++ /dev/null @@ -1,1835 +0,0 @@ - -# Topiary.CSharp - -## Contents - -- [ByteCode](#T-PeartreeGames-Topiary-ByteCode 'PeartreeGames.Topiary.ByteCode') - - [GetExterns(reader)](#M-PeartreeGames-Topiary-ByteCode-GetExterns-System-IO-BinaryReader- 'PeartreeGames.Topiary.ByteCode.GetExterns(System.IO.BinaryReader)') -- [CalculateCompileSizeDelegate](#T-PeartreeGames-Topiary-Delegates-CalculateCompileSizeDelegate 'PeartreeGames.Topiary.Delegates.CalculateCompileSizeDelegate') -- [CalculateStateSizeDelegate](#T-PeartreeGames-Topiary-Delegates-CalculateStateSizeDelegate 'PeartreeGames.Topiary.Delegates.CalculateStateSizeDelegate') -- [CanContinueDelegate](#T-PeartreeGames-Topiary-Delegates-CanContinueDelegate 'PeartreeGames.Topiary.Delegates.CanContinueDelegate') -- [Choice](#T-PeartreeGames-Topiary-Choice 'PeartreeGames.Topiary.Choice') - - [Content](#P-PeartreeGames-Topiary-Choice-Content 'PeartreeGames.Topiary.Choice.Content') - - [Ip](#P-PeartreeGames-Topiary-Choice-Ip 'PeartreeGames.Topiary.Choice.Ip') - - [Tags](#P-PeartreeGames-Topiary-Choice-Tags 'PeartreeGames.Topiary.Choice.Tags') - - [VisitCount](#P-PeartreeGames-Topiary-Choice-VisitCount 'PeartreeGames.Topiary.Choice.VisitCount') - - [MarshalPtr(choicePtr,count)](#M-PeartreeGames-Topiary-Choice-MarshalPtr-System-IntPtr,System-Byte- 'PeartreeGames.Topiary.Choice.MarshalPtr(System.IntPtr,System.Byte)') -- [CompileDelegate](#T-PeartreeGames-Topiary-Delegates-CompileDelegate 'PeartreeGames.Topiary.Delegates.CompileDelegate') -- [CreateVmDelegate](#T-PeartreeGames-Topiary-Delegates-CreateVmDelegate 'PeartreeGames.Topiary.Delegates.CreateVmDelegate') -- [Delegates](#T-PeartreeGames-Topiary-Delegates 'PeartreeGames.Topiary.Delegates') -- [DestroyValueDelegate](#T-PeartreeGames-Topiary-Delegates-DestroyValueDelegate 'PeartreeGames.Topiary.Delegates.DestroyValueDelegate') -- [DestroyVmDelegate](#T-PeartreeGames-Topiary-Delegates-DestroyVmDelegate 'PeartreeGames.Topiary.Delegates.DestroyVmDelegate') -- [Dialogue](#T-PeartreeGames-Topiary-Dialogue 'PeartreeGames.Topiary.Dialogue') - - [#ctor()](#M-PeartreeGames-Topiary-Dialogue-#ctor-System-Byte[],PeartreeGames-Topiary-Dialogue-OnLineCallback,PeartreeGames-Topiary-Dialogue-OnChoicesCallback,PeartreeGames-Topiary-Library-Severity- 'PeartreeGames.Topiary.Dialogue.#ctor(System.Byte[],PeartreeGames.Topiary.Dialogue.OnLineCallback,PeartreeGames.Topiary.Dialogue.OnChoicesCallback,PeartreeGames.Topiary.Library.Severity)') - - [CanContinue](#P-PeartreeGames-Topiary-Dialogue-CanContinue 'PeartreeGames.Topiary.Dialogue.CanContinue') - - [IsValid](#P-PeartreeGames-Topiary-Dialogue-IsValid 'PeartreeGames.Topiary.Dialogue.IsValid') - - [IsWaiting](#P-PeartreeGames-Topiary-Dialogue-IsWaiting 'PeartreeGames.Topiary.Dialogue.IsWaiting') - - [Library](#P-PeartreeGames-Topiary-Dialogue-Library 'PeartreeGames.Topiary.Dialogue.Library') - - [BindFunctions(assemblies)](#M-PeartreeGames-Topiary-Dialogue-BindFunctions-System-Collections-Generic-IEnumerable{System-Reflection-Assembly}- 'PeartreeGames.Topiary.Dialogue.BindFunctions(System.Collections.Generic.IEnumerable{System.Reflection.Assembly})') - - [Compile(fullPath,severity)](#M-PeartreeGames-Topiary-Dialogue-Compile-System-String,PeartreeGames-Topiary-Library-Severity- 'PeartreeGames.Topiary.Dialogue.Compile(System.String,PeartreeGames.Topiary.Library.Severity)') - - [Compile(fullPath,capacity,severity)](#M-PeartreeGames-Topiary-Dialogue-Compile-System-String,System-Int64,PeartreeGames-Topiary-Library-Severity- 'PeartreeGames.Topiary.Dialogue.Compile(System.String,System.Int64,PeartreeGames.Topiary.Library.Severity)') - - [Continue()](#M-PeartreeGames-Topiary-Dialogue-Continue 'PeartreeGames.Topiary.Dialogue.Continue') - - [DestroyValue(value)](#M-PeartreeGames-Topiary-Dialogue-DestroyValue-PeartreeGames-Topiary-TopiValue@- 'PeartreeGames.Topiary.Dialogue.DestroyValue(PeartreeGames.Topiary.TopiValue@)') - - [Dispose()](#M-PeartreeGames-Topiary-Dialogue-Dispose 'PeartreeGames.Topiary.Dialogue.Dispose') - - [GetValue(name)](#M-PeartreeGames-Topiary-Dialogue-GetValue-System-String- 'PeartreeGames.Topiary.Dialogue.GetValue(System.String)') - - [LoadState(json)](#M-PeartreeGames-Topiary-Dialogue-LoadState-System-String- 'PeartreeGames.Topiary.Dialogue.LoadState(System.String)') - - [Run()](#M-PeartreeGames-Topiary-Dialogue-Run 'PeartreeGames.Topiary.Dialogue.Run') - - [SaveState()](#M-PeartreeGames-Topiary-Dialogue-SaveState 'PeartreeGames.Topiary.Dialogue.SaveState') - - [SaveState(capacity)](#M-PeartreeGames-Topiary-Dialogue-SaveState-System-Int64- 'PeartreeGames.Topiary.Dialogue.SaveState(System.Int64)') - - [SelectChoice(index)](#M-PeartreeGames-Topiary-Dialogue-SelectChoice-System-Int32- 'PeartreeGames.Topiary.Dialogue.SelectChoice(System.Int32)') - - [Set(name,value)](#M-PeartreeGames-Topiary-Dialogue-Set-System-String,System-Boolean- 'PeartreeGames.Topiary.Dialogue.Set(System.String,System.Boolean)') - - [Set(name,value)](#M-PeartreeGames-Topiary-Dialogue-Set-System-String,System-Single- 'PeartreeGames.Topiary.Dialogue.Set(System.String,System.Single)') - - [Set(name,value)](#M-PeartreeGames-Topiary-Dialogue-Set-System-String,System-String- 'PeartreeGames.Topiary.Dialogue.Set(System.String,System.String)') - - [Set(name,function,arity)](#M-PeartreeGames-Topiary-Dialogue-Set-System-String,PeartreeGames-Topiary-Function,System-Byte- 'PeartreeGames.Topiary.Dialogue.Set(System.String,PeartreeGames.Topiary.Function,System.Byte)') - - [Start(bough)](#M-PeartreeGames-Topiary-Dialogue-Start-System-String- 'PeartreeGames.Topiary.Dialogue.Start(System.String)') - - [Subscribe(name,callback)](#M-PeartreeGames-Topiary-Dialogue-Subscribe-System-String,PeartreeGames-Topiary-Delegates-Subscriber- 'PeartreeGames.Topiary.Dialogue.Subscribe(System.String,PeartreeGames.Topiary.Delegates.Subscriber)') - - [Unset(name)](#M-PeartreeGames-Topiary-Dialogue-Unset-System-String- 'PeartreeGames.Topiary.Dialogue.Unset(System.String)') - - [Unsubscribe(name,callback)](#M-PeartreeGames-Topiary-Dialogue-Unsubscribe-System-String,PeartreeGames-Topiary-Delegates-Subscriber- 'PeartreeGames.Topiary.Dialogue.Unsubscribe(System.String,PeartreeGames.Topiary.Delegates.Subscriber)') -- [EmbeddedLoader](#T-PeartreeGames-Topiary-EmbeddedLoader 'PeartreeGames.Topiary.EmbeddedLoader') - - [CreateEmbeddedResource(dllName)](#M-PeartreeGames-Topiary-EmbeddedLoader-CreateEmbeddedResource-System-String- 'PeartreeGames.Topiary.EmbeddedLoader.CreateEmbeddedResource(System.String)') -- [Function](#T-PeartreeGames-Topiary-Function 'PeartreeGames.Topiary.Function') - - [Call(argPtr,count)](#M-PeartreeGames-Topiary-Function-Call-System-IntPtr,System-Byte- 'PeartreeGames.Topiary.Function.Call(System.IntPtr,System.Byte)') - - [Create(method)](#M-PeartreeGames-Topiary-Function-Create-System-Reflection-MethodInfo- 'PeartreeGames.Topiary.Function.Create(System.Reflection.MethodInfo)') - - [CreateArgs(argPtr,count)](#M-PeartreeGames-Topiary-Function-CreateArgs-System-IntPtr,System-Byte- 'PeartreeGames.Topiary.Function.CreateArgs(System.IntPtr,System.Byte)') - - [Dispose()](#M-PeartreeGames-Topiary-Function-Dispose 'PeartreeGames.Topiary.Function.Dispose') - - [GetCallIntPtr()](#M-PeartreeGames-Topiary-Function-GetCallIntPtr 'PeartreeGames.Topiary.Function.GetCallIntPtr') - - [ToString()](#M-PeartreeGames-Topiary-Function-ToString 'PeartreeGames.Topiary.Function.ToString') -- [ILoader](#T-PeartreeGames-Topiary-ILoader 'PeartreeGames.Topiary.ILoader') - - [Free(ptr)](#M-PeartreeGames-Topiary-ILoader-Free-System-IntPtr- 'PeartreeGames.Topiary.ILoader.Free(System.IntPtr)') - - [GetProc(name)](#M-PeartreeGames-Topiary-ILoader-GetProc-System-String- 'PeartreeGames.Topiary.ILoader.GetProc(System.String)') - - [Load()](#M-PeartreeGames-Topiary-ILoader-Load 'PeartreeGames.Topiary.ILoader.Load') -- [IsWaitingDelegate](#T-PeartreeGames-Topiary-Delegates-IsWaitingDelegate 'PeartreeGames.Topiary.Delegates.IsWaitingDelegate') -- [Library](#T-PeartreeGames-Topiary-Library 'PeartreeGames.Topiary.Library') - - [#ctor()](#M-PeartreeGames-Topiary-Library-#ctor 'PeartreeGames.Topiary.Library.#ctor') - - [Loader](#F-PeartreeGames-Topiary-Library-Loader 'PeartreeGames.Topiary.Library.Loader') - - [OnDebugLogMessage](#F-PeartreeGames-Topiary-Library-OnDebugLogMessage 'PeartreeGames.Topiary.Library.OnDebugLogMessage') - - [Allocator](#P-PeartreeGames-Topiary-Library-Allocator 'PeartreeGames.Topiary.Library.Allocator') - - [Count](#P-PeartreeGames-Topiary-Library-Count 'PeartreeGames.Topiary.Library.Count') - - [Global](#P-PeartreeGames-Topiary-Library-Global 'PeartreeGames.Topiary.Library.Global') - - [IsUnityRuntime](#P-PeartreeGames-Topiary-Library-IsUnityRuntime 'PeartreeGames.Topiary.Library.IsUnityRuntime') - - [Dispose()](#M-PeartreeGames-Topiary-Library-Dispose 'PeartreeGames.Topiary.Library.Dispose') - - [PtrToUtf8String(pointer,count)](#M-PeartreeGames-Topiary-Library-PtrToUtf8String-System-IntPtr,System-Nullable{System-Int32}- 'PeartreeGames.Topiary.Library.PtrToUtf8String(System.IntPtr,System.Nullable{System.Int32})') -- [Line](#T-PeartreeGames-Topiary-Line 'PeartreeGames.Topiary.Line') - - [Content](#P-PeartreeGames-Topiary-Line-Content 'PeartreeGames.Topiary.Line.Content') - - [Speaker](#P-PeartreeGames-Topiary-Line-Speaker 'PeartreeGames.Topiary.Line.Speaker') - - [Tags](#P-PeartreeGames-Topiary-Line-Tags 'PeartreeGames.Topiary.Line.Tags') -- [LoadStateDelegate](#T-PeartreeGames-Topiary-Delegates-LoadStateDelegate 'PeartreeGames.Topiary.Delegates.LoadStateDelegate') -- [MacLoader](#T-PeartreeGames-Topiary-MacLoader 'PeartreeGames.Topiary.MacLoader') - - [#ctor()](#M-PeartreeGames-Topiary-MacLoader-#ctor-System-Boolean- 'PeartreeGames.Topiary.MacLoader.#ctor(System.Boolean)') - - [Free(ptr)](#M-PeartreeGames-Topiary-MacLoader-Free-System-IntPtr- 'PeartreeGames.Topiary.MacLoader.Free(System.IntPtr)') - - [GetProc(name)](#M-PeartreeGames-Topiary-MacLoader-GetProc-System-String- 'PeartreeGames.Topiary.MacLoader.GetProc(System.String)') - - [Load()](#M-PeartreeGames-Topiary-MacLoader-Load 'PeartreeGames.Topiary.MacLoader.Load') - - [ReleaseHandle()](#M-PeartreeGames-Topiary-MacLoader-ReleaseHandle 'PeartreeGames.Topiary.MacLoader.ReleaseHandle') -- [OnChoicesCallback](#T-PeartreeGames-Topiary-Dialogue-OnChoicesCallback 'PeartreeGames.Topiary.Dialogue.OnChoicesCallback') -- [OnChoicesDelegate](#T-PeartreeGames-Topiary-Delegates-OnChoicesDelegate 'PeartreeGames.Topiary.Delegates.OnChoicesDelegate') -- [OnLineCallback](#T-PeartreeGames-Topiary-Dialogue-OnLineCallback 'PeartreeGames.Topiary.Dialogue.OnLineCallback') -- [OnLineDelegate](#T-PeartreeGames-Topiary-Delegates-OnLineDelegate 'PeartreeGames.Topiary.Delegates.OnLineDelegate') -- [RunDelegate](#T-PeartreeGames-Topiary-Delegates-RunDelegate 'PeartreeGames.Topiary.Delegates.RunDelegate') -- [SaveStateDelegate](#T-PeartreeGames-Topiary-Delegates-SaveStateDelegate 'PeartreeGames.Topiary.Delegates.SaveStateDelegate') -- [SelectChoiceDelegate](#T-PeartreeGames-Topiary-Delegates-SelectChoiceDelegate 'PeartreeGames.Topiary.Delegates.SelectChoiceDelegate') -- [SelectContinueDelegate](#T-PeartreeGames-Topiary-Delegates-SelectContinueDelegate 'PeartreeGames.Topiary.Delegates.SelectContinueDelegate') -- [SetDebugLogDelegate](#T-PeartreeGames-Topiary-Delegates-SetDebugLogDelegate 'PeartreeGames.Topiary.Delegates.SetDebugLogDelegate') -- [SetDebugSeverityDelegate](#T-PeartreeGames-Topiary-Delegates-SetDebugSeverityDelegate 'PeartreeGames.Topiary.Delegates.SetDebugSeverityDelegate') -- [SetExternBoolDelegate](#T-PeartreeGames-Topiary-Delegates-SetExternBoolDelegate 'PeartreeGames.Topiary.Delegates.SetExternBoolDelegate') -- [SetExternFuncDelegate](#T-PeartreeGames-Topiary-Delegates-SetExternFuncDelegate 'PeartreeGames.Topiary.Delegates.SetExternFuncDelegate') -- [SetExternNilDelegate](#T-PeartreeGames-Topiary-Delegates-SetExternNilDelegate 'PeartreeGames.Topiary.Delegates.SetExternNilDelegate') -- [SetExternNumberDelegate](#T-PeartreeGames-Topiary-Delegates-SetExternNumberDelegate 'PeartreeGames.Topiary.Delegates.SetExternNumberDelegate') -- [SetExternStringDelegate](#T-PeartreeGames-Topiary-Delegates-SetExternStringDelegate 'PeartreeGames.Topiary.Delegates.SetExternStringDelegate') -- [Severity](#T-PeartreeGames-Topiary-Library-Severity 'PeartreeGames.Topiary.Library.Severity') -- [StartDelegate](#T-PeartreeGames-Topiary-Delegates-StartDelegate 'PeartreeGames.Topiary.Delegates.StartDelegate') -- [SubscribeDelegate](#T-PeartreeGames-Topiary-Delegates-SubscribeDelegate 'PeartreeGames.Topiary.Delegates.SubscribeDelegate') -- [Subscriber](#T-PeartreeGames-Topiary-Delegates-Subscriber 'PeartreeGames.Topiary.Delegates.Subscriber') -- [Tag](#T-PeartreeGames-Topiary-TopiValue-Tag 'PeartreeGames.Topiary.TopiValue.Tag') - - [Bool](#F-PeartreeGames-Topiary-TopiValue-Tag-Bool 'PeartreeGames.Topiary.TopiValue.Tag.Bool') - - [List](#F-PeartreeGames-Topiary-TopiValue-Tag-List 'PeartreeGames.Topiary.TopiValue.Tag.List') - - [Map](#F-PeartreeGames-Topiary-TopiValue-Tag-Map 'PeartreeGames.Topiary.TopiValue.Tag.Map') - - [Nil](#F-PeartreeGames-Topiary-TopiValue-Tag-Nil 'PeartreeGames.Topiary.TopiValue.Tag.Nil') - - [Number](#F-PeartreeGames-Topiary-TopiValue-Tag-Number 'PeartreeGames.Topiary.TopiValue.Tag.Number') - - [Set](#F-PeartreeGames-Topiary-TopiValue-Tag-Set 'PeartreeGames.Topiary.TopiValue.Tag.Set') - - [String](#F-PeartreeGames-Topiary-TopiValue-Tag-String 'PeartreeGames.Topiary.TopiValue.Tag.String') -- [TopiAttribute](#T-PeartreeGames-Topiary-TopiAttribute 'PeartreeGames.Topiary.TopiAttribute') - - [#ctor(name)](#M-PeartreeGames-Topiary-TopiAttribute-#ctor-System-String- 'PeartreeGames.Topiary.TopiAttribute.#ctor(System.String)') - - [Name](#P-PeartreeGames-Topiary-TopiAttribute-Name 'PeartreeGames.Topiary.TopiAttribute.Name') -- [TopiValue](#T-PeartreeGames-Topiary-TopiValue 'PeartreeGames.Topiary.TopiValue') - - [AsType\`\`1()](#M-PeartreeGames-Topiary-TopiValue-AsType``1 'PeartreeGames.Topiary.TopiValue.AsType``1') - - [Dispose()](#M-PeartreeGames-Topiary-TopiValue-Dispose 'PeartreeGames.Topiary.TopiValue.Dispose') - - [Equals(other)](#M-PeartreeGames-Topiary-TopiValue-Equals-PeartreeGames-Topiary-TopiValue- 'PeartreeGames.Topiary.TopiValue.Equals(PeartreeGames.Topiary.TopiValue)') - - [Equals(obj)](#M-PeartreeGames-Topiary-TopiValue-Equals-System-Object- 'PeartreeGames.Topiary.TopiValue.Equals(System.Object)') - - [FromPtr(ptr)](#M-PeartreeGames-Topiary-TopiValue-FromPtr-System-IntPtr- 'PeartreeGames.Topiary.TopiValue.FromPtr(System.IntPtr)') - - [GetHashCode()](#M-PeartreeGames-Topiary-TopiValue-GetHashCode 'PeartreeGames.Topiary.TopiValue.GetHashCode') - - [ToString()](#M-PeartreeGames-Topiary-TopiValue-ToString 'PeartreeGames.Topiary.TopiValue.ToString') -- [TryGetValueDelegate](#T-PeartreeGames-Topiary-Delegates-TryGetValueDelegate 'PeartreeGames.Topiary.Delegates.TryGetValueDelegate') -- [UnsubscribeDelegate](#T-PeartreeGames-Topiary-Delegates-UnsubscribeDelegate 'PeartreeGames.Topiary.Delegates.UnsubscribeDelegate') -- [WindowsLoader](#T-PeartreeGames-Topiary-WindowsLoader 'PeartreeGames.Topiary.WindowsLoader') - - [#ctor()](#M-PeartreeGames-Topiary-WindowsLoader-#ctor-System-Boolean- 'PeartreeGames.Topiary.WindowsLoader.#ctor(System.Boolean)') - - [Free(ptr)](#M-PeartreeGames-Topiary-WindowsLoader-Free-System-IntPtr- 'PeartreeGames.Topiary.WindowsLoader.Free(System.IntPtr)') - - [GetProc(name)](#M-PeartreeGames-Topiary-WindowsLoader-GetProc-System-String- 'PeartreeGames.Topiary.WindowsLoader.GetProc(System.String)') - - [Load()](#M-PeartreeGames-Topiary-WindowsLoader-Load 'PeartreeGames.Topiary.WindowsLoader.Load') - - [ReleaseHandle()](#M-PeartreeGames-Topiary-WindowsLoader-ReleaseHandle 'PeartreeGames.Topiary.WindowsLoader.ReleaseHandle') - - -## ByteCode `type` - -##### Namespace - -PeartreeGames.Topiary - -##### Summary - -Provides a set of methods for working with bytecode. - - -### GetExterns(reader) `method` - -##### Summary - -Retrieves a sorted set of external names from the given binary reader. - -##### Returns - -A sorted set of external names. - -##### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| reader | [System.IO.BinaryReader](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IO.BinaryReader 'System.IO.BinaryReader') | The binary reader from which to read the external names. | - - -## CalculateCompileSizeDelegate `type` - -##### Namespace - -PeartreeGames.Topiary.Delegates - -##### Summary - -Delegate for calculating the compile size. - -##### Returns - -The calculated compile size. - -##### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| path | [T:PeartreeGames.Topiary.Delegates.CalculateCompileSizeDelegate](#T-T-PeartreeGames-Topiary-Delegates-CalculateCompileSizeDelegate 'T:PeartreeGames.Topiary.Delegates.CalculateCompileSizeDelegate') | The path of the file to calculate the compile size. | - - -## CalculateStateSizeDelegate `type` - -##### Namespace - -PeartreeGames.Topiary.Delegates - -##### Summary - -Represents a delegate used to calculate the size of the state. - -##### Returns - -The size of the state. - -##### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| vmPtr | [T:PeartreeGames.Topiary.Delegates.CalculateStateSizeDelegate](#T-T-PeartreeGames-Topiary-Delegates-CalculateStateSizeDelegate 'T:PeartreeGames.Topiary.Delegates.CalculateStateSizeDelegate') | A pointer to the virtual machine. | - - -## CanContinueDelegate `type` - -##### Namespace - -PeartreeGames.Topiary.Delegates - -##### Summary - -Represents a delegate used to determine if a library can continue. - -##### Returns - -`true` if the library can continue; otherwise, `false`. - -##### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| vmPtr | [T:PeartreeGames.Topiary.Delegates.CanContinueDelegate](#T-T-PeartreeGames-Topiary-Delegates-CanContinueDelegate 'T:PeartreeGames.Topiary.Delegates.CanContinueDelegate') | The pointer to the virtual machine. | - - -## Choice `type` - -##### Namespace - -PeartreeGames.Topiary - -##### Summary - -Represents a choice in a dialogue. - - -### Content `property` - -##### Summary - -Represents a choice in a dialogue. - - -### Ip `property` - -##### Summary - -Gets the IP (Instruction Pointer) of the choice. - -##### Remarks - -Mostly used internally, but exposed here as well - - -### Tags `property` - -##### Summary - -Gets the tags associated with the choice. - -##### Remarks - -The tags are represented as an array of strings. - - -### VisitCount `property` - -##### Summary - -Gets the visit count associated with the choice. - - -### MarshalPtr(choicePtr,count) `method` - -##### Summary - -Marshals an [IntPtr](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IntPtr 'System.IntPtr') pointer to an array of [Choice](#T-PeartreeGames-Topiary-Choice 'PeartreeGames.Topiary.Choice') structures. - -##### Returns - -An array of [Choice](#T-PeartreeGames-Topiary-Choice 'PeartreeGames.Topiary.Choice') structures. - -##### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| choicePtr | [System.IntPtr](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IntPtr 'System.IntPtr') | The pointer to the array of [Choice](#T-PeartreeGames-Topiary-Choice 'PeartreeGames.Topiary.Choice') structures. | -| count | [System.Byte](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Byte 'System.Byte') | The number of [Choice](#T-PeartreeGames-Topiary-Choice 'PeartreeGames.Topiary.Choice') structures in the array. | - - -## CompileDelegate `type` - -##### Namespace - -PeartreeGames.Topiary.Delegates - -##### Summary - -Represents a delegate for compiling a specified path into a byte array output. - -##### Returns - -An integer value indicating the result of the compilation. - -##### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| path | [T:PeartreeGames.Topiary.Delegates.CompileDelegate](#T-T-PeartreeGames-Topiary-Delegates-CompileDelegate 'T:PeartreeGames.Topiary.Delegates.CompileDelegate') | The path to compile. | - - -## CreateVmDelegate `type` - -##### Namespace - -PeartreeGames.Topiary.Delegates - -##### Summary - -Delegate for creating a virtual machine. - -##### Returns - -A pointer to the created virtual machine. - -##### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| source | [T:PeartreeGames.Topiary.Delegates.CreateVmDelegate](#T-T-PeartreeGames-Topiary-Delegates-CreateVmDelegate 'T:PeartreeGames.Topiary.Delegates.CreateVmDelegate') | The source code as a byte array. | - - -## Delegates `type` - -##### Namespace - -PeartreeGames.Topiary - -##### Summary - -The Delegates class provides delegates for various functions used in the PeartreeGames.Topiary namespace. - -##### Remarks - -These delegates are used for callback functions, function pointers, and event handlers within the Topiary library. - - -## DestroyValueDelegate `type` - -##### Namespace - -PeartreeGames.Topiary.Delegates - - -## DestroyVmDelegate `type` - -##### Namespace - -PeartreeGames.Topiary.Delegates - -##### Summary - -Delegate representing the DestroyVm method. - -##### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| vmPtr | [T:PeartreeGames.Topiary.Delegates.DestroyVmDelegate](#T-T-PeartreeGames-Topiary-Delegates-DestroyVmDelegate 'T:PeartreeGames.Topiary.Delegates.DestroyVmDelegate') | Pointer to the virtual machine. | - - -## Dialogue `type` - -##### Namespace - -PeartreeGames.Topiary - -##### Summary - -Represents a dialogue instance. - - -### #ctor() `constructor` - -##### Summary - -Represents a dialogue. - -##### Parameters - -This constructor has no parameters. - - -### CanContinue `property` - -##### Summary - -Gets a value indicating whether the dialogue can continue. - - -### IsValid `property` - -##### Summary - -Gets a value indicating whether the Dialogue instance is valid. - -##### Remarks - -This property returns `true` if the internal pointer `_vmPtr` is not zero; -otherwise, it returns `false`. - - -### IsWaiting `property` - -##### Summary - -Gets a value indicating whether the dialogue is waiting for user input. - - -### Library `property` - -##### Summary - -Represents a library that provides functionality for creating and managing dialogues. - - -### BindFunctions(assemblies) `method` - -##### Summary - -Bind all TopiAttribute functions within the given Assemblies -Functions must be of type "Func" -or "Action[]" -See [Function](#T-PeartreeGames-Topiary-Function 'PeartreeGames.Topiary.Function') - -##### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| assemblies | [System.Collections.Generic.IEnumerable{System.Reflection.Assembly}](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Collections.Generic.IEnumerable 'System.Collections.Generic.IEnumerable{System.Reflection.Assembly}') | | - - -### Compile(fullPath,severity) `method` - -##### Summary - -Compile a ".topi" file into bytes. -Should be saved to a ".topib" file -Will precalculate the required capacity - -##### Returns - -Compiled bytes - -##### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| fullPath | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | The file absolute path | -| severity | [PeartreeGames.Topiary.Library.Severity](#T-PeartreeGames-Topiary-Library-Severity 'PeartreeGames.Topiary.Library.Severity') | Log severity | - - -### Compile(fullPath,capacity,severity) `method` - -##### Summary - -Compile a ".topi" file into bytes. -Should be saved to a ".topib" file - -##### Returns - -Compiled bytes - -##### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| fullPath | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | The file absolute path | -| capacity | [System.Int64](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Int64 'System.Int64') | Capacity for the bytecode output | -| severity | [PeartreeGames.Topiary.Library.Severity](#T-PeartreeGames-Topiary-Library-Severity 'PeartreeGames.Topiary.Library.Severity') | Log severity | - - -### Continue() `method` - -##### Summary - -Continue the Dialogue. - -##### Parameters - -This method has no parameters. - - -### DestroyValue(value) `method` - -##### Summary - -Destroy a reference value in unmanaged memory -NOTE: This should be removed in future versions - -##### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| value | [PeartreeGames.Topiary.TopiValue@](#T-PeartreeGames-Topiary-TopiValue@ 'PeartreeGames.Topiary.TopiValue@') | The value to be destroyed | - - -### Dispose() `method` - -##### Summary - -Releases all resources used by the Dialogue object. - -##### Parameters - -This method has no parameters. - - -### GetValue(name) `method` - -##### Summary - -Retrieve the current value of any Global variable in the dialogue - -##### Returns - -TopiValue.nil if not found - -##### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| name | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | The name of the variable | - - -### LoadState(json) `method` - -##### Summary - -Load a JSON state into the Dialogue - -##### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| json | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | JSON string | - - -### Run() `method` - -##### Summary - -Run the Dialogue until the next Dialogue or Choice - -##### Parameters - -This method has no parameters. - -##### Exceptions - -| Name | Description | -| ---- | ----------- | -| [System.Exception](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Exception 'System.Exception') | | - - -### SaveState() `method` - -##### Summary - -Save current Dialogue State to JSON -Will precalculate the necessary size -Should merge the resulting JSON with the Game Root JSON State - -##### Parameters - -This method has no parameters. - - -### SaveState(capacity) `method` - -##### Summary - -Save current Dialogue State to JSON -Should merge the resulting JSON with the Game Root JSON State - -##### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| capacity | [System.Int64](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Int64 'System.Int64') | The maximum size of bytes to allocate | - - -### SelectChoice(index) `method` - -##### Summary - -Select a Choice. - -##### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| index | [System.Int32](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Int32 'System.Int32') | The index of the choice selected | - - -### Set(name,value) `method` - -##### Summary - -Set an Extern variable to a bool value - -##### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| name | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | The name of the variable | -| value | [System.Boolean](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Boolean 'System.Boolean') | The value to set | - - -### Set(name,value) `method` - -##### Summary - -Set an Extern variable to a float value - -##### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| name | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | The name of the variable | -| value | [System.Single](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Single 'System.Single') | The value to set | - - -### Set(name,value) `method` - -##### Summary - -Set an Extern variable to a float value - -##### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| name | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | The name of the variable | -| value | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | The value to set | - - -### Set(name,function,arity) `method` - -##### Summary - -Set a Global Extern variable to a function value -Note: It is easier to use the TopiAttribute instead with the BindFunctions method -However this is kept in case you need more control - -##### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| name | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | The name of the variable | -| function | [PeartreeGames.Topiary.Function](#T-PeartreeGames-Topiary-Function 'PeartreeGames.Topiary.Function') | The value to set | -| arity | [System.Byte](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Byte 'System.Byte') | The number of parameters the function accepts | - - -### Start(bough) `method` - -##### Summary - -Start the Dialogue - -##### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| bough | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | Optional: The bough path where the conversation will start. -If non provided, first bough in the file will be used | - - -### Subscribe(name,callback) `method` - -##### Summary - -Subscribe to when a Global variable changes - -##### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| name | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | The name of the variable | -| callback | [PeartreeGames.Topiary.Delegates.Subscriber](#T-PeartreeGames-Topiary-Delegates-Subscriber 'PeartreeGames.Topiary.Delegates.Subscriber') | The callback to be executed on change | - - -### Unset(name) `method` - -##### Summary - -Set an Extern variable to a nil value - -##### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| name | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | The name of the variable | - - -### Unsubscribe(name,callback) `method` - -##### Summary - -Unsubscribe when a Global variable changes - -##### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| name | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | The name of the variable | -| callback | [PeartreeGames.Topiary.Delegates.Subscriber](#T-PeartreeGames-Topiary-Delegates-Subscriber 'PeartreeGames.Topiary.Delegates.Subscriber') | The callback that was passed into Subscribe | - - -## EmbeddedLoader `type` - -##### Namespace - -PeartreeGames.Topiary - -##### Summary - -Represents a loader interface for loading and interacting with libraries. - - -### CreateEmbeddedResource(dllName) `method` - -##### Summary - -Creates an embedded resource from the specified DLL name. - -##### Returns - -The temporary file path where the embedded resource is created. - -##### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| dllName | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | The name of the DLL. | - - -## Function `type` - -##### Namespace - -PeartreeGames.Topiary - -##### Summary - -Represents a function that can be called dynamically. - - -### Call(argPtr,count) `method` - -##### Summary - -Executes the delegate stored in the Function object. - -##### Returns - -The result of executing the delegate. - -##### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| argPtr | [System.IntPtr](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IntPtr 'System.IntPtr') | A pointer to the arguments for the delegate. | -| count | [System.Byte](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Byte 'System.Byte') | The number of arguments. | - - -### Create(method) `method` - -##### Summary - -Creates a [Function](#T-PeartreeGames-Topiary-Function 'PeartreeGames.Topiary.Function') object based on the given [MethodInfo](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Reflection.MethodInfo 'System.Reflection.MethodInfo'). - -##### Returns - -A new instance of [Function](#T-PeartreeGames-Topiary-Function 'PeartreeGames.Topiary.Function') created from the method. - -##### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| method | [System.Reflection.MethodInfo](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Reflection.MethodInfo 'System.Reflection.MethodInfo') | The [MethodInfo](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Reflection.MethodInfo 'System.Reflection.MethodInfo') representing the method. | - -##### Exceptions - -| Name | Description | -| ---- | ----------- | -| [System.NotSupportedException](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.NotSupportedException 'System.NotSupportedException') | Thrown when the number of parameters is not supported. | - - -### CreateArgs(argPtr,count) `method` - -##### Summary - -Creates an array of TopiValue objects from the given IntPtr and count. - -##### Returns - -An array of TopiValue objects. - -##### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| argPtr | [System.IntPtr](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IntPtr 'System.IntPtr') | The IntPtr pointing to the start of the memory block containing the TopiValues. | -| count | [System.Byte](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Byte 'System.Byte') | The number of TopiValues to create. | - - -### Dispose() `method` - -##### Summary - -Disposes of the resources used by the Function instance. - -##### Parameters - -This method has no parameters. - - -### GetCallIntPtr() `method` - -##### Summary - -Returns the function pointer for the GetCallIntPtr method. - -##### Returns - -The function pointer for the GetCallIntPtr method. - -##### Parameters - -This method has no parameters. - - -### ToString() `method` - -##### Summary - -Converts the Function object to its string representation. - -##### Returns - -A string that represents the current Function object. - -##### Parameters - -This method has no parameters. - - -## ILoader `type` - -##### Namespace - -PeartreeGames.Topiary - -##### Summary - -Represents a loader interface for loading and interacting with libraries. - - -### Free(ptr) `method` - -##### Summary - -Frees the specified library handle. - -##### Returns - -`true` if the library handle is successfully freed; otherwise, `false`. - -##### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| ptr | [System.IntPtr](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IntPtr 'System.IntPtr') | The pointer to the library handle. | - - -### GetProc(name) `method` - -##### Summary - -Retrieves the address of the specified function from the loaded library. - -##### Returns - -The address of the specified function if the function is found, or IntPtr.Zero if the function is not found. - -##### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| name | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | The name of the function to retrieve. | - - -### Load() `method` - -##### Summary - -Loads the library. - -##### Returns - -A [SafeHandle](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Runtime.InteropServices.SafeHandle 'System.Runtime.InteropServices.SafeHandle') representing the loaded library. - -##### Parameters - -This method has no parameters. - -##### Exceptions - -| Name | Description | -| ---- | ----------- | -| [System.ComponentModel.Win32Exception](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.ComponentModel.Win32Exception 'System.ComponentModel.Win32Exception') | Thrown if the library failed to load. | - - -## IsWaitingDelegate `type` - -##### Namespace - -PeartreeGames.Topiary.Delegates - - -## Library `type` - -##### Namespace - -PeartreeGames.Topiary - -##### Summary - -Represents a library of functions and utilities for working with dialogue systems. - - -### #ctor() `constructor` - -##### Summary - -Represents a library that provides functionality for working with the Topiary dialogue system. - -##### Parameters - -This constructor has no parameters. - - -### Loader `constants` - -##### Summary - -Represents a loader for the PeartreeGames.Topiary library. - - -### OnDebugLogMessage `constants` - - -### Allocator `property` - -##### Summary - -Represents an allocator interface for memory management. - - -### Count `property` - -##### Summary - -Gets the count. - - -### Global `property` - -##### Summary - -Represents a global instance of the [Library](#T-PeartreeGames-Topiary-Library 'PeartreeGames.Topiary.Library') class. - - -### IsUnityRuntime `property` - -##### Summary - -Represents a property that indicates whether the program is running in Unity runtime or not. - - -### Dispose() `method` - -##### Summary - -Releases all resources used by the object. - -##### Parameters - -This method has no parameters. - - -### PtrToUtf8String(pointer,count) `method` - -##### Summary - -Converts a pointer to a null-terminated UTF8-encoded string into a C# string. - -##### Returns - -The converted C# string. - -##### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| pointer | [System.IntPtr](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IntPtr 'System.IntPtr') | The pointer to the null-terminated UTF8-encoded string. | -| count | [System.Nullable{System.Int32}](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Nullable 'System.Nullable{System.Int32}') | Optional: The number of bytes to read from the pointer. Use null to read until null termination. | - -##### Remarks - -Since we're targeting .net471 for unity we need to create our own ptr to utf8 it seems - - -## Line `type` - -##### Namespace - -PeartreeGames.Topiary - -##### Summary - -Dialogue Line - - -### Content `property` - -##### Summary - -The words spoken - - -### Speaker `property` - -##### Summary - -The Speaker of the dialogue line - - -### Tags `property` - -##### Summary - -Array of tags - - -## LoadStateDelegate `type` - -##### Namespace - -PeartreeGames.Topiary.Delegates - -##### Summary - -Delegate used to load the state of the library. - -##### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| vmPtr | [T:PeartreeGames.Topiary.Delegates.LoadStateDelegate](#T-T-PeartreeGames-Topiary-Delegates-LoadStateDelegate 'T:PeartreeGames.Topiary.Delegates.LoadStateDelegate') | Pointer to the virtual machine. | - - -## MacLoader `type` - -##### Namespace - -PeartreeGames.Topiary - -##### Summary - -Represents a loader interface for loading and interacting with libraries. - - -### #ctor() `constructor` - -##### Summary - -Represents a loader interface for loading and interacting with libraries. - -##### Parameters - -This constructor has no parameters. - - -### Free(ptr) `method` - -##### Summary - -Frees the specified library handle. - -##### Returns - -`true` if the library handle is successfully freed; otherwise, `false`. - -##### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| ptr | [System.IntPtr](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IntPtr 'System.IntPtr') | The pointer to the library handle. | - -##### Example - -``` -IntPtr libraryHandle = LoadLibrary("example.dll"); -bool result = Free(libraryHandle); -``` - - -### GetProc(name) `method` - -##### Summary - -Retrieves the address of the specified function from the loaded library. - -##### Returns - -The address of the specified function if the function is found, or IntPtr.Zero if the function is not found. - -##### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| name | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | The name of the function to retrieve. | - - -### Load() `method` - -##### Summary - -Loads the library by calling the underlying native method dlopen. - -##### Returns - -A SafeHandle object representing the loaded library. - -##### Parameters - -This method has no parameters. - - -### ReleaseHandle() `method` - -##### Summary - -Releases the handle of the library. - -##### Returns - -`true` if the handle is successfully released; otherwise, `false`. - -##### Parameters - -This method has no parameters. - - -## OnChoicesCallback `type` - -##### Namespace - -PeartreeGames.Topiary.Dialogue - -##### Summary - -Represents a callback function for handling choices in a dialogue. - -##### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| dialogue | [T:PeartreeGames.Topiary.Dialogue.OnChoicesCallback](#T-T-PeartreeGames-Topiary-Dialogue-OnChoicesCallback 'T:PeartreeGames.Topiary.Dialogue.OnChoicesCallback') | The dialogue in which the choice is being made. | - - -## OnChoicesDelegate `type` - -##### Namespace - -PeartreeGames.Topiary.Delegates - -##### Summary - -Represents a delegate that handles the event when choices are presented to the user. - -##### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| vmPtr | [T:PeartreeGames.Topiary.Delegates.OnChoicesDelegate](#T-T-PeartreeGames-Topiary-Delegates-OnChoicesDelegate 'T:PeartreeGames.Topiary.Delegates.OnChoicesDelegate') | A pointer to the virtual machine instance. | - - -## OnLineCallback `type` - -##### Namespace - -PeartreeGames.Topiary.Dialogue - -##### Summary - -Represents a callback method that processes each line of dialogue. - -##### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| dialogue | [T:PeartreeGames.Topiary.Dialogue.OnLineCallback](#T-T-PeartreeGames-Topiary-Dialogue-OnLineCallback 'T:PeartreeGames.Topiary.Dialogue.OnLineCallback') | The Dialogue object that invoked the callback. | - - -## OnLineDelegate `type` - -##### Namespace - -PeartreeGames.Topiary.Delegates - -##### Summary - -Represents a delegate used for handling an event when a line is encountered during dialogue execution. - -##### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| vmPtr | [T:PeartreeGames.Topiary.Delegates.OnLineDelegate](#T-T-PeartreeGames-Topiary-Delegates-OnLineDelegate 'T:PeartreeGames.Topiary.Delegates.OnLineDelegate') | The pointer to the virtual machine. | - - -## RunDelegate `type` - -##### Namespace - -PeartreeGames.Topiary.Delegates - -##### Summary - -Represents a delegate that is used to run the library. - -##### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| vmPtr | [T:PeartreeGames.Topiary.Delegates.RunDelegate](#T-T-PeartreeGames-Topiary-Delegates-RunDelegate 'T:PeartreeGames.Topiary.Delegates.RunDelegate') | The pointer to the VM. | - - -## SaveStateDelegate `type` - -##### Namespace - -PeartreeGames.Topiary.Delegates - -##### Summary - -Represents a delegate for saving the state of a virtual machine. - -##### Returns - -The number of bytes written to the output buffer. - -##### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| vmPtr | [T:PeartreeGames.Topiary.Delegates.SaveStateDelegate](#T-T-PeartreeGames-Topiary-Delegates-SaveStateDelegate 'T:PeartreeGames.Topiary.Delegates.SaveStateDelegate') | A pointer to the virtual machine. | - - -## SelectChoiceDelegate `type` - -##### Namespace - -PeartreeGames.Topiary.Delegates - -##### Summary - -Delegate for selecting a choice in the game. - -##### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| vmPtr | [T:PeartreeGames.Topiary.Delegates.SelectChoiceDelegate](#T-T-PeartreeGames-Topiary-Delegates-SelectChoiceDelegate 'T:PeartreeGames.Topiary.Delegates.SelectChoiceDelegate') | A pointer to the virtual machine. | - - -## SelectContinueDelegate `type` - -##### Namespace - -PeartreeGames.Topiary.Delegates - -##### Summary - -Represents a delegate used to select the continue option. - -##### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| vmPtr | [T:PeartreeGames.Topiary.Delegates.SelectContinueDelegate](#T-T-PeartreeGames-Topiary-Delegates-SelectContinueDelegate 'T:PeartreeGames.Topiary.Delegates.SelectContinueDelegate') | The pointer to the virtual machine. | - - -## SetDebugLogDelegate `type` - -##### Namespace - -PeartreeGames.Topiary.Delegates - -##### Summary - -Represents a delegate for setting the debug log. - -##### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| logPtr | [T:PeartreeGames.Topiary.Delegates.SetDebugLogDelegate](#T-T-PeartreeGames-Topiary-Delegates-SetDebugLogDelegate 'T:PeartreeGames.Topiary.Delegates.SetDebugLogDelegate') | The pointer to the debug log function. | - - -## SetDebugSeverityDelegate `type` - -##### Namespace - -PeartreeGames.Topiary.Delegates - - -## SetExternBoolDelegate `type` - -##### Namespace - -PeartreeGames.Topiary.Delegates - -##### Summary - -Delegate for setting an extern boolean value. - -##### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| vmPtr | [T:PeartreeGames.Topiary.Delegates.SetExternBoolDelegate](#T-T-PeartreeGames-Topiary-Delegates-SetExternBoolDelegate 'T:PeartreeGames.Topiary.Delegates.SetExternBoolDelegate') | The pointer to the virtual machine. | - - -## SetExternFuncDelegate `type` - -##### Namespace - -PeartreeGames.Topiary.Delegates - -##### Summary - -Represents a delegate that can be used to set an external function in the Library class. - -##### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| vmPtr | [T:PeartreeGames.Topiary.Delegates.SetExternFuncDelegate](#T-T-PeartreeGames-Topiary-Delegates-SetExternFuncDelegate 'T:PeartreeGames.Topiary.Delegates.SetExternFuncDelegate') | The pointer to the virtual machine. | - - -## SetExternNilDelegate `type` - -##### Namespace - -PeartreeGames.Topiary.Delegates - -##### Summary - -Represents a delegate used to set an extern value to nil. - -##### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| vmPtr | [T:PeartreeGames.Topiary.Delegates.SetExternNilDelegate](#T-T-PeartreeGames-Topiary-Delegates-SetExternNilDelegate 'T:PeartreeGames.Topiary.Delegates.SetExternNilDelegate') | A pointer to the virtual machine. | - - -## SetExternNumberDelegate `type` - -##### Namespace - -PeartreeGames.Topiary.Delegates - -##### Summary - -Delegate for the function that sets an external number in the library. - -##### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| vmPtr | [T:PeartreeGames.Topiary.Delegates.SetExternNumberDelegate](#T-T-PeartreeGames-Topiary-Delegates-SetExternNumberDelegate 'T:PeartreeGames.Topiary.Delegates.SetExternNumberDelegate') | Pointer to the virtual machine instance. | - - -## SetExternStringDelegate `type` - -##### Namespace - -PeartreeGames.Topiary.Delegates - -##### Summary - -Delegate for setting an external string in the VM. - -##### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| vmPtr | [T:PeartreeGames.Topiary.Delegates.SetExternStringDelegate](#T-T-PeartreeGames-Topiary-Delegates-SetExternStringDelegate 'T:PeartreeGames.Topiary.Delegates.SetExternStringDelegate') | Pointer to the VM. | - - -## Severity `type` - -##### Namespace - -PeartreeGames.Topiary.Library - -##### Summary - -Represents the severity level of a log message. - - -## StartDelegate `type` - -##### Namespace - -PeartreeGames.Topiary.Delegates - -##### Summary - -Delegate for the Start method in the PeartreeGames.Topiary library. - -##### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| vmPtr | [T:PeartreeGames.Topiary.Delegates.StartDelegate](#T-T-PeartreeGames-Topiary-Delegates-StartDelegate 'T:PeartreeGames.Topiary.Delegates.StartDelegate') | A pointer to the virtual machine instance. | - - -## SubscribeDelegate `type` - -##### Namespace - -PeartreeGames.Topiary.Delegates - -##### Summary - -Represents a delegate used to subscribe to events in the Topiary library. - -##### Returns - -True if the subscription is successful, otherwise false. - -##### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| vmPtr | [T:PeartreeGames.Topiary.Delegates.SubscribeDelegate](#T-T-PeartreeGames-Topiary-Delegates-SubscribeDelegate 'T:PeartreeGames.Topiary.Delegates.SubscribeDelegate') | The pointer to the VM. | - - -## Subscriber `type` - -##### Namespace - -PeartreeGames.Topiary.Delegates - -##### Summary - -Provides methods to subscribe and unsubscribe to dialogue events. - - -## Tag `type` - -##### Namespace - -PeartreeGames.Topiary.TopiValue - -##### Summary - -Represents the different types of tags for the TopiValue struct. - - -### Bool `constants` - -##### Summary - -Represents a boolean value in the Topiary framework. - - -### List `constants` - -##### Summary - -Represents the different tags for the TopiValue enum. - - -### Map `constants` - -##### Summary - -Represents a member of the enum Tag with the value Map. - - -### Nil `constants` - -##### Summary - -Represents the Nil tag of the [Tag](#T-PeartreeGames-Topiary-TopiValue-Tag 'PeartreeGames.Topiary.TopiValue.Tag') enum. - - -### Number `constants` - -##### Summary - -Represents a numeric value in the TopiValue enum. - - -### Set `constants` - -##### Summary - -Represents a member of the enum Tag that signifies a Set type. - - -### String `constants` - -##### Summary - -Represents a string value in the [TopiValue](#T-PeartreeGames-Topiary-TopiValue 'PeartreeGames.Topiary.TopiValue') enum. - - -## TopiAttribute `type` - -##### Namespace - -PeartreeGames.Topiary - -##### Summary - -Represents an attribute that declares a method as an extern topi function. -Can only be used on static methods. - - -### #ctor(name) `constructor` - -##### Summary - -Declare the function as an extern topi function -Can only be used on static methods - -##### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| name | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | Name of the function in the topi file | - - -### Name `property` - -##### Summary - -Gets or sets the name of the function in the topi file. - - -## TopiValue `type` - -##### Namespace - -PeartreeGames.Topiary - -##### Summary - -Topiary Value container -Data is overlapped in memory so ensure correct value is used -or check tag if unknown - - -### AsType\`\`1() `method` - -##### Summary - -Gets the value of the TopiValue as the specified type. -Will create boxing, better to use the above is value type is known - -##### Returns - -The value of the TopiValue as type T. - -##### Parameters - -This method has no parameters. - -##### Generic Types - -| Name | Description | -| ---- | ----------- | -| T | The type to convert the value to. | - -##### Remarks - -This method converts the underlying value of the TopiValue to the specified type T. -If the conversion is not possible, an InvalidCastException will be thrown. - - -### Dispose() `method` - -##### Summary - -Releases the resources used by the TopiValue. - -##### Parameters - -This method has no parameters. - - -### Equals(other) `method` - -##### Summary - -Determines whether the current instance is equal to the specified object. - -##### Returns - -True if the current instance is equal to the specified object; otherwise, false. - -##### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| other | [PeartreeGames.Topiary.TopiValue](#T-PeartreeGames-Topiary-TopiValue 'PeartreeGames.Topiary.TopiValue') | The object to compare with the current instance. | - - -### Equals(obj) `method` - -##### Summary - -Determines whether the current instance is equal to another TopiValue object. - -##### Returns - -true if the current instance is equal to the other object; otherwise, false. - -##### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| obj | [System.Object](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.Object 'System.Object') | The TopiValue object to compare with the current instance. | - - -### FromPtr(ptr) `method` - -##### Summary - -Converts a pointer to a TopiValue struct. - -##### Returns - -The converted TopiValue. - -##### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| ptr | [System.IntPtr](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IntPtr 'System.IntPtr') | The pointer to the TopiValue struct. | - - -### GetHashCode() `method` - -##### Summary - -Gets the hash code of the TopiValue object. - -##### Returns - -The hash code of the TopiValue object. - -##### Parameters - -This method has no parameters. - - -### ToString() `method` - -##### Summary - -Converts the TopiValue object to its string representation. - -##### Returns - -The string representation of the TopiValue object. - -##### Parameters - -This method has no parameters. - - -## TryGetValueDelegate `type` - -##### Namespace - -PeartreeGames.Topiary.Delegates - -##### Summary - -Delegate for the TryGetValue function. - -##### Returns - -True if the value was successfully retrieved, false otherwise. - -##### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| vmPtr | [T:PeartreeGames.Topiary.Delegates.TryGetValueDelegate](#T-T-PeartreeGames-Topiary-Delegates-TryGetValueDelegate 'T:PeartreeGames.Topiary.Delegates.TryGetValueDelegate') | The pointer to the virtual machine. | - - -## UnsubscribeDelegate `type` - -##### Namespace - -PeartreeGames.Topiary.Delegates - -##### Summary - -Represents a delegate used for unregistering a callback function from the library. - -##### Returns - -true if the callback function was successfully unregistered; otherwise, false. - -##### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| vmPtr | [T:PeartreeGames.Topiary.Delegates.UnsubscribeDelegate](#T-T-PeartreeGames-Topiary-Delegates-UnsubscribeDelegate 'T:PeartreeGames.Topiary.Delegates.UnsubscribeDelegate') | A pointer to the virtual machine instance. | - - -## WindowsLoader `type` - -##### Namespace - -PeartreeGames.Topiary - -##### Summary - -Represents a loader interface for loading and interacting with libraries. - - -### #ctor() `constructor` - -##### Summary - -Represents a loader interface for loading and interacting with libraries. - -##### Parameters - -This constructor has no parameters. - - -### Free(ptr) `method` - -##### Summary - -Frees the specified library handle. - -##### Returns - -`true` if the library handle is successfully freed; otherwise, `false`. - -##### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| ptr | [System.IntPtr](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.IntPtr 'System.IntPtr') | The pointer to the library handle. | - -##### Example - -``` -IntPtr libraryHandle = LoadLibrary("example.dll"); -bool result = Free(libraryHandle); -``` - - -### GetProc(name) `method` - -##### Summary - -Retrieves the address of the specified function from the loaded library. - -##### Returns - -The address of the specified function if the function is found, or IntPtr.Zero if the function is not found. - -##### Parameters - -| Name | Type | Description | -| ---- | ---- | ----------- | -| name | [System.String](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.String 'System.String') | The name of the function to retrieve. | - - -### Load() `method` - -##### Summary - -Loads the library. - -##### Returns - -The safe handle of the loaded library. - -##### Parameters - -This method has no parameters. - -##### Exceptions - -| Name | Description | -| ---- | ----------- | -| [System.ComponentModel.Win32Exception](http://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k:System.ComponentModel.Win32Exception 'System.ComponentModel.Win32Exception') | Thrown when the library failed to load. | - - -### ReleaseHandle() `method` - -##### Summary - -Releases the handle of the library. - -##### Returns - -`true` if the handle is successfully released; otherwise, `false`. - -##### Parameters - -This method has no parameters. diff --git a/docs/peartreegames.topiary.bytecode.md b/docs/peartreegames.topiary.bytecode.md new file mode 100644 index 0000000..4c3ab4f --- /dev/null +++ b/docs/peartreegames.topiary.bytecode.md @@ -0,0 +1,31 @@ +# ByteCode + +Namespace: PeartreeGames.Topiary + +Provides a set of methods for working with bytecode. + +```csharp +public static class ByteCode +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [ByteCode](./peartreegames.topiary.bytecode.md) + +## Methods + +### **GetExterns(BinaryReader)** + +Retrieves a sorted set of external names from the given binary reader. + +```csharp +public static SortedSet GetExterns(BinaryReader reader) +``` + +#### Parameters + +`reader` [BinaryReader](https://docs.microsoft.com/en-us/dotnet/api/system.io.binaryreader)
+The binary reader from which to read the external names. + +#### Returns + +SortedSet<String>
+A sorted set of external names. diff --git a/docs/peartreegames.topiary.choice.md b/docs/peartreegames.topiary.choice.md new file mode 100644 index 0000000..1028733 --- /dev/null +++ b/docs/peartreegames.topiary.choice.md @@ -0,0 +1,94 @@ +# Choice + +Namespace: PeartreeGames.Topiary + +Represents a choice in a dialogue. + +```csharp +public struct Choice +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [ValueType](https://docs.microsoft.com/en-us/dotnet/api/system.valuetype) → [Choice](./peartreegames.topiary.choice.md) + +## Properties + +### **VisitCount** + +Gets the visit count associated with the choice. + +```csharp +public int VisitCount { get; } +``` + +#### Property Value + +[Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
+The visit count. + +### **Ip** + +Gets the IP (Instruction Pointer) of the choice. + +```csharp +public int Ip { get; } +``` + +#### Property Value + +[Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
+ +**Remarks:** + +Mostly used internally, but exposed here as well + +### **Content** + +Represents a choice in a dialogue. + +```csharp +public string Content { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **Tags** + +Gets the tags associated with the choice. + +```csharp +public String[] Tags { get; } +``` + +#### Property Value + +[String[]](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The tags associated with the choice. + +**Remarks:** + +The tags are represented as an array of strings. + +## Methods + +### **MarshalPtr(IntPtr, Byte)** + +Marshals an [IntPtr](https://docs.microsoft.com/en-us/dotnet/api/system.intptr) pointer to an array of [Choice](./peartreegames.topiary.choice.md) structures. + +```csharp +Choice[] MarshalPtr(IntPtr choicePtr, byte count) +``` + +#### Parameters + +`choicePtr` [IntPtr](https://docs.microsoft.com/en-us/dotnet/api/system.intptr)
+The pointer to the array of [Choice](./peartreegames.topiary.choice.md) structures. + +`count` [Byte](https://docs.microsoft.com/en-us/dotnet/api/system.byte)
+The number of [Choice](./peartreegames.topiary.choice.md) structures in the array. + +#### Returns + +[Choice[]](./peartreegames.topiary.choice.md)
+An array of [Choice](./peartreegames.topiary.choice.md) structures. diff --git a/docs/peartreegames.topiary.delegates.md b/docs/peartreegames.topiary.delegates.md new file mode 100644 index 0000000..8eb6640 --- /dev/null +++ b/docs/peartreegames.topiary.delegates.md @@ -0,0 +1,15 @@ +# Delegates + +Namespace: PeartreeGames.Topiary + +The Delegates class provides delegates for various functions used in the PeartreeGames.Topiary namespace. + +```csharp +public static class Delegates +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [Delegates](./peartreegames.topiary.delegates.md) + +**Remarks:** + +These delegates are used for callback functions, function pointers, and event handlers within the Topiary library. diff --git a/docs/peartreegames.topiary.dialogue.md b/docs/peartreegames.topiary.dialogue.md new file mode 100644 index 0000000..7ab3cdd --- /dev/null +++ b/docs/peartreegames.topiary.dialogue.md @@ -0,0 +1,407 @@ +# Dialogue + +Namespace: PeartreeGames.Topiary + +Represents a dialogue instance. + +```csharp +public class Dialogue : System.IDisposable +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [Dialogue](./peartreegames.topiary.dialogue.md)
+Implements [IDisposable](https://docs.microsoft.com/en-us/dotnet/api/system.idisposable) + +## Properties + +### **IsValid** + +Gets a value indicating whether the Dialogue instance is valid. + +```csharp +public bool IsValid { get; } +``` + +#### Property Value + +[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+ +**Remarks:** + +This property returns `true` if the internal pointer `_vmPtr` is not zero; + otherwise, it returns `false`. + +### **Library** + +Represents a library that provides functionality for creating and managing dialogues. + +```csharp +public Library Library { get; } +``` + +#### Property Value + +[Library](./peartreegames.topiary.library.md)
+ +### **CanContinue** + +Gets a value indicating whether the dialogue can continue. + +```csharp +public bool CanContinue { get; } +``` + +#### Property Value + +[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+`true` if the dialogue can continue; otherwise, `false`. + +### **IsWaiting** + +Gets a value indicating whether the dialogue is waiting for user input. + +```csharp +public bool IsWaiting { get; } +``` + +#### Property Value + +[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+ +## Constructors + +### **Dialogue(Byte[], OnLineCallback, OnChoicesCallback, Severity)** + +Represents a dialogue. + +```csharp +public Dialogue(Byte[] source, OnLineCallback onLine, OnChoicesCallback onChoices, Severity severity) +``` + +#### Parameters + +`source` [Byte[]](https://docs.microsoft.com/en-us/dotnet/api/system.byte)
+ +`onLine` [OnLineCallback](./peartreegames.topiary.dialogue.onlinecallback.md)
+ +`onChoices` [OnChoicesCallback](./peartreegames.topiary.dialogue.onchoicescallback.md)
+ +`severity` [Severity](./peartreegames.topiary.library.severity.md)
+ +## Methods + +### **Dispose()** + +Releases all resources used by the Dialogue object. + +```csharp +public void Dispose() +``` + +### **Compile(String, Severity)** + +Compile a ".topi" file into bytes. + Should be saved to a ".topib" file + Will precalculate the required capacity + +```csharp +public static Byte[] Compile(string fullPath, Severity severity) +``` + +#### Parameters + +`fullPath` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The file absolute path + +`severity` [Severity](./peartreegames.topiary.library.severity.md)
+Log severity + +#### Returns + +[Byte[]](https://docs.microsoft.com/en-us/dotnet/api/system.byte)
+Compiled bytes + +### **Compile(String, Int64, Severity)** + +Compile a ".topi" file into bytes. + Should be saved to a ".topib" file + +```csharp +public static Byte[] Compile(string fullPath, long capacity, Severity severity) +``` + +#### Parameters + +`fullPath` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The file absolute path + +`capacity` [Int64](https://docs.microsoft.com/en-us/dotnet/api/system.int64)
+Capacity for the bytecode output + +`severity` [Severity](./peartreegames.topiary.library.severity.md)
+Log severity + +#### Returns + +[Byte[]](https://docs.microsoft.com/en-us/dotnet/api/system.byte)
+Compiled bytes + +### **Start(String)** + +Start the Dialogue + +```csharp +public void Start(string bough) +``` + +#### Parameters + +`bough` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+Optional: The bough path where the conversation will start. + If non provided, first bough in the file will be used + +### **Run()** + +Run the Dialogue until the next Dialogue or Choice + +```csharp +public void Run() +``` + +#### Exceptions + +[Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception)
+ +### **Continue()** + +Continue the Dialogue. + +```csharp +public void Continue() +``` + +### **SelectChoice(Int32)** + +Select a Choice. + +```csharp +public void SelectChoice(int index) +``` + +#### Parameters + +`index` [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
+The index of the choice selected + +### **SaveState()** + +Save current Dialogue State to JSON + Will precalculate the necessary size + Should merge the resulting JSON with the Game Root JSON State + +```csharp +public string SaveState() +``` + +#### Returns + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **SaveState(Int64)** + +Save current Dialogue State to JSON + Should merge the resulting JSON with the Game Root JSON State + +```csharp +public string SaveState(long capacity) +``` + +#### Parameters + +`capacity` [Int64](https://docs.microsoft.com/en-us/dotnet/api/system.int64)
+The maximum size of bytes to allocate + +#### Returns + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **LoadState(String)** + +Load a JSON state into the Dialogue + +```csharp +public void LoadState(string json) +``` + +#### Parameters + +`json` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+JSON string + +### **GetValue(String)** + +Retrieve the current value of any Global variable in the dialogue + +```csharp +public TopiValue GetValue(string name) +``` + +#### Parameters + +`name` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The name of the variable + +#### Returns + +[TopiValue](./peartreegames.topiary.topivalue.md)
+TopiValue.nil if not found + +### **DestroyValue(TopiValue&)** + +Destroy a reference value in unmanaged memory + NOTE: This should be removed in future versions + +```csharp +public void DestroyValue(TopiValue& value) +``` + +#### Parameters + +`value` [TopiValue&](./peartreegames.topiary.topivalue&.md)
+The value to be destroyed + +### **Subscribe(String, Subscriber)** + +Subscribe to when a Global variable changes + +```csharp +public bool Subscribe(string name, Subscriber callback) +``` + +#### Parameters + +`name` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The name of the variable + +`callback` [Subscriber](./peartreegames.topiary.delegates.subscriber.md)
+The callback to be executed on change + +#### Returns + +[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+ +### **Unsubscribe(String, Subscriber)** + +Unsubscribe when a Global variable changes + +```csharp +public bool Unsubscribe(string name, Subscriber callback) +``` + +#### Parameters + +`name` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The name of the variable + +`callback` [Subscriber](./peartreegames.topiary.delegates.subscriber.md)
+The callback that was passed into Subscribe + +#### Returns + +[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+ +### **Set(String, Boolean)** + +Set an Extern variable to a bool value + +```csharp +public void Set(string name, bool value) +``` + +#### Parameters + +`name` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The name of the variable + +`value` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+The value to set + +### **Set(String, Single)** + +Set an Extern variable to a float value + +```csharp +public void Set(string name, float value) +``` + +#### Parameters + +`name` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The name of the variable + +`value` [Single](https://docs.microsoft.com/en-us/dotnet/api/system.single)
+The value to set + +### **Set(String, String)** + +Set an Extern variable to a float value + +```csharp +public void Set(string name, string value) +``` + +#### Parameters + +`name` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The name of the variable + +`value` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The value to set + +### **Set(String, Function, Byte)** + +Set a Global Extern variable to a function value + Note: It is easier to use the TopiAttribute instead with the BindFunctions method + However this is kept in case you need more control + +```csharp +public void Set(string name, Function function, byte arity) +``` + +#### Parameters + +`name` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The name of the variable + +`function` [Function](./peartreegames.topiary.function.md)
+The value to set + +`arity` [Byte](https://docs.microsoft.com/en-us/dotnet/api/system.byte)
+The number of parameters the function accepts + +### **Unset(String)** + +Set an Extern variable to a nil value + +```csharp +public void Unset(string name) +``` + +#### Parameters + +`name` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The name of the variable + +### **BindFunctions(IEnumerable<Assembly>)** + +Bind all TopiAttribute functions within the given Assemblies + Functions must be of type "Func<TopiValue[,TopiValue,TopiValue,TopiValue,TopiValue]>" + or "Action[<TopiValue,TopiValue,TopiValue,TopiValue>]" + See [Function](./peartreegames.topiary.function.md) + +```csharp +public void BindFunctions(IEnumerable assemblies) +``` + +#### Parameters + +`assemblies` [IEnumerable<Assembly>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)
diff --git a/docs/peartreegames.topiary.embeddedloader.md b/docs/peartreegames.topiary.embeddedloader.md new file mode 100644 index 0000000..fac786e --- /dev/null +++ b/docs/peartreegames.topiary.embeddedloader.md @@ -0,0 +1,31 @@ +# EmbeddedLoader + +Namespace: PeartreeGames.Topiary + +Represents a loader interface for loading and interacting with libraries. + +```csharp +public static class EmbeddedLoader +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [EmbeddedLoader](./peartreegames.topiary.embeddedloader.md) + +## Methods + +### **CreateEmbeddedResource(String)** + +Creates an embedded resource from the specified DLL name. + +```csharp +public static string CreateEmbeddedResource(string dllName) +``` + +#### Parameters + +`dllName` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The name of the DLL. + +#### Returns + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The temporary file path where the embedded resource is created. diff --git a/docs/peartreegames.topiary.function.md b/docs/peartreegames.topiary.function.md new file mode 100644 index 0000000..efcadde --- /dev/null +++ b/docs/peartreegames.topiary.function.md @@ -0,0 +1,104 @@ +# Function + +Namespace: PeartreeGames.Topiary + +Represents a function that can be called dynamically. + +```csharp +public class Function : System.IDisposable +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [Function](./peartreegames.topiary.function.md)
+Implements [IDisposable](https://docs.microsoft.com/en-us/dotnet/api/system.idisposable) + +## Constructors + +### **Function(Delegate)** + +```csharp +public Function(Delegate del) +``` + +#### Parameters + +`del` [Delegate](https://docs.microsoft.com/en-us/dotnet/api/system.delegate)
+ +## Methods + +### **GetCallIntPtr()** + +Returns the function pointer for the GetCallIntPtr method. + +```csharp +public IntPtr GetCallIntPtr() +``` + +#### Returns + +[IntPtr](https://docs.microsoft.com/en-us/dotnet/api/system.intptr)
+The function pointer for the GetCallIntPtr method. + +### **Dispose()** + +Disposes of the resources used by the Function instance. + +```csharp +public void Dispose() +``` + +### **ToString()** + +Converts the Function object to its string representation. + +```csharp +public string ToString() +``` + +#### Returns + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+A string that represents the current Function object. + +### **Call(IntPtr, Byte)** + +Executes the delegate stored in the Function object. + +```csharp +public TopiValue Call(IntPtr argPtr, byte count) +``` + +#### Parameters + +`argPtr` [IntPtr](https://docs.microsoft.com/en-us/dotnet/api/system.intptr)
+A pointer to the arguments for the delegate. + +`count` [Byte](https://docs.microsoft.com/en-us/dotnet/api/system.byte)
+The number of arguments. + +#### Returns + +[TopiValue](./peartreegames.topiary.topivalue.md)
+The result of executing the delegate. + +### **Create(MethodInfo)** + +Creates a [Function](./peartreegames.topiary.function.md) object based on the given [MethodInfo](https://docs.microsoft.com/en-us/dotnet/api/system.reflection.methodinfo). + +```csharp +public static Function Create(MethodInfo method) +``` + +#### Parameters + +`method` [MethodInfo](https://docs.microsoft.com/en-us/dotnet/api/system.reflection.methodinfo)
+The [MethodInfo](https://docs.microsoft.com/en-us/dotnet/api/system.reflection.methodinfo) representing the method. + +#### Returns + +[Function](./peartreegames.topiary.function.md)
+A new instance of [Function](./peartreegames.topiary.function.md) created from the method. + +#### Exceptions + +[NotSupportedException](https://docs.microsoft.com/en-us/dotnet/api/system.notsupportedexception)
+Thrown when the number of parameters is not supported. diff --git a/docs/peartreegames.topiary.iallocator.md b/docs/peartreegames.topiary.iallocator.md new file mode 100644 index 0000000..ec761da --- /dev/null +++ b/docs/peartreegames.topiary.iallocator.md @@ -0,0 +1,33 @@ +# IAllocator + +Namespace: PeartreeGames.Topiary + +```csharp +public interface IAllocator +``` + +## Methods + +### **Allocate(UInt64)** + +```csharp +IntPtr Allocate(ulong size) +``` + +#### Parameters + +`size` [UInt64](https://docs.microsoft.com/en-us/dotnet/api/system.uint64)
+ +#### Returns + +[IntPtr](https://docs.microsoft.com/en-us/dotnet/api/system.intptr)
+ +### **Deallocate(IntPtr)** + +```csharp +void Deallocate(IntPtr ptr) +``` + +#### Parameters + +`ptr` [IntPtr](https://docs.microsoft.com/en-us/dotnet/api/system.intptr)
diff --git a/docs/peartreegames.topiary.iloader.md b/docs/peartreegames.topiary.iloader.md new file mode 100644 index 0000000..471219d --- /dev/null +++ b/docs/peartreegames.topiary.iloader.md @@ -0,0 +1,65 @@ +# ILoader + +Namespace: PeartreeGames.Topiary + +Represents a loader interface for loading and interacting with libraries. + +```csharp +public interface ILoader +``` + +## Methods + +### **Load()** + +Loads the library. + +```csharp +SafeHandle Load() +``` + +#### Returns + +[SafeHandle](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.safehandle)
+A [SafeHandle](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.safehandle) representing the loaded library. + +#### Exceptions + +T:System.ComponentModel.Win32Exception
+Thrown if the library failed to load. + +### **Free(IntPtr)** + +Frees the specified library handle. + +```csharp +bool Free(IntPtr ptr) +``` + +#### Parameters + +`ptr` [IntPtr](https://docs.microsoft.com/en-us/dotnet/api/system.intptr)
+The pointer to the library handle. + +#### Returns + +[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+`true` if the library handle is successfully freed; otherwise, `false`. + +### **GetProc(String)** + +Retrieves the address of the specified function from the loaded library. + +```csharp +IntPtr GetProc(string name) +``` + +#### Parameters + +`name` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The name of the function to retrieve. + +#### Returns + +[IntPtr](https://docs.microsoft.com/en-us/dotnet/api/system.intptr)
+The address of the specified function if the function is found, or IntPtr.Zero if the function is not found. diff --git a/docs/peartreegames.topiary.library.md b/docs/peartreegames.topiary.library.md new file mode 100644 index 0000000..c43fd47 --- /dev/null +++ b/docs/peartreegames.topiary.library.md @@ -0,0 +1,268 @@ +# Library + +Namespace: PeartreeGames.Topiary + +Represents a library of functions and utilities for working with dialogue systems. + +```csharp +public class Library : System.IDisposable +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [Library](./peartreegames.topiary.library.md)
+Implements [IDisposable](https://docs.microsoft.com/en-us/dotnet/api/system.idisposable) + +## Fields + +### **CreateVm** + +```csharp +public CreateVmDelegate CreateVm; +``` + +### **DestroyVm** + +```csharp +public DestroyVmDelegate DestroyVm; +``` + +### **Start** + +```csharp +public StartDelegate Start; +``` + +### **CalculateCompileSize** + +```csharp +public CalculateCompileSizeDelegate CalculateCompileSize; +``` + +### **Compile** + +```csharp +public CompileDelegate Compile; +``` + +### **Run** + +```csharp +public RunDelegate Run; +``` + +### **SelectContinue** + +```csharp +public SelectContinueDelegate SelectContinue; +``` + +### **CanContinue** + +```csharp +public CanContinueDelegate CanContinue; +``` + +### **IsWaiting** + +```csharp +public IsWaitingDelegate IsWaiting; +``` + +### **SelectChoice** + +```csharp +public SelectChoiceDelegate SelectChoice; +``` + +### **TryGetValue** + +```csharp +public TryGetValueDelegate TryGetValue; +``` + +### **DestroyValue** + +```csharp +public DestroyValueDelegate DestroyValue; +``` + +### **Subscribe** + +```csharp +public SubscribeDelegate Subscribe; +``` + +### **Unsubscribe** + +```csharp +public UnsubscribeDelegate Unsubscribe; +``` + +### **SetExternNumber** + +```csharp +public SetExternNumberDelegate SetExternNumber; +``` + +### **SetExternString** + +```csharp +public SetExternStringDelegate SetExternString; +``` + +### **SetExternBool** + +```csharp +public SetExternBoolDelegate SetExternBool; +``` + +### **SetExternNil** + +```csharp +public SetExternNilDelegate SetExternNil; +``` + +### **SetExternFunc** + +```csharp +public SetExternFuncDelegate SetExternFunc; +``` + +### **CalculateStateSize** + +```csharp +public CalculateStateSizeDelegate CalculateStateSize; +``` + +### **SaveState** + +```csharp +public SaveStateDelegate SaveState; +``` + +### **LoadState** + +```csharp +public LoadStateDelegate LoadState; +``` + +### **SetDebugLog** + +```csharp +public SetDebugLogDelegate SetDebugLog; +``` + +### **SetDebugSeverity** + +```csharp +public SetDebugSeverityDelegate SetDebugSeverity; +``` + +### **OnDebugLogMessage** + +```csharp +public static Action OnDebugLogMessage; +``` + +### **Loader** + +Represents a loader for the PeartreeGames.Topiary library. + +```csharp +public static ILoader Loader; +``` + +## Properties + +### **Count** + +Gets the count. + +```csharp +public static int Count { get; } +``` + +#### Property Value + +[Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
+The count. + +### **Global** + +Represents a global instance of the [Library](./peartreegames.topiary.library.md) class. + +```csharp +public static Library Global { get; } +``` + +#### Property Value + +[Library](./peartreegames.topiary.library.md)
+ +### **IsUnityRuntime** + +Represents a property that indicates whether the program is running in Unity runtime or not. + +```csharp +public static bool IsUnityRuntime { get; set; } +``` + +#### Property Value + +[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+ +### **Allocator** + +Represents an allocator interface for memory management. + +```csharp +public static IAllocator Allocator { get; set; } +``` + +#### Property Value + +[IAllocator](./peartreegames.topiary.iallocator.md)
+ +## Constructors + +### **Library()** + +Represents a library that provides functionality for working with the Topiary dialogue system. + +```csharp +public Library() +``` + +## Methods + +### **Dispose()** + +Releases all resources used by the object. + +```csharp +public void Dispose() +``` + +### **PtrToUtf8String(IntPtr, Nullable<Int32>)** + +Converts a pointer to a null-terminated UTF8-encoded string into a C# string. + +```csharp +public static string PtrToUtf8String(IntPtr pointer, Nullable count) +``` + +#### Parameters + +`pointer` [IntPtr](https://docs.microsoft.com/en-us/dotnet/api/system.intptr)
+The pointer to the null-terminated UTF8-encoded string. + +`count` [Nullable<Int32>](https://docs.microsoft.com/en-us/dotnet/api/system.nullable-1)
+Optional: The number of bytes to read from the pointer. Use null to read until null termination. + +#### Returns + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The converted C# string. + +**Remarks:** + +Since we're targeting .net471 for unity we need to create our own ptr to utf8 it seems diff --git a/docs/peartreegames.topiary.line.md b/docs/peartreegames.topiary.line.md new file mode 100644 index 0000000..d5f3397 --- /dev/null +++ b/docs/peartreegames.topiary.line.md @@ -0,0 +1,49 @@ +# Line + +Namespace: PeartreeGames.Topiary + +Dialogue Line + +```csharp +public struct Line +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [ValueType](https://docs.microsoft.com/en-us/dotnet/api/system.valuetype) → [Line](./peartreegames.topiary.line.md) + +## Properties + +### **Speaker** + +The Speaker of the dialogue line + +```csharp +public string Speaker { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **Content** + +The words spoken + +```csharp +public string Content { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **Tags** + +Array of tags + +```csharp +public String[] Tags { get; } +``` + +#### Property Value + +[String[]](https://docs.microsoft.com/en-us/dotnet/api/system.string)
diff --git a/docs/peartreegames.topiary.macloader.md b/docs/peartreegames.topiary.macloader.md new file mode 100644 index 0000000..8d2fb07 --- /dev/null +++ b/docs/peartreegames.topiary.macloader.md @@ -0,0 +1,112 @@ +# MacLoader + +Namespace: PeartreeGames.Topiary + +Represents a loader interface for loading and interacting with libraries. + +```csharp +public class MacLoader : Microsoft.Win32.SafeHandles.SafeHandleZeroOrMinusOneIsInvalid, System.IDisposable, ILoader +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [CriticalFinalizerObject](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.constrainedexecution.criticalfinalizerobject) → [SafeHandle](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.safehandle) → [SafeHandleZeroOrMinusOneIsInvalid](https://docs.microsoft.com/en-us/dotnet/api/microsoft.win32.safehandles.safehandlezeroorminusoneisinvalid) → [MacLoader](./peartreegames.topiary.macloader.md)
+Implements [IDisposable](https://docs.microsoft.com/en-us/dotnet/api/system.idisposable), [ILoader](./peartreegames.topiary.iloader.md) + +## Properties + +### **IsInvalid** + +```csharp +public bool IsInvalid { get; } +``` + +#### Property Value + +[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+ +### **IsClosed** + +```csharp +public bool IsClosed { get; } +``` + +#### Property Value + +[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+ +## Constructors + +### **MacLoader(Boolean)** + +Represents a loader interface for loading and interacting with libraries. + +```csharp +public MacLoader(bool ownsHandle) +``` + +#### Parameters + +`ownsHandle` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+ +## Methods + +### **Load()** + +Loads the library by calling the underlying native method dlopen. + +```csharp +public SafeHandle Load() +``` + +#### Returns + +[SafeHandle](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.safehandle)
+A SafeHandle object representing the loaded library. + +### **Free(IntPtr)** + +Frees the specified library handle. + +```csharp +public bool Free(IntPtr ptr) +``` + +#### Parameters + +`ptr` [IntPtr](https://docs.microsoft.com/en-us/dotnet/api/system.intptr)
+The pointer to the library handle. + +#### Returns + +[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+`true` if the library handle is successfully freed; otherwise, `false`. + +### **GetProc(String)** + +Retrieves the address of the specified function from the loaded library. + +```csharp +public IntPtr GetProc(string name) +``` + +#### Parameters + +`name` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The name of the function to retrieve. + +#### Returns + +[IntPtr](https://docs.microsoft.com/en-us/dotnet/api/system.intptr)
+The address of the specified function if the function is found, or IntPtr.Zero if the function is not found. + +### **ReleaseHandle()** + +Releases the handle of the library. + +```csharp +protected bool ReleaseHandle() +``` + +#### Returns + +[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+`true` if the handle is successfully released; otherwise, `false`. diff --git a/docs/peartreegames.topiary.managedallocator.md b/docs/peartreegames.topiary.managedallocator.md new file mode 100644 index 0000000..7dbd1e4 --- /dev/null +++ b/docs/peartreegames.topiary.managedallocator.md @@ -0,0 +1,44 @@ +# ManagedAllocator + +Namespace: PeartreeGames.Topiary + +```csharp +public struct ManagedAllocator +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [ValueType](https://docs.microsoft.com/en-us/dotnet/api/system.valuetype) → [ManagedAllocator](./peartreegames.topiary.managedallocator.md)
+Implements [IAllocator](./peartreegames.topiary.iallocator.md) + +## Fields + +### **Global** + +```csharp +public static ManagedAllocator Global; +``` + +## Methods + +### **Allocate(UInt64)** + +```csharp +IntPtr Allocate(ulong size) +``` + +#### Parameters + +`size` [UInt64](https://docs.microsoft.com/en-us/dotnet/api/system.uint64)
+ +#### Returns + +[IntPtr](https://docs.microsoft.com/en-us/dotnet/api/system.intptr)
+ +### **Deallocate(IntPtr)** + +```csharp +void Deallocate(IntPtr ptr) +``` + +#### Parameters + +`ptr` [IntPtr](https://docs.microsoft.com/en-us/dotnet/api/system.intptr)
diff --git a/docs/peartreegames.topiary.topiattribute.md b/docs/peartreegames.topiary.topiattribute.md new file mode 100644 index 0000000..038494b --- /dev/null +++ b/docs/peartreegames.topiary.topiattribute.md @@ -0,0 +1,52 @@ +# TopiAttribute + +Namespace: PeartreeGames.Topiary + +Represents an attribute that declares a method as an extern topi function. + Can only be used on static methods. + +```csharp +public class TopiAttribute : System.Attribute +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [Attribute](https://docs.microsoft.com/en-us/dotnet/api/system.attribute) → [TopiAttribute](./peartreegames.topiary.topiattribute.md) + +## Properties + +### **Name** + +Gets or sets the name of the function in the topi file. + +```csharp +public string Name { get; private set; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **TypeId** + +```csharp +public object TypeId { get; } +``` + +#### Property Value + +[Object](https://docs.microsoft.com/en-us/dotnet/api/system.object)
+ +## Constructors + +### **TopiAttribute(String)** + +Declare the function as an extern topi function + Can only be used on static methods + +```csharp +public TopiAttribute(string name) +``` + +#### Parameters + +`name` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+Name of the function in the topi file diff --git a/docs/peartreegames.topiary.topivalue.md b/docs/peartreegames.topiary.topivalue.md new file mode 100644 index 0000000..29fec63 --- /dev/null +++ b/docs/peartreegames.topiary.topivalue.md @@ -0,0 +1,260 @@ +# TopiValue + +Namespace: PeartreeGames.Topiary + +Topiary Value container + Data is overlapped in memory so ensure correct value is used + or check tag if unknown + +```csharp +public struct TopiValue +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [ValueType](https://docs.microsoft.com/en-us/dotnet/api/system.valuetype) → [TopiValue](./peartreegames.topiary.topivalue.md)
+Implements [IDisposable](https://docs.microsoft.com/en-us/dotnet/api/system.idisposable), [IEquatable<TopiValue>](https://docs.microsoft.com/en-us/dotnet/api/system.iequatable-1) + +## Fields + +### **tag** + +```csharp +public Tag tag; +``` + +## Properties + +### **Bool** + +```csharp +public bool Bool { get; } +``` + +#### Property Value + +[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+ +### **Int** + +```csharp +public int Int { get; } +``` + +#### Property Value + +[Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
+ +### **Float** + +```csharp +public float Float { get; } +``` + +#### Property Value + +[Single](https://docs.microsoft.com/en-us/dotnet/api/system.single)
+ +### **String** + +```csharp +public string String { get; } +``` + +#### Property Value + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +### **List** + +```csharp +public TopiValue[] List { get; } +``` + +#### Property Value + +[TopiValue[]](./peartreegames.topiary.topivalue.md)
+ +### **Set** + +```csharp +public HashSet Set { get; } +``` + +#### Property Value + +[HashSet<TopiValue>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.hashset-1)
+ +### **Map** + +```csharp +public Dictionary Map { get; } +``` + +#### Property Value + +[Dictionary<TopiValue, TopiValue>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.dictionary-2)
+ +### **Value** + +```csharp +public object Value { get; } +``` + +#### Property Value + +[Object](https://docs.microsoft.com/en-us/dotnet/api/system.object)
+ +## Constructors + +### **TopiValue(Boolean)** + +```csharp +TopiValue(bool b) +``` + +#### Parameters + +`b` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+ +### **TopiValue(Int32)** + +```csharp +TopiValue(int i) +``` + +#### Parameters + +`i` [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
+ +### **TopiValue(Single)** + +```csharp +TopiValue(float i) +``` + +#### Parameters + +`i` [Single](https://docs.microsoft.com/en-us/dotnet/api/system.single)
+ +### **TopiValue(String)** + +```csharp +TopiValue(string s) +``` + +#### Parameters + +`s` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+ +## Methods + +### **FromPtr(IntPtr)** + +Converts a pointer to a TopiValue struct. + +```csharp +TopiValue FromPtr(IntPtr ptr) +``` + +#### Parameters + +`ptr` [IntPtr](https://docs.microsoft.com/en-us/dotnet/api/system.intptr)
+The pointer to the TopiValue struct. + +#### Returns + +[TopiValue](./peartreegames.topiary.topivalue.md)
+The converted TopiValue. + +### **AsType<T>()** + +Gets the value of the TopiValue as the specified type. + Will create boxing, better to use the above is value type is known + +```csharp +T AsType() +``` + +#### Type Parameters + +`T`
+The type to convert the value to. + +#### Returns + +T
+The value of the TopiValue as type T. + +**Remarks:** + +This method converts the underlying value of the TopiValue to the specified type T. + If the conversion is not possible, an InvalidCastException will be thrown. + +### **ToString()** + +Converts the TopiValue object to its string representation. + +```csharp +string ToString() +``` + +#### Returns + +[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The string representation of the TopiValue object. + +### **Dispose()** + +Releases the resources used by the TopiValue. + +```csharp +void Dispose() +``` + +### **Equals(TopiValue)** + +Determines whether the current instance is equal to the specified object. + +```csharp +bool Equals(TopiValue other) +``` + +#### Parameters + +`other` [TopiValue](./peartreegames.topiary.topivalue.md)
+The object to compare with the current instance. + +#### Returns + +[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+True if the current instance is equal to the specified object; otherwise, false. + +### **Equals(Object)** + +Determines whether the current instance is equal to another TopiValue object. + +```csharp +bool Equals(object obj) +``` + +#### Parameters + +`obj` [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object)
+The TopiValue object to compare with the current instance. + +#### Returns + +[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+true if the current instance is equal to the other object; otherwise, false. + +### **GetHashCode()** + +Gets the hash code of the TopiValue object. + +```csharp +int GetHashCode() +``` + +#### Returns + +[Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
+The hash code of the TopiValue object. diff --git a/docs/peartreegames.topiary.windowsloader.md b/docs/peartreegames.topiary.windowsloader.md new file mode 100644 index 0000000..739a731 --- /dev/null +++ b/docs/peartreegames.topiary.windowsloader.md @@ -0,0 +1,117 @@ +# WindowsLoader + +Namespace: PeartreeGames.Topiary + +Represents a loader interface for loading and interacting with libraries. + +```csharp +public class WindowsLoader : Microsoft.Win32.SafeHandles.SafeHandleZeroOrMinusOneIsInvalid, System.IDisposable, ILoader +``` + +Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [CriticalFinalizerObject](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.constrainedexecution.criticalfinalizerobject) → [SafeHandle](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.safehandle) → [SafeHandleZeroOrMinusOneIsInvalid](https://docs.microsoft.com/en-us/dotnet/api/microsoft.win32.safehandles.safehandlezeroorminusoneisinvalid) → [WindowsLoader](./peartreegames.topiary.windowsloader.md)
+Implements [IDisposable](https://docs.microsoft.com/en-us/dotnet/api/system.idisposable), [ILoader](./peartreegames.topiary.iloader.md) + +## Properties + +### **IsInvalid** + +```csharp +public bool IsInvalid { get; } +``` + +#### Property Value + +[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+ +### **IsClosed** + +```csharp +public bool IsClosed { get; } +``` + +#### Property Value + +[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+ +## Constructors + +### **WindowsLoader(Boolean)** + +Represents a loader interface for loading and interacting with libraries. + +```csharp +public WindowsLoader(bool ownsHandle) +``` + +#### Parameters + +`ownsHandle` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+ +## Methods + +### **Load()** + +Loads the library. + +```csharp +public SafeHandle Load() +``` + +#### Returns + +[SafeHandle](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.safehandle)
+The safe handle of the loaded library. + +#### Exceptions + +T:System.ComponentModel.Win32Exception
+Thrown when the library failed to load. + +### **Free(IntPtr)** + +Frees the specified library handle. + +```csharp +public bool Free(IntPtr ptr) +``` + +#### Parameters + +`ptr` [IntPtr](https://docs.microsoft.com/en-us/dotnet/api/system.intptr)
+The pointer to the library handle. + +#### Returns + +[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+`true` if the library handle is successfully freed; otherwise, `false`. + +### **GetProc(String)** + +Retrieves the address of the specified function from the loaded library. + +```csharp +public IntPtr GetProc(string name) +``` + +#### Parameters + +`name` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+The name of the function to retrieve. + +#### Returns + +[IntPtr](https://docs.microsoft.com/en-us/dotnet/api/system.intptr)
+The address of the specified function if the function is found, or IntPtr.Zero if the function is not found. + +### **ReleaseHandle()** + +Releases the handle of the library. + +```csharp +protected bool ReleaseHandle() +``` + +#### Returns + +[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+`true` if the handle is successfully released; otherwise, `false`. From 8fb9a7aaca009c1a0500b2e75169306155a353bc Mon Sep 17 00:00:00 2001 From: bgk- Date: Sat, 20 Apr 2024 21:52:06 -0700 Subject: [PATCH 4/4] Remove br tag from markdown files --- docs/peartreegames.topiary.bytecode.md | 4 +- docs/peartreegames.topiary.choice.md | 14 +-- docs/peartreegames.topiary.dialogue.md | 86 +++++++++---------- docs/peartreegames.topiary.embeddedloader.md | 4 +- docs/peartreegames.topiary.function.md | 20 ++--- docs/peartreegames.topiary.iallocator.md | 6 +- docs/peartreegames.topiary.iloader.md | 12 +-- docs/peartreegames.topiary.library.md | 16 ++-- docs/peartreegames.topiary.line.md | 6 +- docs/peartreegames.topiary.macloader.md | 20 ++--- .../peartreegames.topiary.managedallocator.md | 8 +- docs/peartreegames.topiary.topiattribute.md | 6 +- docs/peartreegames.topiary.topivalue.md | 46 +++++----- docs/peartreegames.topiary.windowsloader.md | 22 ++--- 14 files changed, 135 insertions(+), 135 deletions(-) diff --git a/docs/peartreegames.topiary.bytecode.md b/docs/peartreegames.topiary.bytecode.md index 4c3ab4f..d9188e1 100644 --- a/docs/peartreegames.topiary.bytecode.md +++ b/docs/peartreegames.topiary.bytecode.md @@ -22,10 +22,10 @@ public static SortedSet GetExterns(BinaryReader reader) #### Parameters -`reader` [BinaryReader](https://docs.microsoft.com/en-us/dotnet/api/system.io.binaryreader)
+`reader` [BinaryReader](https://docs.microsoft.com/en-us/dotnet/api/system.io.binaryreader) The binary reader from which to read the external names. #### Returns -SortedSet<String>
+SortedSet<String> A sorted set of external names. diff --git a/docs/peartreegames.topiary.choice.md b/docs/peartreegames.topiary.choice.md index 1028733..e61e70e 100644 --- a/docs/peartreegames.topiary.choice.md +++ b/docs/peartreegames.topiary.choice.md @@ -22,7 +22,7 @@ public int VisitCount { get; } #### Property Value -[Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
+[Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32) The visit count. ### **Ip** @@ -35,7 +35,7 @@ public int Ip { get; } #### Property Value -[Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
+[Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32) **Remarks:** @@ -51,7 +51,7 @@ public string Content { get; } #### Property Value -[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+[String](https://docs.microsoft.com/en-us/dotnet/api/system.string) ### **Tags** @@ -63,7 +63,7 @@ public String[] Tags { get; } #### Property Value -[String[]](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+[String[]](https://docs.microsoft.com/en-us/dotnet/api/system.string) The tags associated with the choice. **Remarks:** @@ -82,13 +82,13 @@ Choice[] MarshalPtr(IntPtr choicePtr, byte count) #### Parameters -`choicePtr` [IntPtr](https://docs.microsoft.com/en-us/dotnet/api/system.intptr)
+`choicePtr` [IntPtr](https://docs.microsoft.com/en-us/dotnet/api/system.intptr) The pointer to the array of [Choice](./peartreegames.topiary.choice.md) structures. -`count` [Byte](https://docs.microsoft.com/en-us/dotnet/api/system.byte)
+`count` [Byte](https://docs.microsoft.com/en-us/dotnet/api/system.byte) The number of [Choice](./peartreegames.topiary.choice.md) structures in the array. #### Returns -[Choice[]](./peartreegames.topiary.choice.md)
+[Choice[]](./peartreegames.topiary.choice.md) An array of [Choice](./peartreegames.topiary.choice.md) structures. diff --git a/docs/peartreegames.topiary.dialogue.md b/docs/peartreegames.topiary.dialogue.md index 7ab3cdd..50b0793 100644 --- a/docs/peartreegames.topiary.dialogue.md +++ b/docs/peartreegames.topiary.dialogue.md @@ -8,7 +8,7 @@ Represents a dialogue instance. public class Dialogue : System.IDisposable ``` -Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [Dialogue](./peartreegames.topiary.dialogue.md)
+Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [Dialogue](./peartreegames.topiary.dialogue.md) Implements [IDisposable](https://docs.microsoft.com/en-us/dotnet/api/system.idisposable) ## Properties @@ -23,7 +23,7 @@ public bool IsValid { get; } #### Property Value -[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean) **Remarks:** @@ -40,7 +40,7 @@ public Library Library { get; } #### Property Value -[Library](./peartreegames.topiary.library.md)
+[Library](./peartreegames.topiary.library.md) ### **CanContinue** @@ -52,7 +52,7 @@ public bool CanContinue { get; } #### Property Value -[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean) `true` if the dialogue can continue; otherwise, `false`. ### **IsWaiting** @@ -65,7 +65,7 @@ public bool IsWaiting { get; } #### Property Value -[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean) ## Constructors @@ -79,13 +79,13 @@ public Dialogue(Byte[] source, OnLineCallback onLine, OnChoicesCallback onChoice #### Parameters -`source` [Byte[]](https://docs.microsoft.com/en-us/dotnet/api/system.byte)
+`source` [Byte[]](https://docs.microsoft.com/en-us/dotnet/api/system.byte) -`onLine` [OnLineCallback](./peartreegames.topiary.dialogue.onlinecallback.md)
+`onLine` [OnLineCallback](./peartreegames.topiary.dialogue.onlinecallback.md) -`onChoices` [OnChoicesCallback](./peartreegames.topiary.dialogue.onchoicescallback.md)
+`onChoices` [OnChoicesCallback](./peartreegames.topiary.dialogue.onchoicescallback.md) -`severity` [Severity](./peartreegames.topiary.library.severity.md)
+`severity` [Severity](./peartreegames.topiary.library.severity.md) ## Methods @@ -109,15 +109,15 @@ public static Byte[] Compile(string fullPath, Severity severity) #### Parameters -`fullPath` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+`fullPath` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string) The file absolute path -`severity` [Severity](./peartreegames.topiary.library.severity.md)
+`severity` [Severity](./peartreegames.topiary.library.severity.md) Log severity #### Returns -[Byte[]](https://docs.microsoft.com/en-us/dotnet/api/system.byte)
+[Byte[]](https://docs.microsoft.com/en-us/dotnet/api/system.byte) Compiled bytes ### **Compile(String, Int64, Severity)** @@ -131,18 +131,18 @@ public static Byte[] Compile(string fullPath, long capacity, Severity severity) #### Parameters -`fullPath` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+`fullPath` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string) The file absolute path -`capacity` [Int64](https://docs.microsoft.com/en-us/dotnet/api/system.int64)
+`capacity` [Int64](https://docs.microsoft.com/en-us/dotnet/api/system.int64) Capacity for the bytecode output -`severity` [Severity](./peartreegames.topiary.library.severity.md)
+`severity` [Severity](./peartreegames.topiary.library.severity.md) Log severity #### Returns -[Byte[]](https://docs.microsoft.com/en-us/dotnet/api/system.byte)
+[Byte[]](https://docs.microsoft.com/en-us/dotnet/api/system.byte) Compiled bytes ### **Start(String)** @@ -155,7 +155,7 @@ public void Start(string bough) #### Parameters -`bough` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+`bough` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string) Optional: The bough path where the conversation will start. If non provided, first bough in the file will be used @@ -169,7 +169,7 @@ public void Run() #### Exceptions -[Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception)
+[Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception) ### **Continue()** @@ -189,7 +189,7 @@ public void SelectChoice(int index) #### Parameters -`index` [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
+`index` [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32) The index of the choice selected ### **SaveState()** @@ -204,7 +204,7 @@ public string SaveState() #### Returns -[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+[String](https://docs.microsoft.com/en-us/dotnet/api/system.string) ### **SaveState(Int64)** @@ -217,12 +217,12 @@ public string SaveState(long capacity) #### Parameters -`capacity` [Int64](https://docs.microsoft.com/en-us/dotnet/api/system.int64)
+`capacity` [Int64](https://docs.microsoft.com/en-us/dotnet/api/system.int64) The maximum size of bytes to allocate #### Returns -[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+[String](https://docs.microsoft.com/en-us/dotnet/api/system.string) ### **LoadState(String)** @@ -234,7 +234,7 @@ public void LoadState(string json) #### Parameters -`json` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+`json` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string) JSON string ### **GetValue(String)** @@ -247,12 +247,12 @@ public TopiValue GetValue(string name) #### Parameters -`name` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+`name` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string) The name of the variable #### Returns -[TopiValue](./peartreegames.topiary.topivalue.md)
+[TopiValue](./peartreegames.topiary.topivalue.md) TopiValue.nil if not found ### **DestroyValue(TopiValue&)** @@ -266,7 +266,7 @@ public void DestroyValue(TopiValue& value) #### Parameters -`value` [TopiValue&](./peartreegames.topiary.topivalue&.md)
+`value` [TopiValue&](./peartreegames.topiary.topivalue&.md) The value to be destroyed ### **Subscribe(String, Subscriber)** @@ -279,15 +279,15 @@ public bool Subscribe(string name, Subscriber callback) #### Parameters -`name` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+`name` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string) The name of the variable -`callback` [Subscriber](./peartreegames.topiary.delegates.subscriber.md)
+`callback` [Subscriber](./peartreegames.topiary.delegates.subscriber.md) The callback to be executed on change #### Returns -[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean) ### **Unsubscribe(String, Subscriber)** @@ -299,15 +299,15 @@ public bool Unsubscribe(string name, Subscriber callback) #### Parameters -`name` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+`name` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string) The name of the variable -`callback` [Subscriber](./peartreegames.topiary.delegates.subscriber.md)
+`callback` [Subscriber](./peartreegames.topiary.delegates.subscriber.md) The callback that was passed into Subscribe #### Returns -[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean) ### **Set(String, Boolean)** @@ -319,10 +319,10 @@ public void Set(string name, bool value) #### Parameters -`name` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+`name` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string) The name of the variable -`value` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+`value` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean) The value to set ### **Set(String, Single)** @@ -335,10 +335,10 @@ public void Set(string name, float value) #### Parameters -`name` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+`name` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string) The name of the variable -`value` [Single](https://docs.microsoft.com/en-us/dotnet/api/system.single)
+`value` [Single](https://docs.microsoft.com/en-us/dotnet/api/system.single) The value to set ### **Set(String, String)** @@ -351,10 +351,10 @@ public void Set(string name, string value) #### Parameters -`name` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+`name` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string) The name of the variable -`value` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+`value` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string) The value to set ### **Set(String, Function, Byte)** @@ -369,13 +369,13 @@ public void Set(string name, Function function, byte arity) #### Parameters -`name` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+`name` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string) The name of the variable -`function` [Function](./peartreegames.topiary.function.md)
+`function` [Function](./peartreegames.topiary.function.md) The value to set -`arity` [Byte](https://docs.microsoft.com/en-us/dotnet/api/system.byte)
+`arity` [Byte](https://docs.microsoft.com/en-us/dotnet/api/system.byte) The number of parameters the function accepts ### **Unset(String)** @@ -388,7 +388,7 @@ public void Unset(string name) #### Parameters -`name` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+`name` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string) The name of the variable ### **BindFunctions(IEnumerable<Assembly>)** @@ -404,4 +404,4 @@ public void BindFunctions(IEnumerable assemblies) #### Parameters -`assemblies` [IEnumerable<Assembly>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)
+`assemblies` [IEnumerable<Assembly>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1) diff --git a/docs/peartreegames.topiary.embeddedloader.md b/docs/peartreegames.topiary.embeddedloader.md index fac786e..05dd518 100644 --- a/docs/peartreegames.topiary.embeddedloader.md +++ b/docs/peartreegames.topiary.embeddedloader.md @@ -22,10 +22,10 @@ public static string CreateEmbeddedResource(string dllName) #### Parameters -`dllName` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+`dllName` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string) The name of the DLL. #### Returns -[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+[String](https://docs.microsoft.com/en-us/dotnet/api/system.string) The temporary file path where the embedded resource is created. diff --git a/docs/peartreegames.topiary.function.md b/docs/peartreegames.topiary.function.md index efcadde..ef580ab 100644 --- a/docs/peartreegames.topiary.function.md +++ b/docs/peartreegames.topiary.function.md @@ -8,7 +8,7 @@ Represents a function that can be called dynamically. public class Function : System.IDisposable ``` -Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [Function](./peartreegames.topiary.function.md)
+Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [Function](./peartreegames.topiary.function.md) Implements [IDisposable](https://docs.microsoft.com/en-us/dotnet/api/system.idisposable) ## Constructors @@ -21,7 +21,7 @@ public Function(Delegate del) #### Parameters -`del` [Delegate](https://docs.microsoft.com/en-us/dotnet/api/system.delegate)
+`del` [Delegate](https://docs.microsoft.com/en-us/dotnet/api/system.delegate) ## Methods @@ -35,7 +35,7 @@ public IntPtr GetCallIntPtr() #### Returns -[IntPtr](https://docs.microsoft.com/en-us/dotnet/api/system.intptr)
+[IntPtr](https://docs.microsoft.com/en-us/dotnet/api/system.intptr) The function pointer for the GetCallIntPtr method. ### **Dispose()** @@ -56,7 +56,7 @@ public string ToString() #### Returns -[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+[String](https://docs.microsoft.com/en-us/dotnet/api/system.string) A string that represents the current Function object. ### **Call(IntPtr, Byte)** @@ -69,15 +69,15 @@ public TopiValue Call(IntPtr argPtr, byte count) #### Parameters -`argPtr` [IntPtr](https://docs.microsoft.com/en-us/dotnet/api/system.intptr)
+`argPtr` [IntPtr](https://docs.microsoft.com/en-us/dotnet/api/system.intptr) A pointer to the arguments for the delegate. -`count` [Byte](https://docs.microsoft.com/en-us/dotnet/api/system.byte)
+`count` [Byte](https://docs.microsoft.com/en-us/dotnet/api/system.byte) The number of arguments. #### Returns -[TopiValue](./peartreegames.topiary.topivalue.md)
+[TopiValue](./peartreegames.topiary.topivalue.md) The result of executing the delegate. ### **Create(MethodInfo)** @@ -90,15 +90,15 @@ public static Function Create(MethodInfo method) #### Parameters -`method` [MethodInfo](https://docs.microsoft.com/en-us/dotnet/api/system.reflection.methodinfo)
+`method` [MethodInfo](https://docs.microsoft.com/en-us/dotnet/api/system.reflection.methodinfo) The [MethodInfo](https://docs.microsoft.com/en-us/dotnet/api/system.reflection.methodinfo) representing the method. #### Returns -[Function](./peartreegames.topiary.function.md)
+[Function](./peartreegames.topiary.function.md) A new instance of [Function](./peartreegames.topiary.function.md) created from the method. #### Exceptions -[NotSupportedException](https://docs.microsoft.com/en-us/dotnet/api/system.notsupportedexception)
+[NotSupportedException](https://docs.microsoft.com/en-us/dotnet/api/system.notsupportedexception) Thrown when the number of parameters is not supported. diff --git a/docs/peartreegames.topiary.iallocator.md b/docs/peartreegames.topiary.iallocator.md index ec761da..72fb7d6 100644 --- a/docs/peartreegames.topiary.iallocator.md +++ b/docs/peartreegames.topiary.iallocator.md @@ -16,11 +16,11 @@ IntPtr Allocate(ulong size) #### Parameters -`size` [UInt64](https://docs.microsoft.com/en-us/dotnet/api/system.uint64)
+`size` [UInt64](https://docs.microsoft.com/en-us/dotnet/api/system.uint64) #### Returns -[IntPtr](https://docs.microsoft.com/en-us/dotnet/api/system.intptr)
+[IntPtr](https://docs.microsoft.com/en-us/dotnet/api/system.intptr) ### **Deallocate(IntPtr)** @@ -30,4 +30,4 @@ void Deallocate(IntPtr ptr) #### Parameters -`ptr` [IntPtr](https://docs.microsoft.com/en-us/dotnet/api/system.intptr)
+`ptr` [IntPtr](https://docs.microsoft.com/en-us/dotnet/api/system.intptr) diff --git a/docs/peartreegames.topiary.iloader.md b/docs/peartreegames.topiary.iloader.md index 471219d..cf05c53 100644 --- a/docs/peartreegames.topiary.iloader.md +++ b/docs/peartreegames.topiary.iloader.md @@ -20,12 +20,12 @@ SafeHandle Load() #### Returns -[SafeHandle](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.safehandle)
+[SafeHandle](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.safehandle) A [SafeHandle](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.safehandle) representing the loaded library. #### Exceptions -T:System.ComponentModel.Win32Exception
+T:System.ComponentModel.Win32Exception Thrown if the library failed to load. ### **Free(IntPtr)** @@ -38,12 +38,12 @@ bool Free(IntPtr ptr) #### Parameters -`ptr` [IntPtr](https://docs.microsoft.com/en-us/dotnet/api/system.intptr)
+`ptr` [IntPtr](https://docs.microsoft.com/en-us/dotnet/api/system.intptr) The pointer to the library handle. #### Returns -[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean) `true` if the library handle is successfully freed; otherwise, `false`. ### **GetProc(String)** @@ -56,10 +56,10 @@ IntPtr GetProc(string name) #### Parameters -`name` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+`name` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string) The name of the function to retrieve. #### Returns -[IntPtr](https://docs.microsoft.com/en-us/dotnet/api/system.intptr)
+[IntPtr](https://docs.microsoft.com/en-us/dotnet/api/system.intptr) The address of the specified function if the function is found, or IntPtr.Zero if the function is not found. diff --git a/docs/peartreegames.topiary.library.md b/docs/peartreegames.topiary.library.md index c43fd47..7a3ddb2 100644 --- a/docs/peartreegames.topiary.library.md +++ b/docs/peartreegames.topiary.library.md @@ -8,7 +8,7 @@ Represents a library of functions and utilities for working with dialogue system public class Library : System.IDisposable ``` -Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [Library](./peartreegames.topiary.library.md)
+Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [Library](./peartreegames.topiary.library.md) Implements [IDisposable](https://docs.microsoft.com/en-us/dotnet/api/system.idisposable) ## Fields @@ -183,7 +183,7 @@ public static int Count { get; } #### Property Value -[Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
+[Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32) The count. ### **Global** @@ -196,7 +196,7 @@ public static Library Global { get; } #### Property Value -[Library](./peartreegames.topiary.library.md)
+[Library](./peartreegames.topiary.library.md) ### **IsUnityRuntime** @@ -208,7 +208,7 @@ public static bool IsUnityRuntime { get; set; } #### Property Value -[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean) ### **Allocator** @@ -220,7 +220,7 @@ public static IAllocator Allocator { get; set; } #### Property Value -[IAllocator](./peartreegames.topiary.iallocator.md)
+[IAllocator](./peartreegames.topiary.iallocator.md) ## Constructors @@ -252,15 +252,15 @@ public static string PtrToUtf8String(IntPtr pointer, Nullable count) #### Parameters -`pointer` [IntPtr](https://docs.microsoft.com/en-us/dotnet/api/system.intptr)
+`pointer` [IntPtr](https://docs.microsoft.com/en-us/dotnet/api/system.intptr) The pointer to the null-terminated UTF8-encoded string. -`count` [Nullable<Int32>](https://docs.microsoft.com/en-us/dotnet/api/system.nullable-1)
+`count` [Nullable<Int32>](https://docs.microsoft.com/en-us/dotnet/api/system.nullable-1) Optional: The number of bytes to read from the pointer. Use null to read until null termination. #### Returns -[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+[String](https://docs.microsoft.com/en-us/dotnet/api/system.string) The converted C# string. **Remarks:** diff --git a/docs/peartreegames.topiary.line.md b/docs/peartreegames.topiary.line.md index d5f3397..18ea588 100644 --- a/docs/peartreegames.topiary.line.md +++ b/docs/peartreegames.topiary.line.md @@ -22,7 +22,7 @@ public string Speaker { get; } #### Property Value -[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+[String](https://docs.microsoft.com/en-us/dotnet/api/system.string) ### **Content** @@ -34,7 +34,7 @@ public string Content { get; } #### Property Value -[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+[String](https://docs.microsoft.com/en-us/dotnet/api/system.string) ### **Tags** @@ -46,4 +46,4 @@ public String[] Tags { get; } #### Property Value -[String[]](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+[String[]](https://docs.microsoft.com/en-us/dotnet/api/system.string) diff --git a/docs/peartreegames.topiary.macloader.md b/docs/peartreegames.topiary.macloader.md index 8d2fb07..04f44bd 100644 --- a/docs/peartreegames.topiary.macloader.md +++ b/docs/peartreegames.topiary.macloader.md @@ -8,7 +8,7 @@ Represents a loader interface for loading and interacting with libraries. public class MacLoader : Microsoft.Win32.SafeHandles.SafeHandleZeroOrMinusOneIsInvalid, System.IDisposable, ILoader ``` -Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [CriticalFinalizerObject](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.constrainedexecution.criticalfinalizerobject) → [SafeHandle](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.safehandle) → [SafeHandleZeroOrMinusOneIsInvalid](https://docs.microsoft.com/en-us/dotnet/api/microsoft.win32.safehandles.safehandlezeroorminusoneisinvalid) → [MacLoader](./peartreegames.topiary.macloader.md)
+Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [CriticalFinalizerObject](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.constrainedexecution.criticalfinalizerobject) → [SafeHandle](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.safehandle) → [SafeHandleZeroOrMinusOneIsInvalid](https://docs.microsoft.com/en-us/dotnet/api/microsoft.win32.safehandles.safehandlezeroorminusoneisinvalid) → [MacLoader](./peartreegames.topiary.macloader.md) Implements [IDisposable](https://docs.microsoft.com/en-us/dotnet/api/system.idisposable), [ILoader](./peartreegames.topiary.iloader.md) ## Properties @@ -21,7 +21,7 @@ public bool IsInvalid { get; } #### Property Value -[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean) ### **IsClosed** @@ -31,7 +31,7 @@ public bool IsClosed { get; } #### Property Value -[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean) ## Constructors @@ -45,7 +45,7 @@ public MacLoader(bool ownsHandle) #### Parameters -`ownsHandle` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+`ownsHandle` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean) ## Methods @@ -59,7 +59,7 @@ public SafeHandle Load() #### Returns -[SafeHandle](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.safehandle)
+[SafeHandle](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.safehandle) A SafeHandle object representing the loaded library. ### **Free(IntPtr)** @@ -72,12 +72,12 @@ public bool Free(IntPtr ptr) #### Parameters -`ptr` [IntPtr](https://docs.microsoft.com/en-us/dotnet/api/system.intptr)
+`ptr` [IntPtr](https://docs.microsoft.com/en-us/dotnet/api/system.intptr) The pointer to the library handle. #### Returns -[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean) `true` if the library handle is successfully freed; otherwise, `false`. ### **GetProc(String)** @@ -90,12 +90,12 @@ public IntPtr GetProc(string name) #### Parameters -`name` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+`name` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string) The name of the function to retrieve. #### Returns -[IntPtr](https://docs.microsoft.com/en-us/dotnet/api/system.intptr)
+[IntPtr](https://docs.microsoft.com/en-us/dotnet/api/system.intptr) The address of the specified function if the function is found, or IntPtr.Zero if the function is not found. ### **ReleaseHandle()** @@ -108,5 +108,5 @@ protected bool ReleaseHandle() #### Returns -[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean) `true` if the handle is successfully released; otherwise, `false`. diff --git a/docs/peartreegames.topiary.managedallocator.md b/docs/peartreegames.topiary.managedallocator.md index 7dbd1e4..3c01899 100644 --- a/docs/peartreegames.topiary.managedallocator.md +++ b/docs/peartreegames.topiary.managedallocator.md @@ -6,7 +6,7 @@ Namespace: PeartreeGames.Topiary public struct ManagedAllocator ``` -Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [ValueType](https://docs.microsoft.com/en-us/dotnet/api/system.valuetype) → [ManagedAllocator](./peartreegames.topiary.managedallocator.md)
+Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [ValueType](https://docs.microsoft.com/en-us/dotnet/api/system.valuetype) → [ManagedAllocator](./peartreegames.topiary.managedallocator.md) Implements [IAllocator](./peartreegames.topiary.iallocator.md) ## Fields @@ -27,11 +27,11 @@ IntPtr Allocate(ulong size) #### Parameters -`size` [UInt64](https://docs.microsoft.com/en-us/dotnet/api/system.uint64)
+`size` [UInt64](https://docs.microsoft.com/en-us/dotnet/api/system.uint64) #### Returns -[IntPtr](https://docs.microsoft.com/en-us/dotnet/api/system.intptr)
+[IntPtr](https://docs.microsoft.com/en-us/dotnet/api/system.intptr) ### **Deallocate(IntPtr)** @@ -41,4 +41,4 @@ void Deallocate(IntPtr ptr) #### Parameters -`ptr` [IntPtr](https://docs.microsoft.com/en-us/dotnet/api/system.intptr)
+`ptr` [IntPtr](https://docs.microsoft.com/en-us/dotnet/api/system.intptr) diff --git a/docs/peartreegames.topiary.topiattribute.md b/docs/peartreegames.topiary.topiattribute.md index 038494b..d649522 100644 --- a/docs/peartreegames.topiary.topiattribute.md +++ b/docs/peartreegames.topiary.topiattribute.md @@ -23,7 +23,7 @@ public string Name { get; private set; } #### Property Value -[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+[String](https://docs.microsoft.com/en-us/dotnet/api/system.string) ### **TypeId** @@ -33,7 +33,7 @@ public object TypeId { get; } #### Property Value -[Object](https://docs.microsoft.com/en-us/dotnet/api/system.object)
+[Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) ## Constructors @@ -48,5 +48,5 @@ public TopiAttribute(string name) #### Parameters -`name` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+`name` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string) Name of the function in the topi file diff --git a/docs/peartreegames.topiary.topivalue.md b/docs/peartreegames.topiary.topivalue.md index 29fec63..283124d 100644 --- a/docs/peartreegames.topiary.topivalue.md +++ b/docs/peartreegames.topiary.topivalue.md @@ -10,7 +10,7 @@ Topiary Value container public struct TopiValue ``` -Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [ValueType](https://docs.microsoft.com/en-us/dotnet/api/system.valuetype) → [TopiValue](./peartreegames.topiary.topivalue.md)
+Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [ValueType](https://docs.microsoft.com/en-us/dotnet/api/system.valuetype) → [TopiValue](./peartreegames.topiary.topivalue.md) Implements [IDisposable](https://docs.microsoft.com/en-us/dotnet/api/system.idisposable), [IEquatable<TopiValue>](https://docs.microsoft.com/en-us/dotnet/api/system.iequatable-1) ## Fields @@ -31,7 +31,7 @@ public bool Bool { get; } #### Property Value -[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean) ### **Int** @@ -41,7 +41,7 @@ public int Int { get; } #### Property Value -[Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
+[Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32) ### **Float** @@ -51,7 +51,7 @@ public float Float { get; } #### Property Value -[Single](https://docs.microsoft.com/en-us/dotnet/api/system.single)
+[Single](https://docs.microsoft.com/en-us/dotnet/api/system.single) ### **String** @@ -61,7 +61,7 @@ public string String { get; } #### Property Value -[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+[String](https://docs.microsoft.com/en-us/dotnet/api/system.string) ### **List** @@ -71,7 +71,7 @@ public TopiValue[] List { get; } #### Property Value -[TopiValue[]](./peartreegames.topiary.topivalue.md)
+[TopiValue[]](./peartreegames.topiary.topivalue.md) ### **Set** @@ -81,7 +81,7 @@ public HashSet Set { get; } #### Property Value -[HashSet<TopiValue>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.hashset-1)
+[HashSet<TopiValue>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.hashset-1) ### **Map** @@ -91,7 +91,7 @@ public Dictionary Map { get; } #### Property Value -[Dictionary<TopiValue, TopiValue>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.dictionary-2)
+[Dictionary<TopiValue, TopiValue>](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.dictionary-2) ### **Value** @@ -101,7 +101,7 @@ public object Value { get; } #### Property Value -[Object](https://docs.microsoft.com/en-us/dotnet/api/system.object)
+[Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) ## Constructors @@ -113,7 +113,7 @@ TopiValue(bool b) #### Parameters -`b` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+`b` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean) ### **TopiValue(Int32)** @@ -123,7 +123,7 @@ TopiValue(int i) #### Parameters -`i` [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
+`i` [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32) ### **TopiValue(Single)** @@ -133,7 +133,7 @@ TopiValue(float i) #### Parameters -`i` [Single](https://docs.microsoft.com/en-us/dotnet/api/system.single)
+`i` [Single](https://docs.microsoft.com/en-us/dotnet/api/system.single) ### **TopiValue(String)** @@ -143,7 +143,7 @@ TopiValue(string s) #### Parameters -`s` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+`s` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string) ## Methods @@ -157,12 +157,12 @@ TopiValue FromPtr(IntPtr ptr) #### Parameters -`ptr` [IntPtr](https://docs.microsoft.com/en-us/dotnet/api/system.intptr)
+`ptr` [IntPtr](https://docs.microsoft.com/en-us/dotnet/api/system.intptr) The pointer to the TopiValue struct. #### Returns -[TopiValue](./peartreegames.topiary.topivalue.md)
+[TopiValue](./peartreegames.topiary.topivalue.md) The converted TopiValue. ### **AsType<T>()** @@ -176,12 +176,12 @@ T AsType() #### Type Parameters -`T`
+`T` The type to convert the value to. #### Returns -T
+T The value of the TopiValue as type T. **Remarks:** @@ -199,7 +199,7 @@ string ToString() #### Returns -[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+[String](https://docs.microsoft.com/en-us/dotnet/api/system.string) The string representation of the TopiValue object. ### **Dispose()** @@ -220,12 +220,12 @@ bool Equals(TopiValue other) #### Parameters -`other` [TopiValue](./peartreegames.topiary.topivalue.md)
+`other` [TopiValue](./peartreegames.topiary.topivalue.md) The object to compare with the current instance. #### Returns -[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean) True if the current instance is equal to the specified object; otherwise, false. ### **Equals(Object)** @@ -238,12 +238,12 @@ bool Equals(object obj) #### Parameters -`obj` [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object)
+`obj` [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) The TopiValue object to compare with the current instance. #### Returns -[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean) true if the current instance is equal to the other object; otherwise, false. ### **GetHashCode()** @@ -256,5 +256,5 @@ int GetHashCode() #### Returns -[Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
+[Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32) The hash code of the TopiValue object. diff --git a/docs/peartreegames.topiary.windowsloader.md b/docs/peartreegames.topiary.windowsloader.md index 739a731..a645de4 100644 --- a/docs/peartreegames.topiary.windowsloader.md +++ b/docs/peartreegames.topiary.windowsloader.md @@ -8,7 +8,7 @@ Represents a loader interface for loading and interacting with libraries. public class WindowsLoader : Microsoft.Win32.SafeHandles.SafeHandleZeroOrMinusOneIsInvalid, System.IDisposable, ILoader ``` -Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [CriticalFinalizerObject](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.constrainedexecution.criticalfinalizerobject) → [SafeHandle](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.safehandle) → [SafeHandleZeroOrMinusOneIsInvalid](https://docs.microsoft.com/en-us/dotnet/api/microsoft.win32.safehandles.safehandlezeroorminusoneisinvalid) → [WindowsLoader](./peartreegames.topiary.windowsloader.md)
+Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [CriticalFinalizerObject](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.constrainedexecution.criticalfinalizerobject) → [SafeHandle](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.safehandle) → [SafeHandleZeroOrMinusOneIsInvalid](https://docs.microsoft.com/en-us/dotnet/api/microsoft.win32.safehandles.safehandlezeroorminusoneisinvalid) → [WindowsLoader](./peartreegames.topiary.windowsloader.md) Implements [IDisposable](https://docs.microsoft.com/en-us/dotnet/api/system.idisposable), [ILoader](./peartreegames.topiary.iloader.md) ## Properties @@ -21,7 +21,7 @@ public bool IsInvalid { get; } #### Property Value -[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean) ### **IsClosed** @@ -31,7 +31,7 @@ public bool IsClosed { get; } #### Property Value -[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean) ## Constructors @@ -45,7 +45,7 @@ public WindowsLoader(bool ownsHandle) #### Parameters -`ownsHandle` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+`ownsHandle` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean) ## Methods @@ -59,12 +59,12 @@ public SafeHandle Load() #### Returns -[SafeHandle](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.safehandle)
+[SafeHandle](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.safehandle) The safe handle of the loaded library. #### Exceptions -T:System.ComponentModel.Win32Exception
+T:System.ComponentModel.Win32Exception Thrown when the library failed to load. ### **Free(IntPtr)** @@ -77,12 +77,12 @@ public bool Free(IntPtr ptr) #### Parameters -`ptr` [IntPtr](https://docs.microsoft.com/en-us/dotnet/api/system.intptr)
+`ptr` [IntPtr](https://docs.microsoft.com/en-us/dotnet/api/system.intptr) The pointer to the library handle. #### Returns -[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean) `true` if the library handle is successfully freed; otherwise, `false`. ### **GetProc(String)** @@ -95,12 +95,12 @@ public IntPtr GetProc(string name) #### Parameters -`name` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
+`name` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string) The name of the function to retrieve. #### Returns -[IntPtr](https://docs.microsoft.com/en-us/dotnet/api/system.intptr)
+[IntPtr](https://docs.microsoft.com/en-us/dotnet/api/system.intptr) The address of the specified function if the function is found, or IntPtr.Zero if the function is not found. ### **ReleaseHandle()** @@ -113,5 +113,5 @@ protected bool ReleaseHandle() #### Returns -[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
+[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean) `true` if the handle is successfully released; otherwise, `false`.