00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #include"chain_option.h"
00019 namespace cpsp{
00020
00021 namespace scth{
00022 SideChainOptions::SideChainOptions()
00023 : Output(NORMAL)
00024 , Draw(false)
00025 , BreakSym(true)
00026 , withOutput(true)
00027 , verbose(false)
00028 , SolutionsNum(1)
00029 , coreDB(NULL)
00030 , Sequence(NULL)
00031 , Description(NULL)
00032 , JmlHome(NULL)
00033 , ViewerHome(NULL)
00034 {
00035
00036 char * jPath;
00037 jPath=getenv ("JMOL_HOME");
00038 if(jPath!=NULL){
00039 JmlHome=new std::string(jPath);
00040 }
00041 }
00042
00043
00044 SideChainOptions::SideChainOptions(const SideChainOptions &rhs)
00045 : Output(rhs.Output)
00046 , Draw(rhs.Draw)
00047 , BreakSym(rhs.BreakSym)
00048 , withOutput(rhs.withOutput)
00049 , verbose(rhs.verbose)
00050 , SolutionsNum(rhs.SolutionsNum)
00051 , coreDB(rhs.coreDB)
00052 , Sequence(NULL)
00053 , Description(NULL)
00054 , JmlHome(NULL)
00055 , ViewerHome(NULL)
00056 {
00057
00058 if(rhs.Sequence!=NULL)
00059 this->Sequence=new std::string(*(rhs.Sequence));
00060 if(rhs.Description!=NULL)
00061 this->Description=new std::string(*(rhs.Description));
00062 if(rhs.JmlHome!=NULL)
00063 this->Description=new std::string(*(rhs.JmlHome));
00064 if(rhs.ViewerHome!=NULL)
00065 this->Description=new std::string(*(rhs.ViewerHome));
00066 }
00067
00068 SideChainOptions::~SideChainOptions(){
00069 if (Description != NULL) delete(Description);
00070 Description=NULL;
00071 if (Sequence != NULL) delete(Sequence);
00072 Sequence=NULL;
00073 if (JmlHome != NULL) delete(JmlHome);
00074 JmlHome=NULL;
00075 if (ViewerHome != NULL) delete(ViewerHome);
00076 ViewerHome=NULL;
00077 }
00078
00079 }
00080 }