Hi,
On Fri, 2008-05-30 at 15:32 -0500, Carsten Neumann wrote:
> Hi,
> For custom access fields it is the responsibility of the container to
> register appropriate functions with the handle (by calling setAddMethod
> etc.) in {get,edit}Handle<FieldName>. Some of these functions might not
> be available even (hence all the bool return values).
I don't like the way to figure out if something is available after the
fact. If you already plan to extend the field description (below)
couldn't we use that to query the handle which functions are available ?
This way the bool return values can go.
As for the function registration. Again, if possible I would like to use
the fcdEdit to name the function and have the Class, as opposed to
Base, implement it. That is how it is done now for the few functions
OpenSG needs internally (e.g. clear) and it removes the need to mess
with the init system and to store the registered functions somewhere.
I don't see the need to dynamically alter which access methods are
available, which you can't anyway if you want to use the
field description for the access type (below) as this one is 'static'
for the class.
> For all access types (std, null-check, custom) get, find and size will
> go directly to the field, i.e. read access can not be "intercepted".
> This seems to make the most sense given that currently the container
> always has at least a get<FieldName> function.
>
> On the implementation side I'll add
> // for custom access fields
> typedef boost::function<void (FieldContainer *)> AddMethod;
> typedef boost::function<void (UInt32) > RemoveMethod;
> typedef boost::function<void (UInt32,
> FieldContainer *)> InsertMethod;
> typedef boost::function<void (UInt32,
> FieldContainer *)> ReplaceMethod;
> typedef boost::function<void (void) > ClearMethod;
>
> to EditMFieldHandle<FieldContainerPtrMFieldBase> and place the
> information on what access type to use in the FieldDescription (maybe as
> FieldFlags?).
ok, except FieldFlags is already taken for the MT/Cluster flags so I
would prefer something else, like GenericAccessFlags.
kind regards,
gerrit
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Opensg-core mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-core