ID: 205
Viewed: 3347
Added: Apr 29, 2002
Version:
Snippet uploaded by: snippet
Written By: unknown
Demo: Sorry, no demo
Thank you for your vote. Please wait...
It appears you already voted for this snippet
It appears your vote value was empty
This class represents an individual node in a CTree data structure.
Highlight all by clicking in box
<!---Declaration--->
Option Explicit
Private m_Val As Variant
Private m_Tag As Variant
Private m_Nodes As CNodes
Private m_Key As String
Private WithEvents oSink As CNodeSink
Private oParentSink As CNodeSink
Friend Property Let Key(ByVal sKey As String)
m_Key = sKey
End Property
Public Property Get Key() As String
Key = m_Key
End Property
Public Property Get Parent() As CNode
If oParentSink Is Nothing Then
Set Parent = Nothing
Else
Set Parent = oParentSink.RequestParent()
End If
End Property
Public Property Get Nodes() As CNodes
Set Nodes = m_Nodes
End Property
Friend Property Set ParentSink(Sink As CNodeSink)
Set oParentSink = Sink
End Property
Public Property Get Tag() As Variant
If IsObject(m_Tag) Then
Set Value = m_Tag
Else
Value = m_Tag
End If
End Property
Public Property Let Tag(ByVal vTag As Variant)
m_Tag = vTag
End Property
Public Property Set Tag(ByVal vTag As Variant)
Set m_Tag = vTag
End Property
Public Property Get Value() As Variant
If IsObject(m_Val) Then
Set Value = m_Val
Else
Value = m_Val
End If
End Property
Public Property Let Value(ByVal Value As Variant)
m_Val = Value
End Property
Public Property Set Value(ByVal Value As Variant)
Set m_Val = Value
End Property
Private Sub Class_Initialize()
Set m_Nodes = New CNodes
Set oSink = New CNodeSink
Set m_Nodes.ParentSink = oSink
End Sub
Private Sub Class_Terminate()
Set m_Nodes = Nothing
Set oSink = Nothing
Set oParentSink = Nothing
End Sub
Private Sub oSink_IDRequest(oParent As CNode)
Set oParent = Me
End Sub
Highlight All
<!---Code--->
none;
No Comments to show
Please completely fill out the form below if you want to review this snippet. All reviews are subject to validation.
Adding your comment. Please wait...
Thanks for adding your comment!. After further review it will be added.
There was a problem adding your comment. Please try again.
Please complete all the fields in the form before sending.