NanoByte Structure Editor
Public Member Functions | List of all members
NanoByte.StructureEditor.IContainerDescription< TContainer > Interface Template Reference

Describes an object that contains nodes (properties and/or lists). Provides information about how to edit this content. More...

Inheritance diagram for NanoByte.StructureEditor.IContainerDescription< TContainer >:
NanoByte.StructureEditor.ContainerDescription< TContainer >

Public Member Functions

IContainerDescription< TContainer > AddProperty< TProperty, TEditor > (string name, Func< TContainer, PropertyPointer< TProperty >> getPointer, TEditor editor)
 Adds a property to the description. More...
 
IListDescription< TContainer, TList > AddList< TList > (Func< TContainer, IList< TList >> getList)
 Adds a list to the description. More...
 
IContainerDescription< TContainer > AddPlainList< TElement, TEditor > (string name, Func< TContainer, IList< TElement >> getList, TEditor editor)
 Adds a list with only one type of element to the description. More...
 
IEnumerable< NodeGetNodesIn (TContainer container)
 Returns information about nodes found in a specific instance of TContainer . More...
 
IEnumerable< NodeCandidateGetCandidatesFor (TContainer container)
 Returns information about possible new child nodes for a specific instance of TContainer . More...
 

Detailed Description

Describes an object that contains nodes (properties and/or lists). Provides information about how to edit this content.

Template Parameters
TContainerThe type of the container to be described.
Type Constraints
TContainer :class 

Member Function Documentation

◆ AddList< TList >()

IListDescription<TContainer, TList> NanoByte.StructureEditor.IContainerDescription< TContainer >.AddList< TList > ( Func< TContainer, IList< TList >>  getList)

Adds a list to the description.

Template Parameters
TListThe type of elements in the list.
Parameters
getListA function to retrieve the list from the container.
Returns
A list description, enabling you to specify explicit sub-types of TList allowed in the list.

Implemented in NanoByte.StructureEditor.ContainerDescription< TContainer >.

Type Constraints
TList :class 

◆ AddPlainList< TElement, TEditor >()

IContainerDescription<TContainer> NanoByte.StructureEditor.IContainerDescription< TContainer >.AddPlainList< TElement, TEditor > ( string  name,
Func< TContainer, IList< TElement >>  getList,
TEditor  editor 
)

Adds a list with only one type of element to the description.

Template Parameters
TElementThe type of elements in the list.
TEditorAn editor for modifying this type of element.
Parameters
nameThe name of the element type.
getListA function to retrieve the list from the container.
editorDummy element used for type inference of TEditor .
Returns
The "this" pointer for use in a "Fluent API" style.

Implemented in NanoByte.StructureEditor.ContainerDescription< TContainer >.

Type Constraints
TElement :class 
TElement :IEquatable<TElement> 
TElement :new() 
TEditor :INodeEditor<TElement> 
TEditor :new() 

◆ AddProperty< TProperty, TEditor >()

IContainerDescription<TContainer> NanoByte.StructureEditor.IContainerDescription< TContainer >.AddProperty< TProperty, TEditor > ( string  name,
Func< TContainer, PropertyPointer< TProperty >>  getPointer,
TEditor  editor 
)

Adds a property to the description.

Template Parameters
TPropertyThe type of the property.
TEditorAn editor for modifying the content of the property.
Parameters
nameThe name of the property.
getPointerA function to retrieve a pointer to property in the container.
editorDummy element used for type inference of TEditor .
Returns
The "this" pointer for use in a "Fluent API" style.

Implemented in NanoByte.StructureEditor.ContainerDescription< TContainer >.

Type Constraints
TProperty :class 
TProperty :IEquatable<TProperty> 
TProperty :new() 
TEditor :INodeEditor<TProperty> 
TEditor :new() 

◆ GetCandidatesFor()

IEnumerable<NodeCandidate> NanoByte.StructureEditor.IContainerDescription< TContainer >.GetCandidatesFor ( TContainer  container)

Returns information about possible new child nodes for a specific instance of TContainer .

Parameters
containerThe container instance to look at.

Implemented in NanoByte.StructureEditor.ContainerDescription< TContainer >.

◆ GetNodesIn()

IEnumerable<Node> NanoByte.StructureEditor.IContainerDescription< TContainer >.GetNodesIn ( TContainer  container)

Returns information about nodes found in a specific instance of TContainer .

Parameters
containerThe container instance to look in to.

Implemented in NanoByte.StructureEditor.ContainerDescription< TContainer >.


The documentation for this interface was generated from the following file: