Elaztek Developer Hub
Blamite Game Engine - Strings  00402.09.29.23.0627.blamite
A library containing general purpose utilities and classes for use in multiple projects.
BlamList< T > Class Template Reference

Class representing a list of objects. More...

#include <BlamList.h>

Public Member Functions

 BlamList (std::vector< T > _list)
 Creates a new BlamList based on an existing vector. More...
 
 BlamList ()
 Creates a new BlamList. More...
 
At (int index)
 Retrieves the item at the specified index. More...
 
int Size ()
 Retrieves the size of the list. More...
 
bool Contains (T item)
 Determines if the list contains an item. More...
 
bool IsOutOfRange (int index)
 Determines if the given index is out of range of the list. More...
 

Detailed Description

template<typename T>
class BlamList< T >

Class representing a list of objects.

Currently, this acts as just a simple wrapper around a std::vector to make a few things easier. However, in the future, it should be entirely feasible to do an entirely custom list implementation if we desire.

Template Parameters
T- The type of object to store within the list.

Constructor & Destructor Documentation

◆ BlamList() [1/2]

template<typename T >
BlamList< T >::BlamList ( std::vector< T >  _list)
inline

Creates a new BlamList based on an existing vector.

Parameters
_list- The list to wrap around.

◆ BlamList() [2/2]

template<typename T >
BlamList< T >::BlamList ( )
inline

Creates a new BlamList.

Member Function Documentation

◆ At()

template<typename T >
T BlamList< T >::At ( int  index)
inline

Retrieves the item at the specified index.

Parameters
index- The index of the desired item.
Returns
The item at the specified index.

◆ Contains()

template<typename T >
bool BlamList< T >::Contains ( item)
inline

Determines if the list contains an item.

Parameters
item- The item to look for.
Returns
true if the list contains the item, otherwise returns false.

◆ IsOutOfRange()

template<typename T >
bool BlamList< T >::IsOutOfRange ( int  index)
inline

Determines if the given index is out of range of the list.

Parameters
index- The index to check.
Returns
true if the index is out of range, otherwise returns false.

◆ Size()

template<typename T >
int BlamList< T >::Size ( )
inline

Retrieves the size of the list.

Returns
The size of the list.

The documentation for this class was generated from the following file: