VCCodeBase Interface

 

An object providing access to the base class list of the parent object.

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

[GuidAttribute("1C251A0B-4C48-4DE2-9CF2-5E7601EE01F1")]
public interface VCCodeBase

NameDescription
System_CAPS_pubpropertyAccess

Sets or gets the access attributes of this item.

System_CAPS_pubpropertyChildren

Gets a collection of objects contained within this code construct.

System_CAPS_pubpropertyClass

Gets the base class or the actual base class declaration of the parent object.

System_CAPS_pubpropertyCodeModel

Gets the VCCodeModel for the project.

System_CAPS_pubpropertyCollection

Gets the collection containing the object supporting this property or contained within this code construct.

System_CAPS_pubpropertyComment

Gets or sets the comment associated with the code element.

System_CAPS_pubpropertyDeclarationText

Gets or sets the declaration of the parent object.

System_CAPS_pubpropertyDisplayName

Gets the full name of the parent object.

System_CAPS_pubpropertyDTE

Gets the top-level extensibility object.

System_CAPS_pubpropertyEndPoint

Gets the text point that is the location of the end of the code item.

System_CAPS_pubpropertyEndPointOf[vsCMPart, vsCMWhere]

Returns the end point of the parent object.

System_CAPS_pubpropertyExtender[String]

Returns the requested Extender object if it is available for this object.

System_CAPS_pubpropertyExtenderCATID

Gets the Extender category ID (CATID) for the object.

System_CAPS_pubpropertyExtenderNames

Gets a list of available Extenders for the object.

System_CAPS_pubpropertyFile

Gets the file in which this VCCodeBase is contained.

System_CAPS_pubpropertyFullName

Gets the full path and name of the object's file.

System_CAPS_pubpropertyInfoLocation

Gets the capabilities of the code model.

System_CAPS_pubpropertyIsCaseSensitive

Gets whether a code element is case-sensitive.

System_CAPS_pubpropertyIsCodeType

Gets a value indicating whether a CodeType object can be obtained from this object.

System_CAPS_pubpropertyIsInjected

Gets whether a code element has been injected by an attribute or macro expansion.

System_CAPS_pubpropertyIsReadOnly

Gets whether the file containing the parent object is read-only.

System_CAPS_pubpropertyIsVirtual

Sets or gets whether the parent object is virtual.

System_CAPS_pubpropertyIsZombie

Gets whether the VCCodeBase object exists.

System_CAPS_pubpropertyKind

Returns an enumeration indicating the type of object.

System_CAPS_pubpropertyLanguage

For code model objects, returns the programming language used to author the code.

System_CAPS_pubpropertyLocation[vsCMWhere]

Returns the location of the parent object declaration.

System_CAPS_pubpropertyName

Gets or sets the name of the object.

System_CAPS_pubpropertyParent

Gets the immediate parent object of a given object.

System_CAPS_pubpropertyPicture

Gets a picture automation object to be used as an icon in the user interface.

System_CAPS_pubpropertyProject

Gets the Project associated with the object.

System_CAPS_pubpropertyProjectItem

Gets the ProjectItem associated with the given object.

System_CAPS_pubpropertyReferences

Not currently implemented.

System_CAPS_pubpropertyStartPoint

Gets a TextPoint object that defines the beginning of the code item.

System_CAPS_pubpropertyStartPointOf[vsCMPart, vsCMWhere]

Gets the start point of the parent object.

NameDescription
System_CAPS_pubmethodGetEndPoint(vsCMPart)

Returns a TextPoint object that marks the end of the code element definition.

System_CAPS_pubmethodGetStartPoint(vsCMPart)

Returns a TextPoint object that defines the beginning of the code element definition.

System_CAPS_pubmethodIsSelf(Object)

Determines if the specified code element is the same as the parent code element.

The VCCodeBase object provides access to the code element representing the base class list for the parent object, if it exists. You can use this object to retrieve the base class or classes that exist for the parent object.

System_CAPS_noteNote

This does not represent the actual base class code element. It simply represents the base class names for the parent object.

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 base classes for each class in the current project.

Sub GetBases()
    Dim vcCM As VCCodeModel
    Dim vcClass As VCCodeClass
    Dim vcBase As VCCodeBase
    Dim i As Integer
    vcCM = DTE.Solution.Item(1).CodeModel
    For Each vcClass In vcCM.Classes
        For i = 1 To vcClass.Bases.Count
            vcBase = vcClass.Bases.Item(1)
            MsgBox(vcClass.Name + " derives from " + vcBase.Name)
        Next
    Next
End Sub
Return to top
Show: