Class Variable

VarSpace
ClassModule Variable

Storage wrapper for variants that provides tracing and readonly protection.

Description:
This class provides a useful wrapper around Visual Basic's Variant data type. Using this class, variables may be created with a ReadOnly property and provide for Read/Write/Destroy tracing capabilities.

Author:
Andrew F. Friedl

Copyright:
1997.04.10, BlackBox Software & Consulting


Variables
Public
Name As String
ReadOnly As Boolean

General Methods
object members
Value Public Property Let Value(Data As Variant)
        Sets the value of the Variable.
Value Public Property Set Value(Data As Variant)
        Sets the value of the Variable.
Value Public Property Get Value() As Variant
        Retrieves the value of the Variable.
SetValue Public Function SetValue(Data As Variant) As Boolean
        Sets the current value of the Variable.
GetValue Public Sub GetValue(Data As Variant)
        Retrieves the current value of the Variable.

General Methods - Detail
object members

Value

Sets the value of the Variable.

Description:
This property attempts to set the value of the Variable. The value may not be an object type. This function will generate an error if the Variable has been marked ReadOnly. If the variable has traces assigned, they will be invoked.

Definition:
Public Property Let Value(Data As Variant)

Parameters:
Data The new value of the Variable.


Value

Sets the value of the Variable.

Description:
This property attempts to set the value of the Variable. The value must be an object type. This function will generate an error if the Variable has been marked ReadOnly. If the variable has traces assigned, they will be invoked.

Definition:
Public Property Set Value(Data As Variant)

Parameters:
Data The new value of the Variable.


Value

Retrieves the value of the Variable.

Description:
This property retrieves the current value of the variable. The value is placed in the Value parameter. If the value of this variable is an alias, or another variable, then the value of that variable is returned.

Definition:
Public Property Get Value() As Variant

Returns:
The current value of the Variable.


SetValue

Sets the current value of the Variable.

Description:
This function attempts to set the value of the Variable. The value may be set regardless of type. This function will fail if the Variable has been marked ReadOnly. This function is independent of the data type being retrieved.

Definition:
Public Function SetValue(Data As Variant) As Boolean

Parameters:
Data The new value of the Variable.

Returns:
True, if the value was set, False otherwise.


GetValue

Retrieves the current value of the Variable.

Description:
This subrounting retrieves the current value of the variable. The value is placed in the Value parameter. If the value of this variable is an alias, or another variable, then the value of that variable is returned.

Definition:
Public Sub GetValue(Data As Variant)

Parameters:
Data The variant to store the value.


Generated by BlackBox Software's DocuPro for VB6
Software and Documentation Copyright 1999,2000 BlackBox Software, All Rights Reserved