VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
END
Attribute VB_Name = "c_NmNameComponent"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
'Generated by IDL2VB v120. Copyright (c) 1999 Martin.Both
'Source File Name: ../naming/CosNaming.idl
'Target File Name: c_NmNameComponent.cls

Option Explicit

'struct ::CosNaming::NameComponent
Const sTypeId As String = "IDL:omg.org/CosNaming/NameComponent:1.0"

'Member
Public id As String
Public kind As String

'Helper
Public Sub initByRead(ByVal oIn As cOrbStream)
    On Error GoTo ErrHandler
    id = oIn.readString()
    kind = oIn.readString()
    Exit Sub
ErrHandler:
    Call VBOrb.ErrReraise(Err, "NameComponent.read")
End Sub

'Helper
Public Sub writeMe(ByVal oOut As cOrbStream)
    On Error GoTo ErrHandler
    Call oOut.writeString(id)
    Call oOut.writeString(kind)
    Exit Sub
ErrHandler:
    Call VBOrb.ErrReraise(Err, "NameComponent.write")
End Sub

'Helper
Public Sub initByAny(ByVal oAny As cOrbAny)
    On Error GoTo ErrHandler
    id = oAny.getString()
    Call oAny.nextPos
    kind = oAny.getString()
    Call oAny.nextPos
    Exit Sub
ErrHandler:
    Call VBOrb.ErrReraise(Err, "initByAny")
End Sub

'Helper
Public Sub insertIntoAny(ByVal oAny As cOrbAny)
    On Error GoTo ErrHandler
    Call oAny.insertString(id)
    Call oAny.nextPos
    Call oAny.insertString(kind)
    Call oAny.nextPos
    Exit Sub
ErrHandler:
    Call VBOrb.ErrReraise(Err, "insertIntoAny")
End Sub
