示例#1
0
 int getTagId (char * name) { 
     int id = m_tags == NULL ? -1 : m_tags->find (name);
     if (id < 0) {
         appendTag (new Tag (name, id = m_nbTags++, NULL));
     }
     return id;
 }
示例#2
0
 int find (char * name) {
     if (strcmp (name, m_name) == 0) {
         return m_id;
     } else if (m_next != NULL) {
         return m_next->find (name);
     } else {
         return -1;
     }
 }