On 5/28/04 12:23 AM, "Norman Palardy" <palardyn at shaw dot ca> wrote:
>> Hi Jonathan,
>>
>> They are implemented of course. Right.
>>
>> 1) I talk now about small problem as I see -- refactoring of existed
>> CLASS.
>>
>> Right now I have the old EXISTED class VTable.
>>
>> REALproperty TableProperties[] = {
>> { NULL, "Name", "String", 0, (REALproc)
>> Table_GetName,
>> (REALproc) Table_SetName },
>> { NULL, "FieldCount", "Integer", 0, (REALproc)
>> Table_GetFieldCount },
>> { NULL, "RecordCount", "Integer", 0, (REALproc)
>> Table_GetRecordCount },
>> { NULL, "DataBase", "VDataBase", 0, (REALproc)
>> Table_GetDataBase },
>> { NULL, "Encrypted", "Boolean", 0, (REALproc)
>> Table_GetIsEncrypted, NULL },
>> { NULL, "PhysicalRecordCount", "Integer", 0, (REALproc)
>> Table_GetPhysicalRecordCount },
>>
>> };
>>
>> I want create I_Table interface, and make Vtable class implementing it.
>>
>> As far as I understand, in Interface I will need 2 __methods__
>> For each property
>>
>> { REALnoImplementation, REALnoImplementation,
>> "Name() as String"},
>>
>> { REALnoImplementation, REALnoImplementation,
>> "Name( Assigns inName as String )² },
>>
>> But now, if I inherit from interface, I must implement in the Vtable
>> class
>> exactly the same methods, right?
>>
>> Then they will conflict to EXISTED properties.
>
> Change the name of the existing property to something private.
For what?
What sense to leave them?
Property 'Name' will be simulated by METHODS now.
> Then Name() and Name(assigns s as string) manipulate that private
> member in VTable
You mean that I need create METHOD
Table_get_Name()
{
return Table_GetName() // existed method?
}
I do not see sense for this.
First of all because this is additional call.
Absolutely not needed.
> And nothing else knows or cares as long as they continue to use Name as
> though it were a property.
>
> I've done this. In both RB code and plugins.
Norman, please understand me correctly.
I know HOW resolve task.
I DO NOT like this way.
I believe that something WRONG in this way.
We MUST NOT change class and its Properties methods in dependence if this
class inherited from Interface or no.
--
Best regards,
Ruslan Zasukhin [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft dot com
web: http://www.paradigmasoft.com
To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------
_______________________________________________
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|