Show / Hide Table of Contents

Class Layout<TRoom, TConfiguration>

Inheritance
System.Object
Layout<TRoom, TConfiguration>
Implements
ILayout<RoomNode<TRoom>, TConfiguration>
ISmartCloneable<Layout<TRoom, TConfiguration>>
Namespace: Edgar.GraphBasedGenerator.Common
Assembly: Edgar.dll
Syntax
public class Layout<TRoom, TConfiguration> : Object, ILayout<RoomNode<TRoom>, TConfiguration>, ISmartCloneable<Layout<TRoom, TConfiguration>> where TConfiguration : ISmartCloneable<TConfiguration>
Type Parameters
Name Description
TRoom
TConfiguration

Constructors

Layout(IGraph<RoomNode<TRoom>>)

Construct a layout with a given graph and no configurations.

Declaration
public Layout(IGraph<RoomNode<TRoom>> graph)
Parameters
Type Name Description
IGraph<RoomNode<TRoom>> graph

Properties

Graph

Declaration
public IGraph<RoomNode<TRoom>> Graph { get; }
Property Value
Type Description
IGraph<RoomNode<TRoom>>

Methods

GetAllConfigurations()

Gets all configurations.

Declaration
public IEnumerable<TConfiguration> GetAllConfigurations()
Returns
Type Description
System.Collections.Generic.IEnumerable<TConfiguration>

GetConfiguration(RoomNode<TRoom>, out TConfiguration)

Gets the configuration of a given node.

Declaration
public bool GetConfiguration(RoomNode<TRoom> node, out TConfiguration configuration)
Parameters
Type Name Description
RoomNode<TRoom> node
TConfiguration configuration
Returns
Type Description
System.Boolean

True if a given node has already a configuration.

RemoveConfiguration(RoomNode<TRoom>)

Removes configuration of a given node.

Declaration
public void RemoveConfiguration(RoomNode<TRoom> node)
Parameters
Type Name Description
RoomNode<TRoom> node

SetConfiguration(RoomNode<TRoom>, TConfiguration)

Sets a configurations of a given node.

Declaration
public void SetConfiguration(RoomNode<TRoom> node, TConfiguration configuration)
Parameters
Type Name Description
RoomNode<TRoom> node
TConfiguration configuration

SmartClone()

Smart clones all configurations. Graph is not smart cloned.

Declaration
public Layout<TRoom, TConfiguration> SmartClone()
Returns
Type Description
Layout<TRoom, TConfiguration>
Remarks

May not deep clone everything if it does not make sense in a given context.

Implements

ILayout<TNode, TConfiguration>
ISmartCloneable<T>
Back to top Generated by DocFX