-
The coding and design conventions (CDC) document was also updated.
-
Initially, there was a unlogic relation between GModels and GOptimizerPars, where GModels derives from GOptimizerPars, but both classes contained different types of objects. GModels is a model container, while GOptimizerPars is a parameter container. Now, GModels derives directly from GContainer and no longer from GOptimizerPars. The GModels::pars() method has been added to extract a flat array of model parameter pointers into a GOptimizerPars object. GOptimizerPars, which was abstract before, is now a real container class that also derives from GContainer.
-
The node array class now derives from the container base class. All typical container methods, such as at(), size(), isempty(), append(), insert(), remove(), reserve() and extend() are now implemented. Unit tests have been added to check the functionnality. The Python interface now implements the __len__ method on the GContainer class level. This allows to determine container sizes using the len() function. The __len__ method is now obsolete in the derived classes and thus has been removed.
-
The const at() method is ignored by swig anyway, as Python has no const declaration. The __str()__() extension is now implemented in the GBase base class, so we don't need to implement it again for the derived class.
-
…d Doxygen documentation for class with examples. The index access operators [] have now be placed inline so that faster code can be generated (as the index operator does not index checking it is now pretty short code). The hasmodel() methods should semantically be named contains() (in general, a container should always have the contains() method to check for names). The Doxygen documentation of the class has been enhanced, adding usage example to the general description.
-
The at() methods provide model access by index with index validity checking. The hasmodel() method checks whether a model with a given name exists in the container.
-
Checks for pointer validity are not needed, as pointers should be always valid by construction.
-
This reverts commit 813252eb589e317fd139d0cdde4f20bdd7959ef2.
-
This reverts commit 813252eb589e317fd139d0cdde4f20bdd7959ef2.
-
The GModels model access operator[] now returns a reference instead of a pointer. This needed a couple of minor adjustments of the code.
-
The container class method name pop() was changed to remove() to be complatible with the Python syntax for lists.
-
GModels derives from GOptimizerPars, which is now a container class. GModels needs therefore to implement all container class methods. Methods have been added to insert and remove models, and to extend the model container by another model container.
-
The GModelPointSource, GModelExtendedSource and GModelDiffuseSource classes have been removed and are now replaced by GModelSky.
-
The set method now takes a pointer instead of a reference. This allows assignment of a NULL pointer to the list of pointers in the container.
-
The GModel access operator now returns a simple GModel pointer, hence it cannot be used as an lvalue anymore. This is required to proteced the class from code slicing or memory leaks. Setting of GModel elements is now achieved by the set methods. Two variants have been implemented, one taking an index, the other taking a model name.
-
The GModel access operator returns now a reference to a pointer instead of a reference. This allows proper assignment in C++ using constructs such as m[0] = &model;. Also in Python assignment is now possible. For the Python interface we selected to make a deep copy to get a behavior that is compliant with Python list access.
-
An output typemap has been added that performs automatic type casting of GModel to either GModelSky or GModelData. This makes the cast_GSkyModel function obsolete.
-
…val() and eval_gradients() const