Pubblicazione File: CInt32Value
Documento generato mediante: Documentation Creator By BGSoftware


VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "CInt32Value"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
' *********************************************************************
'* CLASS Oggetto che rappresenta un valore di tipo Integer a 32 bit (Long in Visual Basic)
'* <BR/>Autore: <B>Giorgio Bernardi</B>
'* E-Mail: <A HREF="mailto:giorgio.bernardi@studio.unibo.it">Giorgio.Bernardi@studio.unibo.it</A>
'* Data  : Settembre 2004
'* <DIV CLASS="ClassDescription">
'*  Il valore viene impostato a 0 in fase di costruzione.
'* </DIV>
' *********************************************************************
Option Explicit
Implements CValue

'* Valore memorizzato
Private mValue   As Long

'* Restituisce la rappresentazione in forma di stringa del valore memorizzato
Public Function getActualValueToString() As String
    getActualValueToString = CStr(getValue())
End Function

'* Setta il valore memorizzato dalla rappresentazione in forma di stringa
Public Function setActualValueFromString(newValue As String) As Boolean
On Error GoTo ErrorCatch
    If IsNumeric(newValue) Then
        setValue CLng(newValue)
        setActualValueFromString = True
    End If
ErrorCatch:
End Function

'* Restituisce il nome del tipo di dato memorizzato
Public Function getType() As String
    getType = "Int32"
End Function

'* Accesso al valore memorizzato
Public Function getValue() As Long
    getValue = mValue
End Function

'* Accesso al valore memorizzato
Public Sub setValue(newValue As Long)
    mValue = newValue
End Sub

Private Sub Class_Initialize()
    setValue 0
End Sub

Private Function CValue_getActualValueToString() As String
    CValue_getActualValueToString = getActualValueToString()
End Function

Private Function CValue_getType() As String
    CValue_getType = getType()
End Function

Private Function CValue_setActualValueFromString(newValue As String) As Boolean
    CValue_setActualValueFromString = setActualValueFromString(newValue)
End Function

Private Function CValue_toVariant() As Variant
    CValue_toVariant = toVariant()
End Function

'* Funzione presente in Visual Basic per trasformare il valore memorizzato in Variant
Public Function toVariant() As Variant
    toVariant = mValue
End Function

Documento generato mediante: Documentation Creator By BGSoftware