The Secondary Structure List Classes are:
/* Link list for SStruc */
public:
LListOfSS *_next;
SStruc *_sstruc;
LListOfSS(){_sstruc=NULL; _next=NULL;}
virtual ~LListOfSS(){};
LListOfSS *NextLListOfSS(){return _next;}
#if NEED_OBJECTSTORE
static os_typespec *get_os_typespec();
#endif
};
/* Double link list for SubEntity */
public:
DLlistOfSS *_previous;
DLlistOfSS(){_previous=NULL;}
DLlistOfSS *NextDLlistOfSS(){return (DLlistOfSS*)_next;}
DLlistOfSS *PreviousDLlistOfSS(){return _previous;}
void InsertBefore(DLlistOfSS*);
void AddAfter(DLlistOfSS*);
#if NEED_OBJECTSTORE
static os_typespec *get_os_typespec();
#endif
};
public:
PARALLELISM _parallelism; /* 0: undefine, 1: parallel, -1:antiparallel */
HydroBond *_hydrobond;
SSConnectivity *_ssConnectivity;
SSConnectionElement(){
_parallelism=UNDEFINED;
_ssConnectivity=0;
_hydrobond=0;
}
SSConnectionElement *NextSSConnectionElement(){
return (SSConnectionElement*)_next;
}
HydroBond * MyHydroBond(){ return _hydrobond; }
PARALLELISM MyParallelism(){return _parallelism;}
#if NEED_OBJECTSTORE
static os_typespec *get_os_typespec();
#endif
};
public:
SSConnectionElement *_connectionList;
SSConnectivity(){_connectionList=NULL;}
~SSConnectivity();
LListOfSS * ConnectedSecondarystrucs(){return _connectionList;}
SSConnectionElement* ConnectedSSConnectionElement(){return _connectionList;}
SSConnectivity *NextSSConnectivity(){return (SSConnectivity*)_next;}
SSConnectivity * PreviousSSConnectivity(){
return (SSConnectivity*)_previous;
}
SSConnectionElement* FindSSConnectionElement(SStruc*);
void AddConnection(SSConnectivity*, HydroBond*, PARALLELISM);
#if NEED_OBJECTSTORE
static os_typespec *get_os_typespec();
#endif
};
friend class SStrucIter;
friend class SStrucSEIter;
protected:
SStruc *_sstruc;
operator const void * () const {return _sstruc ? this : NULL;}
SStruc & operator()(){return *_sstruc;}
SSList(){_sstruc=0;}
virtual void operator++()=0;
virtual void operator--()=0;
virtual void ResetToTop()=0;
virtual void ResetToEnd()=0;
virtual SSList *CopyOfSelf() const =0;
public:
virtual ~SSList();
virtual void AddSStruc(SStruc*)=0;
};
friend class SStrucSEIter;
private:
SStruc *_head;
SStruc *_tail;
void operator++();
void operator--();
void ResetToTop(){_sstruc=_head;}
void ResetToEnd();
SSList *CopyOfSelf() const { return new LinearSSList(this);}
/****
return NEW_SEG(LIST_SEG,LinearSSList::get_os_typespec(),
1,LinearSSList(this))
}
***/
public:
LinearSSList(){_head=_tail=NULL;}
LinearSSList(SStruc *s1, SStruc *s2 =NULL){_head=s1;_tail=s2;}
LinearSSList(const LinearSSList * l){
if (l){
_head=l->_head;
_tail=l->_tail;
}
}
void AddSStruc(SStruc*);
void AddSStrucSE(SStrucSE*);
#if NEED_OBJECTSTORE
static os_typespec *get_os_typespec();
#endif
};
int _myOwnList; // set to 1 if the double link list should
// be destroyed by the current manager.
protected:
DLlistOfSS *_head, *_current; /* SSConnectivity for Sheet */
void operator++();
void operator--();
void ResetToTop();
void ResetToEnd();
SSList * CopyOfSelf() const { return new NonLinearSSList(this);}
/***
return NEW_SEG(LIST_SEG,NonLinearSSList::get_os_typespec(),
1,NonLinearSSList(this))
}
***/
public:
NonLinearSSList(){_myOwnList=1; _head=_current=NULL;}
NonLinearSSList( const NonLinearSSList *list){
_myOwnList=0;
if (list){
_head=list->_head;
_current=NULL;
}
else _head=_current=NULL;
}
~NonLinearSSList();
void AddSStruc(SStruc*);
// void AddSStrucSE(SStrucSE*);
virtual DLlistOfSS *new_DLlistOfSS(){ // return new DLlistOfSS;}
return NEW_SEG(LIST_SEG,DLlistOfSS::get_os_typespec(),
1,DLlistOfSS)
}
LListOfSS * ListOfSStrucs(){return _head;}
#if NEED_OBJECTSTORE
static os_typespec *get_os_typespec();
#endif
};
public:
LListOfSSConn(){ // _head=new SSConnectivity;}
_head = NEW_SEG(LIST_SEG,SSConnectivity::get_os_typespec(),
1,SSConnectivity)
}
LListOfSSConn(const LListOfSSConn * lst) : NonLinearSSList(lst) {}
void AddConnection(SStrucSE*, SStrucSE*, HydroBond*, PARALLELISM);
DLlistOfSS *new_DLlistOfSS(){ // return new SSConnectivity;}
return NEW_SEG(LIST_SEG,SSConnectivity::get_os_typespec(),
1,SSConnectivity)
}
SSConnectivity * FindSSConnectivity(SStrucSE*);
SSConnectivity * FindSSConnectivity(char*);
SSConnectivity * MyLListOfSSConnectivity(){return (SSConnectivity*)_head;}
void Merge(LListOfSSConn*);
#if NEED_OBJECTSTORE
static os_typespec *get_os_typespec();
#endif
};
Currently under Heavy Construction, please excuse the mess
jcooper@cuhhca.hhmi.columbia.edu