cartobase
5.0.5
|
There has been three generations of generic objects with three different interfaces. The last two have disapeared: they are not present anymore in cartobase version 3.1, but still cited here for porting purpose.
GenericObject API: this is the new API that should be used now. The generic object is separated into several interface (Interface) API classes, each defining a set of virtual functions. The main interfaces are directly inherited by GenericObject: DictionaryInterface, StringInterface, ScalarInterface, ArrayInterface, SizeInterface, DictionaryIteratorInterface, IterableInterface and, for compatibility, GenObject.
Some functions of DictionaryInterface replace older ones from the former GenObject and AttributedObject APIs:
getProperty()
has several variants, either using a template (typed) parameter, either using a generic ObjectsetProperty()
with several variants (same as for getProperty() )hasProperty()
removeProperty()
copyProperties()
clearProperties()
old AttributedObject era and API:
getAttribute()
is replaced by getProperty( string, T )
setAttribute()
is replaced by setProperty( string, T )
hasAttribute()
is replaced by hasProperty()
deleteAttribute()
is replaced by removeProperty()
copyAttributes()
is replaced by copyProperties()
deleteAttributes()
is replaced by clearProperties()
getAttributes()
has no equivalent in the new API but is not really neededcheck()
has not been reimplemented but was used only in IOAttributedObject is now a typedef to SyntaxedObject<Dictionary>
old GenObject era and API:
operator []
is not provided anymore because of the ambiguities it could cause. Use getProperty()
instead.count()
is now size()
(SizeInterface)getNumber()
is now getScalar()
(ScalarInterface)keys()
has not been reimplementedOnce again, GenObject and AttributedObject don't exist anymore.