C# 클래스 ABB.SrcML.SrcMLGenerator

The SrcML Generator class provides a convenient wrapper for multiple src2srcml runners, each targetted at a different language.
상속: ABB.SrcML.AbstractGenerator
파일 보기 프로젝트 열기: abb-iss/SrcML.NET 1 사용 예제들

공개 메소드들

메소드 설명
GenerateSrcMLFileFromDirectory ( string directoryPath, string xmlFileName ) : ABB.SrcML.SrcMLFile

Generate a SrcML document from the given path and place it in the XML file.

GenerateSrcMLFileFromDirectory ( string directoryPath, string xmlFileName, IEnumerable filesToExclude ) : ABB.SrcML.SrcMLFile

Generates a SrcML document from the given path and place it in the XML file. The XML document will only contain files not present in filesToExclude.

GenerateSrcMLFileFromDirectory ( string directoryPath, string xmlFileName, IEnumerable filesToExclude, System.Language languageFilter ) : ABB.SrcML.SrcMLFile
GenerateSrcMLFileFromDirectory ( string directoryPath, string xmlFileName, System.Language languageFilter ) : ABB.SrcML.SrcMLFile

Generate a SrcML document from the given path and place it in the XML file. The file will only contain source files classified as languageFilter.

GenerateSrcMLFileFromFiles ( IEnumerable sourceFileNames, string xmlFileName ) : ABB.SrcML.SrcMLFile

Generates a SrcML document from a collection of source files. The language(s) will be inferred from the file extensions.

GenerateSrcMLFromDirectory ( string directoryPath, string xmlFileName ) : void
GenerateSrcMLFromDirectory ( string directoryPath, string xmlFileName, IEnumerable filesToExclude ) : void
GenerateSrcMLFromDirectory ( string directoryPath, string xmlFileName, IEnumerable filesToExclude, System.Language languageFilter ) : void

Generate a SrcML document from the given path and place it in the XML file. The file will only contain source files classified as languageFilter.

GenerateSrcMLFromDirectory ( string directoryPath, string xmlFileName, System.Language languageFilter ) : void
GenerateSrcMLFromFile ( string sourceFileName, string xmlFileName ) : void

Generate a SrcML document from a single source file. The language will be inferred from the extension.

GenerateSrcMLFromFile ( string sourceFileName, string xmlFileName, System.Language language ) : void

Generate a SrcML document from a single source file.

GenerateSrcMLFromFiles ( IEnumerable sourceFileNames, string xmlFileName ) : void
GenerateSrcMLFromFiles ( IEnumerable sourceFileNames, string xmlFileName, System.Language language ) : void

Generates a SrcML document from a collection of source files using the specified language.

GenerateSrcMLFromString ( string source ) : string

Generate SrcML from a given string of source code. The source code will be parsed as C++.

GenerateSrcMLFromString ( string source, System.Language language ) : string

Generate SrcML from a given string of source code.

RegisterExecutable ( string executableDirectory, IEnumerable languages ) : void

Registers a src2srcml executable to use for the given languages.

RegisterExecutable ( string executableDirectory, IEnumerable languages, IEnumerable namespaceArguments ) : void

Registers a src2srcml executable to use for the given languages.

SrcMLGenerator ( ) : System

Creates a new SrcMLGenerator.

SrcMLGenerator ( string defaultExecutableDirectory ) : System

Creates a new SrcMLGenerator

SrcMLGenerator ( string defaultExecutableDirectory, IEnumerable namespaceArguments ) : System

Creates a new SrcMLGenerator

보호된 메소드들

메소드 설명
DetectNonDefaultExecutables ( ) : void

Scans the directory containing the default src2srcml executable and looks for subdirectories corresponding to defined languages. Each of these is registered for the given language.

GenerateImpl ( string inputFileName, string outputFileName ) : bool

비공개 메소드들

메소드 설명
CreateArgumentsForLanguage ( System.Language language ) : Collection
CreateExtensionMappingForRunner ( ABB.SrcML.Src2SrcMLRunner2 runner ) : Language>.Dictionary

메소드 상세

DetectNonDefaultExecutables() 보호된 메소드

Scans the directory containing the default src2srcml executable and looks for subdirectories corresponding to defined languages. Each of these is registered for the given language.
protected DetectNonDefaultExecutables ( ) : void
리턴 void

GenerateImpl() 보호된 메소드

protected GenerateImpl ( string inputFileName, string outputFileName ) : bool
inputFileName string
outputFileName string
리턴 bool

GenerateSrcMLFileFromDirectory() 공개 메소드

Generate a SrcML document from the given path and place it in the XML file.
public GenerateSrcMLFileFromDirectory ( string directoryPath, string xmlFileName ) : ABB.SrcML.SrcMLFile
directoryPath string The directory path.
xmlFileName string The path of the xml file.
리턴 ABB.SrcML.SrcMLFile

GenerateSrcMLFileFromDirectory() 공개 메소드

Generates a SrcML document from the given path and place it in the XML file. The XML document will only contain files not present in filesToExclude.
public GenerateSrcMLFileFromDirectory ( string directoryPath, string xmlFileName, IEnumerable filesToExclude ) : ABB.SrcML.SrcMLFile
directoryPath string The directory path.
xmlFileName string The path of the xml file.
filesToExclude IEnumerable A collection of files to exclude from .
리턴 ABB.SrcML.SrcMLFile

GenerateSrcMLFileFromDirectory() 공개 메소드

public GenerateSrcMLFileFromDirectory ( string directoryPath, string xmlFileName, IEnumerable filesToExclude, System.Language languageFilter ) : ABB.SrcML.SrcMLFile
directoryPath string
xmlFileName string
filesToExclude IEnumerable
languageFilter System.Language
리턴 ABB.SrcML.SrcMLFile

