[osg-users] Meta-data in core OSG - project started

Sukender suky0001 at free.fr
Fri Apr 22 08:08:58 PDT 2011


Hi all,

>From your feedback and our first tests/prototypes, here is the revised document.
Please comment!

Sukender
PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/

----- "Peter Amstutz" <peter.amstutz at tseboston.com> a écrit :

> Immutable means "cannot be changed".  So I mean that the "Value"
> class
> should not have a "set" method and all "get" methods should be const. 
> E.g.
> 
> template<T>
> class Value {
> private:
>   T v;
> 
> public:
>   Value(const T& _v) : v(_v) { }
> 
>   const T& get() { return v; }
> 
>   // type conversion operator, so you can write
>   // Value<int> a(5);
>   // int b = a;
>   const T& operator T () { return v; }
> };
> 
> 
> On 4/19/2011 5:46 AM, Sukender wrote:
> > Hi Peter,
> >
> > Okay, we'll certainely try your ideas. I guess ValueBase is meant to
> be derived, but Value<T> isn't.
> >
> > However, I'm not sure I understand the "immutable" thing. Do you
> mean you preference goes to
> >    function( someParam )
> > rather than
> >    function( Value<SomeType>(someParam) )
> > ?
> >
> > If so, yes. And that's of course easier to write and read.
> 
> -- 
> Peter Amstutz
> Senior Software Engineer
> Technology Solutions Experts
> Natick, MA
> 02131
> 
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CDC - Metadata v4.pdf
Type: application/pdf
Size: 238281 bytes
Desc: not available
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20110422/7d924905/attachment-0004.pdf>


More information about the osg-users mailing list