ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/gclib/gclib/gff.h
(Generate patch)
# Line 136 | Line 136
136        ftype=NULL;
137        fstart=0;
138        fend=0;
139 +      strand=0;phase=0;
140 +      llen=0;score=0;
141        info=NULL;
142        _parents=NULL;
143        _parents_len=0;
# Line 223 | Line 225
225     int idx;
226   public:
227     char* name;
228 <   GffNameInfo() { name=NULL; idx=-1; }
229 <   GffNameInfo(const char* n) {
228 <     name=Gstrdup(n);
228 >   GffNameInfo(const char* n=NULL):idx(-1),name(NULL) {
229 >     if (n) name=Gstrdup(n);
230       }
231  
232     ~GffNameInfo() {
# Line 253 | Line 254
254       byName.shkAdd(f->name,f);
255       }
256   public:
257 < GffNameList():GList<GffNameInfo>(false,true,true), byName(false) {
257 > GffNameList(int init_capacity=6):GList<GffNameInfo>(init_capacity, false,true,true), byName(false) {
258      idlast=-1;
259 +    setCapacity(init_capacity);
260      }
261   char* lastNameUsed() { return idlast<0 ? NULL : Get(idlast)->name; }
262   int lastNameId() { return idlast; }
# Line 266 | Line 268
268  
269   int addName(const char* tname) {//returns or create an id for the given name
270     //check idlast first, chances are it's the same feature name checked
271 <   if (idlast>=0 && strcmp(fList[idlast]->name,tname)==0)
272 <       return idlast;
271 >   /*if (idlast>=0 && strcmp(fList[idlast]->name,tname)==0)
272 >       return idlast;*/
273     GffNameInfo* f=byName.Find(tname);
274     int fidx=-1;
275     if (f!=NULL) fidx=f->idx;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines