共用方式為


VCLanguageManager Interface

Definition

An object used to validate various code elements of a C++ source file.

public interface class VCLanguageManager
public interface class VCLanguageManager
__interface VCLanguageManager
[System.Runtime.InteropServices.Guid("2D71BDC0-E7B4-4249-ABC0-3E39C33510FA")]
[System.Runtime.InteropServices.TypeLibType(System.Runtime.InteropServices.TypeLibTypeFlags.FDispatchable | System.Runtime.InteropServices.TypeLibTypeFlags.FDual)]
public interface VCLanguageManager
[<System.Runtime.InteropServices.Guid("2D71BDC0-E7B4-4249-ABC0-3E39C33510FA")>]
[<System.Runtime.InteropServices.TypeLibType(System.Runtime.InteropServices.TypeLibTypeFlags.FDispatchable | System.Runtime.InteropServices.TypeLibTypeFlags.FDual)>]
type VCLanguageManager = interface
Public Interface VCLanguageManager
Attributes

Examples

This example validates the name of a possible C++ source file. This sample assumes that a file, MyFile.cpp, exists in the current solution directory.

Sub ValidateFileName()  
    Dim vcCM as VCCodeModel  
    vcCM = DTE.Solution.Item(1).CodeModel  
    if(DTE.VCLanguageManager.ValidateFileName("MyFile.cpp")) Then  
        DTE.Solution.Item(1).ProjectItems.AddFromFile("MyFile.cpp")  
End Sub  

Remarks

The VCLanguageManager object allows validation of various code elements in a C++ source file, such as variable names, qualified names, C++ source file names, and so on.

See How to: Compile Example Code for Visual C++ Code Model Extensibility for information on how to compile and run this sample.

Methods

CompareTokenStreams(String, String)

Compares two text streams token-wise (skipping comments and whitechars).

IsReservedName(String, Boolean)

Determines if the specified name is a C++ reserved name.

ParseParameterText(String, String, String)
RefreshUserKeywords(String)

Refreshes the user-defined keywords from a file.

ValidateFileName(String, vsCMValidateFileExtension)

Determines if the specified file name is a valid C++ file name.

ValidateIdentifier(String)

Determines if the specified name is a valid C++ identifier.

ValidateParameterNames(String, String, vsCMElement)

Determines if the specified parameter list is valid.

ValidateQualifiedName(String)

Determines if the specified name is a valid C++ qualified name.

ValidateType(String)

Determines if the specified expression is a valid C++ type expression.

Applies to