Timestamper Class Extension
TimestampedOCDescription.cls

' Copyright 2006 ESRI
'                 
' All rights reserved under the copyright laws of the United States
' and applicable international laws, treaties, and conventions.
' 
' You may freely redistribute and use this sample code, with or
' without modification, provided you include the original copyright
' notice and use restrictions.
' 
' See the use restrictions.

Option Explicit
Implements IObjectClassDescription

Private Property Get IObjectClassDescription_Name() As String
  IObjectClassDescription_Name = "Timestamped Object Class"
End Property
 
Private Property Get IObjectClassDescription_AliasName() As String
  IObjectClassDescription_AliasName = ""
End Property
 
Private Property Get IObjectClassDescription_ModelName() As String
  IObjectClassDescription_ModelName = ""
End Property
 
Private Property Get IObjectClassDescription_ModelNameUnique() As Boolean
  IObjectClassDescription_ModelNameUnique = False
End Property
 
Private Property Get IObjectClassDescription_InstanceCLSID() As esriSystem.IUID
  Dim pUID As esriSystem.IUID
  Set pUID = New UID
  pUID.Value = "esriGeoDatabase.Object"
  Set IObjectClassDescription_InstanceCLSID = pUID
End Property
 
Private Property Get IObjectClassDescription_ClassExtensionCLSID() As esriSystem.IUID
  Dim pUID As esriSystem.IUID
  Set pUID = New UID
  pUID.Value = "TimestamperVB.TimestampClassExtension"
  Set IObjectClassDescription_ClassExtensionCLSID = pUID
End Property
 
Private Property Get IObjectClassDescription_RequiredFields() As esriGeoDatabase.IFields
  
  ' First get the standard fields for an object class
  Dim pOCDescription As IObjectClassDescription
  Set pOCDescription = New esriGeoDatabase.ObjectClassDescription
  Dim pFieldsEdit As IFieldsEdit
  Set pFieldsEdit = pOCDescription.RequiredFields

  ' Now add the timestamp fields
  Call basUtil.AddTimestampFields(pFieldsEdit)

  Set IObjectClassDescription_RequiredFields = pFieldsEdit
End Property