Main Page | Class Hierarchy | Compound List | File List | Compound Members

BxArrayVariable.h

00001 // ##################################################################
00002 // Binx
00003 // $Id: BxArrayVariable_8h-source.html,v 1.1.1.1 2006/04/19 14:19:02 edikt2 Exp $
00004 //
00005 // Class for variable-sized arrays.
00006 // ##################################################################
00007 /*
00008 
00009 //  edikt::BinX
00010 //  www.edikt.org
00011 //  support@edikt.org
00012 
00013 // Copyright (c) 2004 The University of Edinburgh.
00014 
00015 */
00016 
00017 #ifndef __BxArrayVariable__
00018 #define __BxArrayVariable__
00019 
00020 #include "BxArray.h"
00021 
00049 class DECLSPEC BxArrayVariable : public BxArray
00050 {
00051     BxDataObject * sizeObject_; //<data object for the last dim of array containing value and type
00052     bool    bSizeObjectRead_; //<whether sizeObject_ is loaded from the file
00053 public:
00054     BxArrayVariable();
00055     BxArrayVariable(int dim);
00056     BxArrayVariable(const BxArrayVariable& copy);
00057     virtual ~BxArrayVariable();
00058 
00059     virtual char* className() const { return "BxArrayVariable"; }
00060     virtual BxArrayVariable* clone() const;
00061     virtual void resize();
00062     virtual void setBinaryFilePtr(BxBinaryFile* fp);
00063     virtual bool toStream(FILE*);
00064     virtual bool toStreamBinary(FILE*);
00065 
00066         // Write out the binary data with the specified byte order
00067     virtual bool toStreamBinary(FILE*, BxByteOrder);
00068     virtual void readFromBuffer(const byte * buf);
00069     virtual bool readFromFile();
00070 
00071     void setSizeObject(BxDataObject * sizeObj);
00072     BxDataObject * getSizeObject() const { return sizeObject_; }
00073     void readSizeObject(const byte * buf);
00074 
00075     virtual BxDataObject * get(int index);    //one-dimensional access
00076     virtual BxDataObject * getNext();   //flat visit of cells
00077 };
00078 
00079 #endif
00080 

Generated on Fri May 6 13:36:17 2005 for edikt::BinX by doxygen 1.3.3