/***************************************************************************
 *                          Zanoza Modeler v2.x                            *
 *      This is unpublished propietary source code of Zanoza Software.     *
 *      The copyright notice does not evidence any actual or intended      *
 *                    publication of such source code.                     *
 *                                                                         *
 *                   Copyright (c) 2002 Zanoza Software.                   *
 *                                                                         *
 *                        All rights reserved.                             *
 ***************************************************************************
 *--------------------------------------------------------------------------
 * @author:   Oleg M.
 *--------------------------------------------------------------------------
 * @purpose:  ZModeler 2.x blackbox class
 *--------------------------------------------------------------------------
 * @histroy: 09.01.2002. Created
 */
#ifndef zblackbox_h_included
#define zblackbox_h_included
#include "zsequence.h"
#include "zcollection.h"

class DLL_LINKAGE ZBlackBox : public ZUnknown
{
public:
  INTERFACE_FUNCTIONS_DEFAULT(ZBlackBox)
public:
  ZBlackBox();
  ~ZBlackBox();
  
  //---------------------
  //        status:
  //---------------------
  ZRESULT status();
public:
  //---------------------
  //      operations
  //---------------------
  void addLong    (long   value);
  void addDWORD   (DWORD  value);
  void addShort   (short  value);
  void addWORD    (WORD   value);
  void addChar    (char   value);
  void addBYTE    (BYTE   value);
  void addFloat   (float  value);
  void addVoid    (void*  ptr);
  void addString  (LPCTSTR pszStr);
  void addUnknown (ZUnknown* pUnk); //AddRef is performed on supplied parameter

  void reset();//resets iterators
  void clear();//clears content

  long      getLong(void);
  DWORD     getDWORD(void);
  short     getShort(void);
  WORD      getWORD(void);
  char      getChar(void);
  BYTE      getBYTE(void);
  float     getFloat(void);
  void*     getVoid(void);
  ZString   getString(void);
  ZUnknown* getUnknown(void);//AddRef does not performed on returned value


private:
  //---------------------
  //  data members
  //---------------------
  ZRESULT                   m_status;

  ZCollection<long>         m_colLong;
  ZCollection<short>        m_colShort;
  ZCollection<char>         m_colChar;
  ZCollection<ZString>      m_colString;
  ZCollection<float>        m_colFloat;
  ZCollection<void*>        m_colVoid;
  ZIntrCollection<ZUnknown> m_colUnks;

};

#endif //zblackbox_h_included

