#ifndef COM_EXTENSIONS_COMMON_TEMPLATES_GROUP
#define COM_EXTENSIONS_COMMON_TEMPLATES_GROUP

/*****************************************************************************\
*                                                                             *
*  Name   : frequently useful templates                                       *
*  Author : Chris Koeritz                                                     *
*                                                                             *
*  Purpose:                                                                   *
*                                                                             *
*    Provides definitions of useful templated data structures.                *
*  As a result of all the template usages, this is a pretty heavy-weight      *
*  header and it should really only be used from implementation (.CPP) files  *
*                                                                             *
*******************************************************************************
* Copyright (c) 2000-$now By Author.  This program is free software; you can  *
* redistribute it and/or modify it under the terms of the GNU General Public  *
* License as published by the Free Software Foundation; either version 2 of   *
* the License or (at your option) any later version.  This is online at:      *
*     http://www.fsf.org/copyleft/gpl.html                                    *
* Please send any updates to: fred@gruntose.com                               *
\*****************************************************************************/

#include <basis/array.cpp>
#include <data_struct/matrix.cpp>

#include <comutil.h>

class variant_array : public array<_variant_t>
{
public:
  variant_array() : array<_variant_t>(0, NIL, EXPONE | FLUSH_INVISIBLE) {}
  variant_array(int number, const _variant_t *initial_contents)
          : array<_variant_t>(number, initial_contents,
                EXPONE | FLUSH_INVISIBLE) {}
    // creates an array of _variant_t objects based on an initial "number" of
    // entries and some "initial_contents", which should be a regular C array
    // of _variant_t with at least as many entries as "number".
};

////////////////////////////////////////////////////////////////////////////

//hmmm: add flags when matrix allows them to be passed in.
class variant_matrix : public matrix<_variant_t>
{
public:
  variant_matrix() : matrix<_variant_t>(0, 0, NIL) {}
  variant_matrix(int rows, int cols, _variant_t *initial_contents)
          : matrix<_variant_t>(rows, cols, initial_contents) {}
    // creates a matrix of _variant_t objects based on an initial "rows" by
    // "cols" of entries and some "initial_contents", which should be a regular
    // C array of _variant_t with at least as many entries as rows * cols.
};

#endif

