Attribute VB_Name = "m_SpAbsAnAbstractInterface"
'Generated by IDL2VB v120. Copyright (c) 2000 Martin.Both
'Source File Name: ../demos/obv/valuetype/valuetype.idl

Option Explicit

'interface abstract ::obv::support_abstract::AnAbstractInterface
Public Const TypeId As String = "IDL:obv/support_abstract/AnAbstractInterface:1.0"

'Helper
Public Function narrow(ByVal Abstr As cOrbAbstractBase) _
    As c_SpAbsAnAbstractInterface
    On Error GoTo ErrHandler
    If Abstr Is Nothing Then
        Set narrow = Nothing
    ElseIf Abstr.isObjRef() Then
        Dim Obj As cOrbObject
        Set Obj = Abstr
        Dim oObj As cOrbObject
        Set oObj = New c_SpAbsAnAbstractInterface
        If oObj.setObjRef(Obj.getObjRef(), True) Then
            Set narrow = Nothing
        Else
            Set narrow = oObj
        End If
    Else
        Set narrow = Abstr
    End If
    Exit Function
ErrHandler:
    Call VBOrb.ErrReraise(Err, "narrow")
End Function

'Helper
Public Function uncheckedNarrow(ByVal Abstr As cOrbAbstractBase) _
    As c_SpAbsAnAbstractInterface
    On Error GoTo ErrHandler
    If Abstr Is Nothing Then
        Set uncheckedNarrow = Nothing
    ElseIf Abstr.isObjRef() Then
        Dim Obj As cOrbObject
        Set Obj = Abstr
        Dim oObj As cOrbObject
        Set oObj = New c_SpAbsAnAbstractInterface
        If oObj.setObjRef(Obj.getObjRef(), False) Then
            Set uncheckedNarrow = Nothing
        Else
            Set uncheckedNarrow = oObj
        End If
    Else
        Set uncheckedNarrow = Abstr
    End If
    Exit Function
ErrHandler:
    Call VBOrb.ErrReraise(Err, "uncheckedNarrow")
End Function
