class CGXAbstractUserAttribute: public CObject

By deriving from CGXAbstractUserAttribute you can store binary data into any CGXStyle object. Using a CGXAbstractUserAttribute will be much more convinient for you than using SetItemDataPtr because you don't have to worry about deleting the objects any more.

Objective Grid offers a default CGXUserAttribute class that provides support for numbers and strings. CGXStyle::SetUserAttribute instantiates this default CGXUserAttribute class for strings and numbers automatically which makes Objective Grid 6.0 fully source code compatible with the previous Objective Grid versions.

Using CGXUserAttribute decreases the memory usage of user attributes a lot. Numbers will only be stored as doubles and no string needs to be allocated any more. If you pass a string to CGXStyle::SetUserAttribute the value will be parsed and if it is a plain number it will be stored as a double.

And it increases the flexibility. It is much easier now to add new attributes to CGXStyle and you don't have to subclass CGXStyle any more. GXAbstractUserAttribute comes with full support for serialization and reading or writing profile or registry. User attributes can also be modified by the user via the CGXUserAttributePage (if wished).

#include <gxall.h>

See Also

 CGXUserAttribute

CGXAbstractUserAttribute

 Class Members