GenerateSrcMLFileFromDirectory() 공개 메소드

Generate a SrcML document from the given path and place it in the XML file. The file will only contain source files classified as languageFilter.
public GenerateSrcMLFileFromDirectory ( string directoryPath, string xmlFileName, System.Language languageFilter ) : ABB.SrcML.SrcMLFile
directoryPath string The directory path.
xmlFileName string The path of the xml file.
languageFilter System.Language The language to include.
리턴 ABB.SrcML.SrcMLFile

GenerateSrcMLFileFromFiles() 공개 메소드

Generates a SrcML document from a collection of source files. The language(s) will be inferred from the file extensions.
public GenerateSrcMLFileFromFiles ( IEnumerable sourceFileNames, string xmlFileName ) : ABB.SrcML.SrcMLFile
sourceFileNames IEnumerable The source files to generate SrcML from.
xmlFileName string The file name to write the resulting XML to.
리턴 ABB.SrcML.SrcMLFile

GenerateSrcMLFromDirectory() 공개 메소드

public GenerateSrcMLFromDirectory ( string directoryPath, string xmlFileName ) : void
directoryPath string
xmlFileName string
리턴 void

GenerateSrcMLFromDirectory() 공개 메소드

public GenerateSrcMLFromDirectory ( string directoryPath, string xmlFileName, IEnumerable filesToExclude ) : void
directoryPath string
xmlFileName string
filesToExclude IEnumerable
리턴 void

GenerateSrcMLFromDirectory() 공개 메소드

Generate a SrcML document from the given path and place it in the XML file. The file will only contain source files classified as languageFilter.
public GenerateSrcMLFromDirectory ( string directoryPath, string xmlFileName, IEnumerable filesToExclude, System.Language languageFilter ) : void
directoryPath string The directory path.
xmlFileName string The path of the xml file.
filesToExclude IEnumerable A collection of files to exclude from .
languageFilter System.Language The language to include.
리턴 void

GenerateSrcMLFromDirectory() 공개 메소드

public GenerateSrcMLFromDirectory ( string directoryPath, string xmlFileName, System.Language languageFilter ) : void
directoryPath string
xmlFileName string
languageFilter System.Language
리턴 void

GenerateSrcMLFromFile() 공개 메소드

Generate a SrcML document from a single source file. The language will be inferred from the extension.
public GenerateSrcMLFromFile ( string sourceFileName, string xmlFileName ) : void
sourceFileName string The path of the source file to convert.
xmlFileName string The file name to write the resulting XML to.
리턴 void

GenerateSrcMLFromFile() 공개 메소드

Generate a SrcML document from a single source file.
public GenerateSrcMLFromFile ( string sourceFileName, string xmlFileName, System.Language language ) : void
sourceFileName string The path to the source file to convert.
xmlFileName string The file name to write the resulting XML to.
language System.Language The language to parse the source file as. If this is Language.Any, then the language will be determined from the file extension.
리턴 void

GenerateSrcMLFromFiles() 공개 메소드

public GenerateSrcMLFromFiles ( IEnumerable sourceFileNames, string xmlFileName ) : void
sourceFileNames IEnumerable
xmlFileName string
리턴 void

GenerateSrcMLFromFiles() 공개 메소드

Generates a SrcML document from a collection of source files using the specified language.
public GenerateSrcMLFromFiles ( IEnumerable sourceFileNames, string xmlFileName, System.Language language ) : void
sourceFileNames IEnumerable The source files to generate SrcML from.
xmlFileName string The file name to write the resulting XML to.
language System.Language The language to parse the source files as.
리턴 void

GenerateSrcMLFromString() 공개 메소드

Generate SrcML from a given string of source code. The source code will be parsed as C++.
public GenerateSrcMLFromString ( string source ) : string
source string A string containing the source code to parse.
리턴 string

GenerateSrcMLFromString() 공개 메소드

Generate SrcML from a given string of source code.
public GenerateSrcMLFromString ( string source, System.Language language ) : string
source string A string containing the source code to parse.
language System.Language The language to parse the string as. Language.Any is not valid.
리턴 string

RegisterExecutable() 공개 메소드

Registers a src2srcml executable to use for the given languages.
public RegisterExecutable ( string executableDirectory, IEnumerable languages ) : void
executableDirectory string The directory containing the src2srcml executable to use.
languages IEnumerable A collection of the Languages that should be parsed by this executable.
리턴 void

RegisterExecutable() 공개 메소드

Registers a src2srcml executable to use for the given languages.
public RegisterExecutable ( string executableDirectory, IEnumerable languages, IEnumerable namespaceArguments ) : void
executableDirectory string The directory containing the src2srcml executable to use.
languages IEnumerable A collection of the Languages that should be parsed by this executable.
namespaceArguments IEnumerable The namespace arguments to use when converting to SrcML.
리턴 void

SrcMLGenerator() 공개 메소드

Creates a new SrcMLGenerator.
public SrcMLGenerator ( ) : System
리턴 System

SrcMLGenerator() 공개 메소드

Creates a new SrcMLGenerator
public SrcMLGenerator ( string defaultExecutableDirectory ) : System
defaultExecutableDirectory string The directory containing the default srcml executables to use.
리턴 System

SrcMLGenerator() 공개 메소드

Creates a new SrcMLGenerator
public SrcMLGenerator ( string defaultExecutableDirectory, IEnumerable namespaceArguments ) : System
defaultExecutableDirectory string The directory containing the default srcml executables to use.
namespaceArguments IEnumerable The namespace arguments to use when converting to SrcML.
리턴 System