ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/gclib/gclib/gff.h
(Generate patch)
# Line 235 | Line 235
235     bool operator==(GffNameInfo& d){
236         return (strcmp(this->name, d.name)==0);
237         }
238   bool operator>(GffNameInfo& d){
239      return (strcmp(this->name, d.name)>0);
240      }
238     bool operator<(GffNameInfo& d){
239       return (strcmp(this->name, d.name)<0);
240       }
# Line 256 | Line 253
253       byName.shkAdd(f->name,f);
254       }
255   public:
256 < GffNameList():GList<GffNameInfo>(false,true,true), byName(false) {
256 > GffNameList(int init_capacity=6):GList<GffNameInfo>(init_capacity, false,true,true), byName(false) {
257      idlast=-1;
258 +    setCapacity(init_capacity);
259      }
260   char* lastNameUsed() { return idlast<0 ? NULL : Get(idlast)->name; }
261   int lastNameId() { return idlast; }
# Line 269 | Line 267
267  
268   int addName(const char* tname) {//returns or create an id for the given name
269     //check idlast first, chances are it's the same feature name checked
270 <   if (idlast>=0 && strcmp(fList[idlast]->name,tname)==0)
271 <       return idlast;
270 >   /*if (idlast>=0 && strcmp(fList[idlast]->name,tname)==0)
271 >       return idlast;*/
272     GffNameInfo* f=byName.Find(tname);
273     int fidx=-1;
274     if (f!=NULL) fidx=f->idx;
# Line 1023 | Line 1021
1021    //void gfoRemove(const char* id, const char* ctg);
1022    GfoHolder* gfoAdd(GffObj* gfo, int idx);
1023    GfoHolder* gfoAdd(GVec<GfoHolder>& glst, GffObj* gfo, int idx);
1024 <  GfoHolder* gfoFind(const char* id, const char* ctg=NULL, char strand=0, uint start=0,
1025 <                                                             GVec<GfoHolder>** glst = NULL);
1024 >  // const char* id, const char* ctg, char strand, GVec<GfoHolder>** glst, uint start, uint end
1025 >  GfoHolder* gfoFind(const char* id, const char* ctg=NULL, GVec<GfoHolder>** glst=NULL,
1026 >                                                 char strand=0, uint start=0, uint end=0);
1027    CNonExon* subfPoolCheck(GffLine* gffline, GHash<CNonExon>& pex, char*& subp_name);
1028    void subfPoolAdd(GHash<CNonExon>& pex, GfoHolder* newgfo);
1029    GfoHolder* promoteFeature(CNonExon* subp, char*& subp_name, GHash<CNonExon>& pex,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines