We recommend using Visual Studio 2017
This documentation is archived and is not being maintained.

VCCodeTypedef Interface

An object representing a typedef code element in the source code of a solution.

Namespace:  Microsoft.VisualStudio.VCCodeModel
Assembly:  Microsoft.VisualStudio.VCCodeModel (in Microsoft.VisualStudio.VCCodeModel.dll)

[GuidAttribute("D63F6B4B-FC99-4D5D-B04B-D208D37A4163")]
public interface VCCodeTypedef

The VCCodeTypedef type exposes the following members.

  NameDescription
Public propertyAccessDefines the access attributes of this item.
Public propertyAttributesGets a collection of all of the attributes for the object.
Public propertyChildrenGets a collection of objects contained within this code construct.
Public propertyCodeModelGets the VCCodeModel object for the project.
Public propertyCollectionReturns the collection containing the object supporting this property or contained within this code construct.
Public propertyCommentGets or sets the comment associated with the code element.
Public propertyDisplayNameGets the name used in the user interface for this output group.
Public propertyDTEGets the top-level extensibility object.
Public propertyEndPointGets the edit point that is the location of the end of the code item.
Public propertyEndPointOfReturns the end point of the object.
Public propertyExtenderReturns the requested Extender object if it is available for this object.
Public propertyExtenderCATIDGets the Extender category ID (CATID) for the object.
Public propertyExtenderNamesGets a list of available Extenders for the object.
Public propertyFileGets the file associated with this VCCodeTypedef element.
Public propertyFullNameGets the full path and name of the object's file.
Public propertyInfoLocationGets the capabilities of the code model.
Public propertyIsCaseSensitiveGets whether a code element is case-sensitive.
Public propertyIsCodeTypeGets a value indicating whether a CodeType object can be obtained from this object.
Public propertyIsInjectedGets whether a code element has been injected by an attribute.
Public propertyIsReadOnlyGets whether the file containing the object is read-only.
Public propertyIsZombieGets if the object exists.
Public propertyKindGets an enumeration indicating the type of object.
Public propertyLanguageGets the programming language used to author the code.
Public propertyLocationReturns the location of the object declaration.
Public propertyNameGets or sets the name of the object.
Public propertyNamespaceGets an object defining the namespace.
Public propertyParentGets the immediate parent object of a given object.
Public propertyPictureGets a picture automation object to be used as an icon in the user interface.
Public propertyProjectGets the Project object associated with the object.
Public propertyProjectItemGets the ProjectItem object associated with the given object.
Public propertyReferencesNot currently implemented.
Public propertyStartPointGets a TextPoint object that defines the beginning of the code item.
Public propertyStartPointOfReturns the start point of the object.
Public propertyTypeStringGets or sets the type of the object using a string representation of the type.
Top

  NameDescription
Public methodAddAttributeCreates a new attribute code construct and inserts the code in the correct location.
Public methodGetEndPointGets a TextPoint object that marks the end of the code element definition.
Public methodGetStartPointGets a TextPoint object that defines the beginning of the code element definition.
Public methodIsSelfDetermines if the specified code element is the same as the code element.
Top

The VCCodeTypedef object is used to modify an existing typedef construct.

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

This example displays the name of each typedef code element in the current solution.

Sub GetAllTypedefs()
    Dim vcCM As VCCodeModel
    Dim vcTypedef As VCCodeTypedef
    vcCM = DTE.Solution.Item(1).CodeModel
    For Each vcTypedef in vcCM.Typedefs
        MsgBox(vcTypedef.DisplayName)
    Next
End Sub
Show: