Exemplo n.º 1
0
bool EntryNav::loadEntry(FileStorage *storage)
{
  if (m_noLoad)
  {
    return TRUE;
  }
  if (m_offset==-1) 
  {
    //printf("offset not set!\n");
    return FALSE;
  }
  //delete m_info;
  //printf("EntryNav::loadEntry: new entry %p: %s\n",m_info,m_name.data());
  //m_info->tagInfo = m_tagInfo;
  //if (m_parent)
  //{
  //  m_info->parent = m_parent->m_info;
  //}
  //m_info->parent = 0;
  //printf("load entry: seek to %llx\n",m_offset);
  if (!storage->seek(m_offset)) 
  {
    //printf("seek failed!\n");
    return FALSE;
  }
  if (m_info)  delete m_info;
  m_info = unmarshalEntry(storage);
  m_info->name = m_name;
  m_info->type = m_type;
  m_info->section = m_section;
  return TRUE;
}
Exemplo n.º 2
0
Entry * unmarshalEntryTree(StorageIntf *s)
{
  Entry *e = unmarshalEntry(s);
  uint count = unmarshalUInt(s);
  uint i;
  for (i=0;i<count;i++)
  {
    e->addSubEntry(unmarshalEntryTree(s));
  }
  return e;
}