-
Notifications
You must be signed in to change notification settings - Fork 396
Expand file tree
/
Copy pathPlugin.cs
More file actions
66 lines (56 loc) · 1.59 KB
/
Plugin.cs
File metadata and controls
66 lines (56 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
using System;
using System.Collections.Generic;
using System.Diagnostics.Contracts;
using System.Drawing;
using ReClassNET.CodeGenerator;
using ReClassNET.DataExchange.ReClass;
using ReClassNET.Nodes;
namespace ReClassNET.Plugins
{
public class Plugin
{
public class CustomNodeTypes
{
/// <summary>
/// A list with custom node types.
/// </summary>
public IReadOnlyList<Type> NodeTypes { get; set; }
/// <summary>
/// An instance of a serializer which can process the custom node types.
/// </summary>
public ICustomNodeSerializer Serializer { get; set; }
/// <summary>
/// An instance of a code generator which can process the custom node types.
/// </summary>
public CustomCppCodeGenerator CodeGenerator { get; set; }
}
/// <summary>
/// The icon of the plugin.
/// </summary>
public virtual Image Icon => null;
public virtual bool Initialize(IPluginHost host)
{
Contract.Requires(host != null);
return true;
}
public virtual void Terminate()
{
}
/// <summary>
/// Gets called once to receive all node info readers the plugin provides.
/// </summary>
/// <returns>A list with node info readers or <c>null</c> if the plugin provides none.</returns>
public virtual IReadOnlyList<INodeInfoReader> GetNodeInfoReaders()
{
return null;
}
/// <summary>
/// Gets called once to receive all custom node types the plugin provides.
/// </summary>
/// <returns>Informations about the custom nodes or <c>null</c> if the plugin provides none.</returns>
public virtual CustomNodeTypes GetCustomNodeTypes()
{
return null;
}
}
}