[wx-dev] Re: XTI class names

Stefan Csomor csomor at advancedconcepts.ch
Sun Jul 22 22:05:40 PDT 2007


Hi Francesco

Francesco Montorsi wrote:
> Hi,
>
> good idea. Then this part of the renaming map becomes:
>
> wxSetter => wxPropertySetter
> wxGetter => wxPropertyGetter
> wxCollectionGetter => wxPropertyCollectionGetter
> wxAdder => wxPropertyCollectionAdder
> wxPropertyAccessor
> wxGenericPropertyAccessor
>
> sounds good?
yes
>>> FM> wxPropertyInfo
>>> FM> wxHandlerInfo
>>> FM> wxConstructorBridge => wxDynamicClassConstructor
>>>
>>>  Why not wxConstructor[Bridge]Info for consistency?
>>>   
>> the ...infos are true metadata, the constructor bridge is nothing 
>> than a method that calls Create on the corresponding object and 
>> passes in the parameters, cast to the correct type, I wouldn't like 
>> wxDynamicClassConstructor because it is not something special for 
>> dynamic classes (see below)
> ops, you're right. Then I'd suggest:
>
> wxConstructorBridge => wxClassConstructor[Bridge?]
>
> just to underline that what that class constructs are other classes 
> (just wxConstructor[Bridge] seems too generic).
not exactly, it calls Create on a newly allocated object instance, along 
our two-phase construction paradigm in wx. So perhaps 
wxObjectCreateBridge or something along these lines ?
...
>> the names and relations between classes were chosen by Borland's 
>> people way back when...
>>
>> in principle a persister is a callback class, called during the 
>> writing out of a 'persistent' representation of an object,
> that's why at first I thought about calling them 
> "wxClassInfo[Reader|Writer]Notifier"; maybe that's the best solution 
> then? In this case, how could we call wxRuntimeDepersister and 
> wxCodeDepersister: "wxClassInfoCodeReaderNotifier" and 
> "wxClassInfoRuntimeReaderNotifier" ? they seems definitively too long: 
...
>> so because they deal with object instances the names could also have 
>> a 'object' instead of 'classinfo',
> substituting classinfo with object would give sligthly shorter names:
>
> wxWriter => wxObjectWriter
> wxReader => wxObjectReader
> wxXmlWriter => wxObjectXMLWriter
> wxXmlReader => wxObjectXMLReader
>
> wxPersister => wxObjectReaderNotifier
> wxDepersister => wxObjectWriterNotifier
> wxRuntimeDepersister => wxObjectCodeReaderNotifier
> wxCodeDepersister => wxObjectRuntimeReaderNotifier
to me object writer etc sound good, I'm not yet fully enamored with 
Notifier, as it has the capability of changing and vetoing on the source 
of the notification, it is more than a Notification to me, perhaps a ... 
Delegate ... ?

We're getting there :-)

Thanks,

Stefan





More information about the wx-dev mailing list