#include <alphabet_mapper.h>
+alphabet_mapper::alphabet_mapper() {
+ user_count=0;
+}
+
+void alphabet_mapper::use() {
+ user_count++;
+}
+
+void alphabet_mapper::unuse() {
+ user_count--;
+ if(user_count==0)
+ delete this;
+}
+
alphabet_mapper * alphabet_mapper::load(FILE *fp) {
uint rd;
if(fread(&rd,sizeof(uint),1,fp)!=1) return NULL;
fseek(fp,-1*sizeof(uint),SEEK_CUR);
switch(rd) {
case ALPHABET_MAPPER_NONE_HDR: return alphabet_mapper_none::load(fp);
+ case ALPHABET_MAPPER_CONT_HDR: return alphabet_mapper_cont::load(fp);
}
return NULL;
}