|  | 
|  | DirTree () | 
|  | constructor  More... 
 | 
|  | 
| void | clear () | 
|  | clear all entries, leaving only a root entries  More... 
 | 
|  | 
| void | setRootType (bool pc=true) | 
|  | set the root to a mac/pc root  More... 
 | 
|  | 
| bool | hasRootTypePc () const | 
|  | returns true if it is a pc file  More... 
 | 
|  | 
| unsigned | count () const | 
|  | returns the number of entries  More... 
 | 
|  | 
| const DirEntry * | entry (unsigned ind) const | 
|  | returns the entry with a given index  More... 
 | 
|  | 
| DirEntry * | entry (unsigned ind) | 
|  | returns the entry with a given index  More... 
 | 
|  | 
| DirEntry * | entry (const std::string &name) | 
|  | returns the entry with a given name  More... 
 | 
|  | 
| unsigned | index (const std::string &name, bool create=false) | 
|  | given a fullname (e.g "/ObjectPool/_1020961869"), find the entry  More... 
 | 
|  | 
| unsigned | find_child (unsigned ind, const std::string &name) const | 
|  | tries to find a child of ind with a given name  More... 
 | 
|  | 
| std::vector< std::string > | getSubStreamList (unsigned ind=0, bool retrieveAll=false) | 
|  | returns the list of ind substream  More... 
 | 
|  | 
| void | load (unsigned char *buffer, unsigned len) | 
|  | tries to read the different entries  More... 
 | 
|  | 
| void | setInRedBlackTreeForm () | 
|  | check/update so that the sibling are store with a red black tree  More... 
 | 
|  | 
| unsigned | saveSize () const | 
|  | return space required to save a dir entry  More... 
 | 
|  | 
| void | save (unsigned char *buffer) const | 
|  | save the list of direntry in buffer  More... 
 | 
|  | 
|  | 
| std::vector< unsigned > | get_siblings (unsigned ind) const | 
|  | returns a list of siblings corresponding to a node  More... 
 | 
|  | 
| void | get_siblings (unsigned ind, std::set< unsigned > &seens) const | 
|  | constructs the list of siblings ( by filling the seens set )  More... 
 | 
|  | 
| void | getSubStreamList (unsigned ind, bool all, const std::string &prefix, std::vector< std::string > &res, std::set< unsigned > &seen, bool isRoot=false) const | 
|  | returns a substream list  More... 
 | 
|  | 
| void | setInRedBlackTreeForm (unsigned id, std::set< unsigned > &seen) | 
|  | check that the subtrees of index is a red black tree, if not rebuild it  More... 
 | 
|  | 
| unsigned | setInRBTForm (std::vector< unsigned > const &childList, unsigned firstInd, unsigned lastInd, unsigned height) | 
|  | rebuild all the childs m_left, m_right index as a red black tree, returns the root index.  More... 
 | 
|  | 
◆ DirTree() [1/2]
  
  | 
        
          | libwps_OLE::DirTree::DirTree | ( |  | ) |  |  | inline | 
 
 
◆ DirTree() [2/2]
  
  | 
        
          | libwps_OLE::DirTree::DirTree | ( | const DirTree & |  | ) |  |  | private | 
 
 
◆ clear()
      
        
          | void libwps_OLE::DirTree::clear | ( |  | ) |  | 
      
 
clear all entries, leaving only a root entries 
Referenced by DirTree().
 
 
◆ count()
  
  | 
        
          | unsigned libwps_OLE::DirTree::count | ( |  | ) | const |  | inline | 
 
 
◆ entry() [1/3]
  
  | 
        
          | DirEntry* libwps_OLE::DirTree::entry | ( | const std::string & | name | ) |  |  | inline | 
 
returns the entry with a given name 
 
 
◆ entry() [2/3]
  
  | 
        
          | DirEntry* libwps_OLE::DirTree::entry | ( | unsigned | ind | ) |  |  | inline | 
 
returns the entry with a given index 
 
 
◆ entry() [3/3]
  
  | 
        
          | const DirEntry* libwps_OLE::DirTree::entry | ( | unsigned | ind | ) | const |  | inline | 
 
 
◆ find_child()
  
  | 
        
          | unsigned libwps_OLE::DirTree::find_child | ( | unsigned | ind, |  
          |  |  | const std::string & | name |  
          |  | ) |  | const |  | inline | 
 
tries to find a child of ind with a given name 
 
 
◆ get_siblings() [1/2]
  
  | 
        
          | std::vector<unsigned> libwps_OLE::DirTree::get_siblings | ( | unsigned | ind | ) | const |  | inlineprotected | 
 
 
◆ get_siblings() [2/2]
  
  | 
        
          | void libwps_OLE::DirTree::get_siblings | ( | unsigned | ind, |  
          |  |  | std::set< unsigned > & | seens |  
          |  | ) |  | const |  | inlineprotected | 
 
constructs the list of siblings ( by filling the seens set ) 
 
 
◆ getSubStreamList() [1/2]
  
  | 
        
          | void libwps_OLE::DirTree::getSubStreamList | ( | unsigned | ind, |  
          |  |  | bool | all, |  
          |  |  | const std::string & | prefix, |  
          |  |  | std::vector< std::string > & | res, |  
          |  |  | std::set< unsigned > & | seen, |  
          |  |  | bool | isRoot = false |  
          |  | ) |  | const |  | protected | 
 
 
◆ getSubStreamList() [2/2]
  
  | 
        
          | std::vector<std::string> libwps_OLE::DirTree::getSubStreamList | ( | unsigned | ind = 0, |  
          |  |  | bool | retrieveAll = false |  
          |  | ) |  |  |  | inline | 
 
 
◆ hasRootTypePc()
  
  | 
        
          | bool libwps_OLE::DirTree::hasRootTypePc | ( |  | ) | const |  | inline | 
 
 
◆ index()
      
        
          | unsigned libwps_OLE::DirTree::index | ( | const std::string & | name, | 
        
          |  |  | bool | create = false | 
        
          |  | ) |  |  | 
      
 
 
◆ load()
      
        
          | void libwps_OLE::DirTree::load | ( | unsigned char * | buffer, | 
        
          |  |  | unsigned | len | 
        
          |  | ) |  |  | 
      
 
tries to read the different entries 
 
 
◆ operator=()
◆ save()
  
  | 
        
          | void libwps_OLE::DirTree::save | ( | unsigned char * | buffer | ) | const |  | inline | 
 
save the list of direntry in buffer 
 
 
◆ saveSize()
  
  | 
        
          | unsigned libwps_OLE::DirTree::saveSize | ( |  | ) | const |  | inline | 
 
return space required to save a dir entry 
 
 
◆ setInRBTForm()
  
  | 
        
          | unsigned libwps_OLE::DirTree::setInRBTForm | ( | std::vector< unsigned > const & | childList, |  
          |  |  | unsigned | firstInd, |  
          |  |  | unsigned | lastInd, |  
          |  |  | unsigned | height |  
          |  | ) |  |  |  | protected | 
 
rebuild all the childs m_left, m_right index as a red black tree, returns the root index. 
- Note
- : this function supposes that the childs list is already sorted 
 
 
◆ setInRedBlackTreeForm() [1/2]
  
  | 
        
          | void libwps_OLE::DirTree::setInRedBlackTreeForm | ( |  | ) |  |  | inline | 
 
check/update so that the sibling are store with a red black tree 
 
 
◆ setInRedBlackTreeForm() [2/2]
  
  | 
        
          | void libwps_OLE::DirTree::setInRedBlackTreeForm | ( | unsigned | id, |  
          |  |  | std::set< unsigned > & | seen |  
          |  | ) |  |  |  | protected | 
 
check that the subtrees of index is a red black tree, if not rebuild it 
 
 
◆ setRootType()
      
        
          | void libwps_OLE::DirTree::setRootType | ( | bool | pc = true | ) |  | 
      
 
 
◆ m_entries
  
  | 
        
          | std::vector<DirEntry> libwps_OLE::DirTree::m_entries |  | private | 
 
 
The documentation for this class was generated from the following file: