Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members | Related Pages | Examples

OTD Namespace Reference
[Applibs]

A small OTD utility library. More...

Compounds

Functions

Variables


Detailed Description

A small OTD utility library.

Allows you to perform actions based on a local directory containing OTD files. Currently the only action available is the automatic creation of required subobjects.


Function Documentation

void accumulate_extends string  t,
deque< string > *  dest
[static]
 

Definition at line 301 of file otdutil.cc.

Referenced by initObject().

void cleanup  ) 
 

Free heap memory and close all open files.

Definition at line 378 of file otdutil.cc.

Referenced by rescan().

void do_otd FILE *  f,
string  filename,
deque< string > *  types,
XML_StartElementHandler  handler,
Vobject *  vobj,
Site site
[static]
 

Definition at line 258 of file otdutil.cc.

Referenced by initObject(), and scanDir().

void initObject deque< string > &  types,
Vobject *  vobj,
Site site
 

Parse OTDs for each type string in 'types', and create required subobjects.

If you have registered the Metaobjects extenders, then the created object of that type will contain that metaobject, otherwise, it will just have the typestring it its type list, but no metaobject instance attached. The new objects will be added as children with the correct names under 'vobj'. If site is 0, then the site for 'vobj' is used to create the new objects.

Definition at line 393 of file otdutil.cc.

void rescan  ) 
 

Rescan the OTD directories for added/removed OTDs.

See also:
scan()

Definition at line 387 of file otdutil.cc.

void scan  ) 
 

Looks for OTDs in directories in the VOS_OTD_PATH environment variable, or in the default location if there is no such environment variable.

If used, VOS_OTD_PATH should be a colon seperated list of directories. The default OTD directory is /share/vos/otd.

Definition at line 317 of file otdutil.cc.

Referenced by rescan().

void scanDir string  d  ) 
 

Scan one directory 'dirname', recursing into subdirectories, parsing all OTDs until some basic info is gathered.

Files are left open.

Definition at line 336 of file otdutil.cc.

Referenced by scan().

void sreplace string &  s,
char  oldc,
char  newc
[inline, static]
 

Definition at line 105 of file otdutil.cc.

void sreplace string &  s,
const string &  oldc,
const string &  newc
[inline, static]
 

Definition at line 99 of file otdutil.cc.

Referenced by ssplit().

deque<string> ssplit const string &  s,
char  sep,
char  esc = '\\',
int  max = -1
[static]
 

Definition at line 113 of file otdutil.cc.

Referenced by scan(), xml_cb_createObjects(), and xml_cb_otdScan().

void xml_cb_createObjects void *  data,
const char *  el,
const char **  attr
[static]
 

Assumes 8 bit characters.

Definition at line 138 of file otdutil.cc.

Referenced by initObject().

void xml_cb_otdScan void *  data,
const char *  el,
const char **  attr
[static]
 

Assumes 8 bit characters. Should use XML_Char

Definition at line 196 of file otdutil.cc.

Referenced by scanDir().


Variable Documentation

bool OTD::ONLY_DOT_OTD = true [static]
 

Definition at line 68 of file otdutil.cc.

Referenced by scanDir().

map<string, OTD_Info*> OTD::otds
 

Definition at line 95 of file otdutil.cc.

Referenced by accumulate_extends(), cleanup(), initObject(), and xml_cb_otdScan().


Generated on Tue Aug 12 03:56:02 2003 for Interreality Project - VOS by doxygen 1.3.2