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
{
///
/// A list with custom node types.
///
public IReadOnlyList NodeTypes { get; set; }
///
/// An instance of a serializer which can process the custom node types.
///
public ICustomNodeSerializer Serializer { get; set; }
///
/// An instance of a code generator which can process the custom node types.
///
public CustomCppCodeGenerator CodeGenerator { get; set; }
}
///
/// The icon of the plugin.
///
public virtual Image Icon => null;
public virtual bool Initialize(IPluginHost host)
{
Contract.Requires(host != null);
return true;
}
public virtual void Terminate()
{
}
///
/// Gets called once to receive all node info readers the plugin provides.
///
/// A list with node info readers or null if the plugin provides none.
public virtual IReadOnlyList GetNodeInfoReaders()
{
return null;
}
///
/// Gets called once to receive all custom node types the plugin provides.
///
/// Informations about the custom nodes or null if the plugin provides none.
public virtual CustomNodeTypes GetCustomNodeTypes()
{
return null;
}
}
}