List of all members.
Detailed Description
Definition at line 17 of file directory.
Constructor & Destructor Documentation
inlib::rroot::directory::directory |
( |
ifile & |
a_file | ) |
[inline] |
virtual inlib::rroot::directory::~directory |
( |
| ) |
[inline, virtual] |
inlib::rroot::directory::directory |
( |
const directory & |
a_from | ) |
[inline, protected] |
Definition at line 40 of file directory.
:m_file(a_from.m_file){
#ifdef INLIB_MEM
mem::increment(s_class().c_str());
#endif
}
Member Function Documentation
void inlib::rroot::directory::clear_keys |
( |
| ) |
[inline] |
Definition at line 158 of file directory.
{
std::vector<key*>::iterator it;
for(it=m_keys.begin();it!=m_keys.end();) {
key* k = *it;
it = m_keys.erase(it);
delete k;
}
m_keys.clear();
}
key* inlib::rroot::directory::find_key |
( |
const std::string & |
a_name | ) |
[inline] |
Definition at line 50 of file directory.
{
if(m_file.verbose()) {
m_file.out() << "inlib::rroot::directory::find_key :"
<< " " << sout(a_name) << " ..."
<< std::endl;
}
std::vector<key*>::const_iterator it;
for(it=m_keys.begin();it!=m_keys.end();++it) {
if((*it)->object_name()==a_name) return *it;
}
return 0;
}
bool inlib::rroot::directory::from_buffer |
( |
const char * |
aEOB, |
|
|
char *& |
a_buffer |
|
) |
| [inline] |
const std::vector<key*>& inlib::rroot::directory::keys |
( |
| ) |
const [inline] |
std::vector<key*>& inlib::rroot::directory::keys |
( |
| ) |
[inline] |
uint32 inlib::rroot::directory::nbytes_name |
( |
| ) |
const [inline] |
bool inlib::rroot::directory::read_keys |
( |
uint32 & |
a_number | ) |
[inline] |
Definition at line 125 of file directory.
{
a_number = 0;
clear_keys();
key headerkey(m_file,m_seek_keys,m_nbytes_keys);
if(!headerkey.read_file()) return false;
char* buffer = headerkey.data_buffer();
if(!headerkey.from_buffer(headerkey.eob(),buffer)) return false;
int nkeys = 0;
rbuf rb(m_file.out(),m_file.byte_swap(),headerkey.eob(),buffer);
if(!rb.read(nkeys)) return false;
if(m_file.verbose()) {
m_file.out() << "inlib::rroot::directory::read_keys :"
<< " nkeys " << nkeys
<< "."
<< std::endl;
}
for(int i=0;i<nkeys;i++) {
key* k = new key(m_file);
if(!k->from_buffer(headerkey.eob(),buffer)) {
delete k;
return false;
}
m_keys.push_back(k);
}
a_number = nkeys;
return true;
}
uint32 inlib::rroot::directory::record_size |
( |
uint32 |
a_version | ) |
const [inline] |
static const std::string& inlib::rroot::directory::s_class |
( |
| ) |
[inline, static, protected] |
Definition at line 171 of file directory.
{
static const std::string s_v("inlib::rroot::directory");
return s_v;
}
seek inlib::rroot::directory::seek_keys |
( |
| ) |
const [inline] |
static std::string inlib::rroot::directory::sout |
( |
const std::string & |
a_string | ) |
[inline, static, protected] |
Definition at line 168 of file directory.
{
return std::string("\"")+a_string+"\"";
}
Member Data Documentation
The documentation for this class was generated from the following file:
- /Users/barrand/private/dev/softinex/old/inexlib-1.2/inlib/inlib/rroot/directory