Template Class DerivedClass¶
Defined in File DerivedClass.h
Inheritance Relationships¶
Base Type¶
public arbitrary::BaseClass
(Class BaseClass)
Template Parameter Order¶
typename T
unsigned int N
Class Documentation¶
-
template<typename T, unsigned int N>
class DerivedClass : public arbitrary::BaseClass¶ A derivation class of BaseClass serving as an extremely rudimentary array wrapper.
- Template Parameters
T – The type of data we are storing.
N – The number of
T
data we are storing.
Public Functions
-
inline DerivedClass()¶
Initializes the BaseClass field BaseClass::some_data to be the template parameter
N
.
-
inline virtual ~DerivedClass()¶
The default destructor; does nothing.
-
inline virtual void virtualMethod()¶
Advances the printing index of this DerivedClass.
Prints a message to the console indicating what
current_index
is, and then increasescurrent_index
by one, wrapping around to0
ifcurrent_index >= N
.
-
inline bool insertAt(T &item, unsigned int index)¶
Inserts
item
andindex
if it is a valid item to add, and a valid index.A valid index is in the range
[0, N)
whereN
is the second template parameter of the class. A valid index is also, for some arbitrary reason, one that has not already been set by a previous call. A validitem
is anything that is not stillnullptr
from the constructor initialization.- Parameters
item – The next item you want to store.
index – The index you would like to store
item
at.
- Returns
Whether or not this DerivedClass had it’s internal storage modified.