ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/FAS/src/elementfactory.cpp
Revision: 75
Committed: Wed Aug 14 21:51:27 2002 UTC (21 years, 10 months ago) by tim
File size: 1688 byte(s)
Log Message:
*** empty log message ***

File Contents

# Content
1 /* Copyright (C) 2002-2003 by Gezelter's Group
2 *This program is free software; you can redistribute it and/or modify
3 *it under the terms of the GNU General Public License as published by
4 *the Free Software Foundation version 2 of the License.
5 *
6 *This program is distributed in the hope that it will be useful,
7 *but WITHOUT ANY WARRANTY; without even the implied warranty of
8 *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9 *GNU General Public License for more details.
10 *
11 ************************************************************************
12 *Author: Teng Lin Email: tlin@nd.edu
13 *Date: 08/13/2002 Version: 1.0
14 *
15 ************************************************************************
16 *Description:
17 *
18 ***********************************************************************/
19 #include "elementfactory.h"
20 TFASAtom *TElementFactory::CreatAtom(int index)
21 {
22 return new TFASAtom(index);
23 }
24
25 TFASBond *TElementFactory::CreatBond(int index)
26 {
27 return new TFASBond(index);
28 }
29
30 TFASResidue *TElementFactory::CreatResidue(int index)
31 {
32 return new TFASResidue(index);
33 }
34
35 TFASMolecule *TElementFactory::CreatMolecule(int index)
36 {
37 return new TFASMolecule(index);
38 }
39
40 TExtraData *TElementFactory::CreatExtraData(int extraDataType)
41 {
42 switch (extraDataType)
43 {
44 case TExtraDataType::COMMENT:
45 // return new TCommentData();
46 break;
47 case TExtraDataType::ENERGY:
48 return new TEnergyData();
49 break;
50 case TExtraDataType::FORCE:
51 // return new TForceData();
52 break;
53 case TExtraDataType::ANGLE:
54 ;
55 break;
56 case TExtraDataType::UNKNOWN:
57 default:
58 return new TExtraData();
59 }
60 }