This change adds a ResizeableIntegerVariable. There are also a number of refactors to keep validation consistent between the variable types...
On the R side
We now have interfaces which do validation and then call C++ methods:
VariableInterface, does validation of methods for all variables
IntegerInterface, does validation for double methods
DoubleInterface, does validation for integer methods
ResizeableInterface, does validation for resizing methods
Variable classes are proxies to as many of these interfaces as they need.
e.g. DoubleVariable uses VariableInterface and DoubleInterface
e.g.2. ResizeableIntegerVariable uses VariableInterface, IntegerInterface and ResizeableInterface
I've copied the relevant tests for each proxy class to make sure it works in practice
On the C++ side
ResizeableDoubleVariable is now a template class ResizeableNumericVariable<T>. The same functionality is provided by ResizeableNumericVariable<double>.
ResizeableIntegerVariable provides extra methods to ResizeableNumericVariable<int> for set indexing (get_index_of_set, get_size_of_set...).
For resizeable variable updates, we have moved from object oriented inheritance to type erasure. Let me know what you think of changes like this (maybe you have an opinion on this @richfitz ?). The classes used virtual tables, which cannot combine with templates :/
~To be reviewed after #159~
This change adds a ResizeableIntegerVariable. There are also a number of refactors to keep validation consistent between the variable types...
On the R side
We now have interfaces which do validation and then call C++ methods:
Variable classes are proxies to as many of these interfaces as they need.
e.g. DoubleVariable uses VariableInterface and DoubleInterface e.g.2. ResizeableIntegerVariable uses VariableInterface, IntegerInterface and ResizeableInterface
I've copied the relevant tests for each proxy class to make sure it works in practice
On the C++ side
ResizeableDoubleVariable
is now a template classResizeableNumericVariable<T>
. The same functionality is provided byResizeableNumericVariable<double>
.ResizeableIntegerVariable
provides extra methods toResizeableNumericVariable<int>
for set indexing (get_index_of_set, get_size_of_set...).For resizeable variable updates, we have moved from object oriented inheritance to type erasure. Let me know what you think of changes like this (maybe you have an opinion on this @richfitz ?). The classes used virtual tables, which cannot combine with templates :/