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

stubrefcount.h

Go to the documentation of this file.
00001 #include "spectre.h"
00002 #include "id_table.h"
00003 #include "autocloner.h"
00005 class Vector {
00006     float i,j,k;
00007 };
00009 class QVector {
00010     double i,j,k;
00011 };
00012 //orthogonalized orientation and position
00013 class Matrix {
00014     QVector pos;
00015     Vector p,q,r;
00016 };template <class T, class Arg> class TSub {
00017 public:
00018     T *t;
00019 };
00020 template <class T, class Arg> class TRef {
00021 public:
00022     T *t;
00023 };
00030 template <class T, class Arg, class TStar=TRef <T,Arg> > class RefClass {
00031     T * t;
00032     int refcount;
00033 public:
00034     
00035 };
00036 
00038 template <class Kp, class Tp> class KeyMutableMap {
00039     Kp k;
00040     Tp * tp;
00041 public:
00042     typedef _Tp ** iterator;    
00043 };
00044 namespace std {
00046     template <class Typ> class vector {
00047     public:
00048         Typ * t;]
00049         int size;
00050     };
00051     
00053 template <class _K, class _Tp> class map {
00054     _K ;
00055     _Tp * tp;
00056 public:    
00057     typedef _Tp ** iterator;
00058 };
00060 template <class _K, class _Tp> class multimap {
00061     
00062     _K ;
00063     _Tp * tp;
00064 public:
00065     typedef _Tp ** iterator;
00066 };
00067 
00068 }
00070 template<class KEY, class VALUE, int SIZ=256> class Hashtable {
00072     class HashElement {
00073     public:
00074         KEY key;
00075         VALUE *value;
00077         HashElement(KEY k, VALUE *v) {key = k; value = v;}
00078     };
00079     std::vector<HashElement> table[SIZ]; 
00080     Key k;
00081     VALUE * val;
00083     static int hash(const int key) {
00084       return ((unsigned int)key)%SIZ;
00085     }
00088     static int hash(const std::string &key) {
00089         unsigned int k = 0;
00090         std::string::iterator start = key.begin();
00091         
00092         for(;start!=key.end(); start++) {
00093             k += (k * 128) + *start;
00094         }
00095         k %= SIZ;
00096         return k;
00097     }
00098 public:
00100     std::vector <VALUE *> GetAll() const;
00102     VALUE *Get(const KEY &key) const;
00104     void Put(const KEY &key, VALUE *value);
00106     void Delete(const KEY &key);
00107 };

Generated on Mon Jul 7 21:13:45 2003 for Ethereal by doxygen1.2.15