main logo
Subject: Custom Data Types
Author: Gordon Apple
Posted: 2002/10/31 17:32:45
 
View Entire Thread
New Search


I have a few questions related to custom data types:

1. What needs to be overridden to define a direct subtype of VDK_Field? Or
is that permissible?

2. If we must subclass an existing class, it VDK_String the preferred
superclass for any fixed fields larger than a VDK_ULLong? Say a LRect (or
MacApp Vrect that is 16 bytes).

3. Is there anyway this can be done cross-platform? For example, In the
VDK_Rect example where it is shown subclassed from VDK_ULLong, I see a
potential cross-platform issue regarding byte order. In the example, as
long as one stays on the same platform, I see no problem. However, with the
shown implementation, going between platforms, I believe the byte ordering
will come out wrong. The only way I see around it is for the assignment and
readout methods to be cognizant of the platform and manipulate the bytes
accordingly. The order convention within the database should be agreed upon
and religiously adhered to for all custom types to maintain cross platform
coherence.

4. What about the possibility of maintaining a library of extended types?
It seems this would obviate the need for people reinventing the wheel on
many types of data.


--
G. Apple
Ed4U
Redondo Beach, CA
 
©2002 Gordon Apple
<-- Prior Message New Search Next Message -->