Hi,

On Wed, 2009-02-04 at 12:07 +0100, Marcus Lindblom wrote:
> Gerrit Voss wrote:
> > Hi,
> >
> > On Wed, 2009-02-04 at 11:37 +0100, Marcus Lindblom wrote:
> >   
> >> Hi,
> >>
> >> I'm teaching one of our developers here to use OpenSG, and it's going 
> >> farily well, but he's often running into an issue that I too have 
> >> happened upon, although not as often now.
> >>
> >> It is that the most useful fields/functions of are often in the 
> >> Base-class, which is not visible on the 'real' class's page in Doxygen.
> >>
> >> Now, it doesn't take that much effort to learn this, so I'm mainly 
> >> curious if it could be done better someday, not that we should redo it now.
> >>
> >> One idea would be to define a macro in the Base-.h file (like 
> >> OSG_GEOMETRY_CLASS_CONTENTS) which was then used in the regular file.
> >>
> >> The .cpp file would contain the same functions, just defined as 
> >> belonging to the "real" class rather than the Base one.
> >>
> >> Pros:
> >>   * Would reduce # of classes a bit
> >>   * Remove 'scaffold' classes everywhere
> >>   * Make things clearer for newbies (or others on their bad days)
> >>
> >> Cons:
> >>   * Can't override Base's functions easily.
> >>   * Harder to differentiate between boilerplate code and man-made code 
> >> in  doxygen.
> >>     
> >
> > for most of the parts this should be actually fine. The only thing I 
> > would try first is if having a zero sized member object does not
> > actually increase the class size. That would be needed to get 
> > functionality inserted into the default initializer lists.
> >   
> Right. IIRC there was much talk on boost about zero-size member 
> optimization some time ago.
> > Otherwise I don't see to many problems. 
> >

actually thinking about it one option might be to wrap all the members
into nested struct. I'll have to see what the access overhead would be.

kind regards,
 gerrit



------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Opensg-core mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-core

Reply via email to