VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "ParseVerb"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit
'Klasa ParseVerb
Implements ParseObject
Implements Command
Private args As Collection
Private value As Integer, typ As Integer
Private pobj As New ParseObject
Private stk As Stack
   
Public Sub init(ByVal s As String)
  Set args = New Collection
  s = LCase(s)
  value = -1
  typ = VERB_TYPE
  Select Case s
    Case "print"
      value = PRINT_IT
    Case "sortby"
      value = SORTBY
  End Select
End Sub
'-----------------------------------
Public Function getVerb(s As String) As ParseObject
  Dim po As ParseObject

  Select Case value
    Case PRINT_IT
      Set po = New Printit
      po.init
      Set getVerb = po
    Case SORTBY
      Set po = New Sort
      po.init
      Set getVerb = po
  End Select
End Function

Public Sub addArg(p As ParseObject)
  If TypeOf p Is Multvar Then
    Dim mv As Multvar
    Set mv = p
    Set args = mv.getVector
  Else
    args.add p
  End If
End Sub

Public Function isLegal() As Boolean
  isLegal = value >= 0
End Function

Private Sub Command_Execute()

End Sub

Private Sub ParseObject_addArg(p As ParseObject)
  addArg p
End Sub

Private Function ParseObject_getType() As Integer
  ParseObject_getType = typ
End Function
Public Function getArgs() As Collection
  Set getArgs = args
End Function

Private Function ParseObject_getValue() As Integer
  ParseObject_getValue = value
End Function

Private Sub ParseObject_init()
  'init
End Sub

Private Sub ParseObject_setData(dt As data, ByVal pt As ListBox)

End Sub
