none
请教有关使用接口问题: RRS feed

全部回复

  • ''' <summary>
    ''' 空间导入接口
    ''' </summary>
    ''' <remarks></remarks>
    Public Interface IwsSpatialImporter
      ''' <summary>
      ''' 导入FeatureClass
      ''' </summary>
      ''' <value></value>
      ''' <returns></returns>
      ''' <remarks></remarks>
      Property InFeatureClass() As IFeatureClass
      ''' <summary>
      ''' 导出FeatureClass
      ''' </summary>
      ''' <value></value>
      ''' <returns></returns>
      ''' <remarks></remarks>
      Property OutFeatureClass() As IFeatureClass
      ''' <summary>
      ''' 导入
      ''' </summary>
      ''' <remarks></remarks>
      Sub Import()
    End Interface

    ''' <summary>
    ''' 导入空间数据
    ''' </summary>
    ''' <remarks></remarks>
    Public Class wsBaseSpatialImporter
      Implements IwsSpatialImporter

    #Region " 字段 "
      Private m_InFeatureClass As IFeatureClass
      Private m_OutFeatureClass As IFeatureClass
    #End Region

    #Region " 属性 "
      ''' <summary>
      ''' 导入FeatureClass
      ''' </summary>
      Public Property InFeatureClass() As IFeatureClass Implements IwsSpatialImporter.InFeatureClass
        Get
          Return m_InFeatureClass
        End Get
        Set(ByVal value As IFeatureClass)
          m_InFeatureClass = value
        End Set
      End Property
      ''' <summary>
      ''' 导出FeatureClass
      ''' </summary>
      Public Property OutFeatureClass() As IFeatureClass Implements IwsSpatialImporter.OutFeatureClass
        Get
          Return m_OutFeatureClass
        End Get
        Set(ByVal value As IFeatureClass)
          m_OutFeatureClass = value
        End Set
      End Property
    #End Region

    #Region " 函数 "
      ''' <summary>
      ''' 导入空间数据
      ''' </summary>
      ''' <remarks></remarks>
      Public Sub Import() Implements IwsSpatialImporter.Import
         ''Todo
      End Sub
    #End Region

    End Class


    ''Usage
      Dim pImporter As
    IwsSpatialImporter
     
    pImporter =New wsBaseSpatialImporter
     
    pImporter.InFeatureClass=?
     
    pImporter.OutFeatureClass=?
      pImporter.Import()
     
    2008年10月30日 13:03
  • 谢谢您,太笨看不懂,有简单点吗?我想知道调用.NET接口方式,是不是也用New 来定义对象,怎样调用接口中定义的

    函数。谢谢

    2008年10月30日 13:36
  • 不是调用自定义接口,而是NET系统中的接口。

    2008年10月30日 14:19
  •  tfnpghl 写:

    不是调用自定义接口,而是NET系统中的接口。



    那不是一样
    2008年10月30日 14:47