ClassDef Object

Meta Data Services Programming

Meta Data Services Programming

ClassDef Object

The ClassDef object helps you create information models by adding interfaces to a class. To insert a new class definition into an information model, use the ReposTypeLib object.

Once you have added all of the interfaces, you complete a class definition by committing the transaction that brackets your class definition modifications.

A ClassDef object is also a RepositoryObject and a RepositoryObjectVersion object. You can also access members that are defined for those objects and members of IViewClassDef and IVersionAdminInfo. For more information about accessing a member of an interface that is not the default interface, see Accessing Automation Object Members.

When to Use

Use the ClassDef object to:

  • Add a new or existing interface to a class definition.

  • Retrieve the global identifier for the class.

  • Access the collection of interfaces that are part of a class definition.
Properties
Property Description
ClassID The global identifier of the class
Name The name of a ClassDef object
Synonym A synonym of the name of the ClassDef object

Methods
Method Description
AddInterface Adds an existing interface to the class definition
CreateInterfaceDef Creates a new interface and adds it to the class definition
ObjectInstances Materializes an object collection containing all of the objects in the repository that conform to this class

Collections
Collection Description
Interfaces The collection of all interfaces that are implemented by the class.
ItemInCollections This collection is empty for class definitions. It is reserved for future use.
Properties The collection of all persistent properties that are attached to the ClassDef object.
ReposTypeLibScopes The collection of all repository type libraries that contain this class.
ScriptsUsedByClass The collection of all ScriptDef objects that are implemented by this class.

See Also

RepositoryObject Object

RepositoryObjectVersion Object

ReposTypeLib Object

ScriptDef Object