C# Класс Smrf.NodeXL.Adapters.GraphAdapterBase

Base class for graph adapters.
This abstract class can serve as a base class for implementations. Its implementations of the public methods provide error checking but defer the actual work to protected abstract methods.
Наследование: AdapterBase, IGraphAdapter
Показать файл Открыть проект

Открытые методы

Метод Описание
AssertValid ( ) : void
GraphAdapterBase ( ) : System

Initializes a new instance of the GraphAdapterBase class.

LoadGraphFromFile ( String filename ) : IGraph
LoadGraphFromStream ( Stream stream ) : IGraph
LoadGraphFromString ( String theString ) : IGraph
SaveGraph ( IGraph graph, Stream stream ) : void
SaveGraph ( IGraph graph, String filename ) : void
SupportsDirectedness ( GraphDirectedness directedness ) : System.Boolean

Защищенные методы

Метод Описание
CheckGraphDirectedness ( IGraph graph, System.Boolean loading ) : void
GetAttributeNames ( IGraph graph, System.Boolean forVertices ) : String[]
GetSupportedDirectedness ( System.Boolean &supportsDirected, System.Boolean &supportsUndirected, System.Boolean &supportsMixed ) : void
LoadGraphCore ( Stream stream ) : IGraph
OnLoadFormatError ( String completeErrorMessage ) : void
OnLoadFormatError ( String line, Int32 lineNumber, String expectedFormat ) : void
OnLoadFormatError2 ( String line, Int32 lineNumber, String errorDetails ) : void
OnSaveError ( String errorMessage ) : void
SaveGraphCore ( IGraph graph, Stream stream ) : void
TryReadLine ( StreamReader streamReader, String &line, Int32 &lineNumber ) : System.Boolean
VertexCountToString ( Int32 vertices ) : String

Описание методов

AssertValid() публичный Метод

public AssertValid ( ) : void
Результат void

CheckGraphDirectedness() защищенный Метод

protected CheckGraphDirectedness ( IGraph graph, System.Boolean loading ) : void
graph IGraph
loading System.Boolean
Результат void

GetAttributeNames() защищенный Метод

protected GetAttributeNames ( IGraph graph, System.Boolean forVertices ) : String[]
graph IGraph
forVertices System.Boolean
Результат String[]

GetSupportedDirectedness() защищенный абстрактный Метод

protected abstract GetSupportedDirectedness ( System.Boolean &supportsDirected, System.Boolean &supportsUndirected, System.Boolean &supportsMixed ) : void
supportsDirected System.Boolean
supportsUndirected System.Boolean
supportsMixed System.Boolean
Результат void

GraphAdapterBase() публичный Метод

Initializes a new instance of the GraphAdapterBase class.
public GraphAdapterBase ( ) : System
Результат System

LoadGraphCore() защищенный абстрактный Метод

protected abstract LoadGraphCore ( Stream stream ) : IGraph
stream Stream
Результат IGraph

LoadGraphFromFile() публичный Метод

public LoadGraphFromFile ( String filename ) : IGraph
filename String
Результат IGraph

LoadGraphFromStream() публичный Метод

public LoadGraphFromStream ( Stream stream ) : IGraph
stream Stream
Результат IGraph

LoadGraphFromString() публичный Метод

public LoadGraphFromString ( String theString ) : IGraph
theString String
Результат IGraph

OnLoadFormatError() защищенный Метод

protected OnLoadFormatError ( String completeErrorMessage ) : void
completeErrorMessage String
Результат void

OnLoadFormatError() защищенный Метод

protected OnLoadFormatError ( String line, Int32 lineNumber, String expectedFormat ) : void
line String
lineNumber System.Int32
expectedFormat String
Результат void

OnLoadFormatError2() защищенный Метод

protected OnLoadFormatError2 ( String line, Int32 lineNumber, String errorDetails ) : void
line String
lineNumber System.Int32
errorDetails String
Результат void

OnSaveError() защищенный Метод

protected OnSaveError ( String errorMessage ) : void
errorMessage String
Результат void

SaveGraph() публичный Метод

public SaveGraph ( IGraph graph, Stream stream ) : void
graph IGraph
stream Stream
Результат void

SaveGraph() публичный Метод

public SaveGraph ( IGraph graph, String filename ) : void
graph IGraph
filename String
Результат void

SaveGraphCore() защищенный абстрактный Метод

protected abstract SaveGraphCore ( IGraph graph, Stream stream ) : void
graph IGraph
stream Stream
Результат void

SupportsDirectedness() публичный Метод

public SupportsDirectedness ( GraphDirectedness directedness ) : System.Boolean
directedness GraphDirectedness
Результат System.Boolean

TryReadLine() защищенный Метод

protected TryReadLine ( StreamReader streamReader, String &line, Int32 &lineNumber ) : System.Boolean
streamReader System.IO.StreamReader
line String
lineNumber System.Int32
Результат System.Boolean

VertexCountToString() защищенный Метод

protected VertexCountToString ( Int32 vertices ) : String
vertices System.Int32
Результат String