I'm having a long day I guess...I forgot to put in anything using the
heterogeneous adaptor, the code given before doesn't make any
sense...forget my last two posts and see below instead. I'll repeat my
comments also...
I put together a simple example below. I have used a querying library that
returns results in a similar fashion.
// Define some classes
class Paper {//...};
class Notepad {//...};
class Folder {//...};
class Trash {//...};
class Cookie {//...};
class Candy {//...};
class Stapler {//...};
class Coin {//...};
class database
{
public:
enum class OBJECT_TYPES { PAPER, NOTEPAD, FOLDER, TRASH, COOKIE,
CANDY, STAPLER, COIN };
bool peek()
{
return index >= data.size() ? false : true;
}
OBJECT_TYPES type()
{
return types_[index];
}
template<typename T>
T* next()
{
return static_cast