Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

vdbdata.hpp

Go to the documentation of this file.
00001 //************************************************************************************//
00002 // Module       : vdbdata.hpp
00003 // Date         : 8/4/03 (DLR)
00004 // Copyright    : 2003-2006 Copyright University Corporation for Atmospheric
00005 //                Research
00006 // Description  : Encapsulates the access methods and data associated with
00007 //                defining a GASpAR voxel database record 
00008 // Derived From : none.
00009 // Modifications:
00010 //************************************************************************************//
00011 #if !defined(GVDBDATA_HPP)
00012 #define GVDBDATA_HPP
00013 
00014 #include "gtypes.h"
00015 #include <iostream.h>
00016 #include <stdlib.h>
00017 #include "point.hpp"
00018 
00019 class VDBData
00020 {
00021 public:
00022 
00023                            VDBData();
00024                           ~VDBData();
00025 
00026 inline   GKEY              &key() {                            // Get key data
00027   return key_; }
00028 inline   GKEY              &hostkey() {                        // Get host element key; 
00029   return hostkey_; }
00030 inline   GKEY              &hostrootkey() {                    // Get host element root key; 
00031   return hostrootkey_; }
00032 inline   GINT              &localid() {                        // Get local id for point; 
00033   return localid_; }
00034 inline   GINT              &hostid() {                         // Get host element id; 
00035   return hostid_; }
00036 inline   Point3D           &point() {                          // Get geom. point data
00037   return xPt_; }
00038 inline   GSHORT             &proc() {                           // Get proc id data
00039   return proc_; }
00040 inline   GINT              &ancillary() {                      // Get ancillary data
00041   return ancillary_; }
00042          friend ostream&   operator<<(ostream&, VDBData &);    // Output stream operator
00043 
00044   inline GBOOL             operator==(VDBData &p) 
00045   { return ( key_   ==p.key_    && hostkey_==p.hostkey_ && hostrootkey_==p.hostrootkey_
00046           && hostid_==p.hostid_ && localid_==p.localid_ && xPt_        ==p.xPt_ 
00047           && proc_  ==p.proc_ && ancillary_==p.ancillary_ ); }
00048 
00049   inline GBOOL             operator!=(VDBData &p) 
00050   { return (!this->operator==(p)); }
00051 
00052   inline VDBData           operator=(VDBData &p) 
00053   { key_   =p.key_    ; hostkey_=p.hostkey_ ; hostrootkey_=p.hostrootkey_;
00054     hostid_=p.hostid_ ; localid_=p.localid_ ; xPt_        =p.xPt_; 
00055     proc_  =p.proc_ ; ancillary_=p.ancillary_; return *this; }
00056 
00057 private:
00058 
00059          // Member data:
00060          GKEY              key_;
00061          GKEY              hostkey_;
00062          GKEY              hostrootkey_;
00063          GINT              hostid_;
00064          GINT              localid_;
00065          GINT              ancillary_;
00066          Point3D           xPt_;                                            
00067          GSHORT             proc_;
00068 
00069 };
00070 
00071 #endif

Generated on Wed Dec 21 16:00:49 2005 for Geophysics & Astrophysics Spectral Element Adaptive Refinement (GASpAR) 2D Code by  doxygen 1.4.4