ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-4/src/types/MakeStamps.hpp
(Generate patch)

Comparing trunk/OOPSE-4/src/types/MakeStamps.hpp (file contents):
Revision 1930 by gezelter, Wed Jan 12 22:41:40 2005 UTC vs.
Revision 2187 by tim, Wed Apr 13 18:41:17 2005 UTC

# Line 44 | Line 44
44  
45   #include <stdlib.h>
46   #include <string.h>
47 + #include <string>
48 + #include <map>
49  
50   #include "io/BASS_interface.h"
51   #include "types/MoleculeStamp.hpp"
# Line 54 | Line 56 | class LinkedMolStamp{
56   #include "types/RigidBodyStamp.hpp"
57   #include "types/CutoffGroupStamp.hpp"
58  
57 class LinkedMolStamp{
58
59 public:
60  LinkedMolStamp(){ mol_stamp = NULL; next = NULL; prev = NULL; }
61  ~LinkedMolStamp();
62  
63  MoleculeStamp* match( char* id );
64  LinkedMolStamp* extract( char* id );
65  void setStamp( MoleculeStamp* the_stamp ){ mol_stamp = the_stamp; }
66  MoleculeStamp* getStamp(){ return mol_stamp; }
67  void add( LinkedMolStamp* newbie );
68  void setPrev( LinkedMolStamp* thePrev ){ prev = thePrev; }
69  void setNext( LinkedMolStamp* theNext ){ next = theNext; }
70  LinkedMolStamp* getNext() { return next; }
71  
72 private:
73  MoleculeStamp* mol_stamp;
74  LinkedMolStamp* next;
75  LinkedMolStamp* prev;
76 };
77
59   class MakeStamps{
60  
61   public:
# Line 119 | Line 100 | class MakeStamps{ (public)
100    int torsionConstraint( event* the_event );
101    int torsionEnd( event* the_event );
102  
103 <  LinkedMolStamp* extractMolStamp( char* the_id );
103 >  MoleculeStamp* getMolStamp( std::string the_id );
104  
105   private:
106  
107 <  int hash_size;
127 <  int hash_shift;
128 <  int hash( char* text );
129 <  LinkedMolStamp** my_mols;
107 >  std::map<std::string, MoleculeStamp*> my_mols;
108    void addMolStamp( MoleculeStamp* the_stamp );
109  
110    MoleculeStamp* current_mol;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines