ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/mdtools/headers/MakeStamps.hpp
Revision: 196
Committed: Thu Dec 5 21:37:51 2002 UTC (21 years, 7 months ago) by chuckv
File size: 2120 byte(s)
Log Message:

Working on the clean removal of key Molecule stamps from the Hash table.
stamps will be moved into a persitient linked list.

File Contents

# User Rev Content
1 mmeineke 10 #ifndef __MAKESTAMPS_H__
2     #define __MAKESTAMPS_H__
3    
4     #include <cstdlib>
5     #include <cstring>
6    
7     #include "BASS_interface.h"
8     #include "MoleculeStamp.hpp"
9     #include "AtomStamp.hpp"
10     #include "BondStamp.hpp"
11     #include "BendStamp.hpp"
12     #include "TorsionStamp.hpp"
13    
14     class LinkedMolStamp{
15    
16     public:
17 chuckv 196 LinkedMolStamp(){ mol_stamp = NULL; next = NULL; prev = NULL; }
18 mmeineke 10 ~LinkedMolStamp();
19    
20     MoleculeStamp* match( char* id );
21     void setStamp( MoleculeStamp* the_stamp ){ mol_stamp = the_stamp; }
22     MoleculeStamp* getStamp(){ return mol_stamp; }
23 chuckv 196 void add( LinkedMolStamp* newbie );
24     void setPrev( LinkedMolStamp* thePrev ){ prev = thePrev; }
25 mmeineke 10 LinkedMolStamp* getNext() { return next; }
26    
27     private:
28     MoleculeStamp* mol_stamp;
29     LinkedMolStamp* next;
30 chuckv 196 LinkedMolStamp* prev;
31 mmeineke 10 };
32    
33     class MakeStamps{
34    
35     public:
36     MakeStamps();
37     ~MakeStamps();
38    
39     int newMolecule( event* the_event );
40     int moleculeAssign( event* the_event );
41     int moleculeEnd( event* the_event );
42    
43     int newAtom( event* the_event );
44     int atomPosition( event* the_event );
45     int atomOrientation( event* the_event );
46     int atomAssign( event* the_event );
47     int atomEnd( event* the_event );
48    
49     int newBond( event* the_event );
50     int bondAssign( event* the_event );
51     int bondMember( event* the_event );
52     int bondConstraint( event* the_event );
53     int bondEnd( event* the_event );
54    
55     int newBend( event* the_event );
56     int bendAssign( event* the_event );
57     int bendMember( event* the_event );
58     int bendConstraint( event* the_event );
59     int bendEnd( event* the_event );
60    
61     int newTorsion( event* the_event );
62     int torsionAssign( event* the_event );
63     int torsionMember( event* the_event );
64     int torsionConstraint( event* the_event );
65     int torsionEnd( event* the_event );
66    
67     MoleculeStamp* getMolecule( char* the_id );
68    
69     private:
70    
71     static const int hash_size = 51;
72     static const int hash_shift = 4;
73     int hash( char* text );
74     LinkedMolStamp** my_mols;
75     void addMolStamp( MoleculeStamp* the_stamp );
76    
77     MoleculeStamp* current_mol;
78     AtomStamp* current_atom;
79     BondStamp* current_bond;
80     BendStamp* current_bend;
81     TorsionStamp* current_torsion;
82    
83    
84    
85    
86    
87     };
88    
89    
90    
91    
92     #endif