2007-11-05 02:47:12 +01:00
|
|
|
// introspect.cpp
|
|
|
|
|
|
|
|
#include "stdafx.h"
|
|
|
|
#include "introspect.h"
|
|
|
|
#include "../util/builder.h"
|
|
|
|
#include "pdfile.h"
|
|
|
|
#include "jsobj.h"
|
|
|
|
#include "pdfile.h"
|
|
|
|
|
|
|
|
typedef map<string,Cursor*> StringToCursor;
|
|
|
|
StringToCursor *specialNamespaces;
|
2008-03-09 05:16:41 +01:00
|
|
|
Profile profile;
|
2007-11-05 02:47:12 +01:00
|
|
|
|
|
|
|
auto_ptr<Cursor> getSpecialCursor(const char *ns) {
|
|
|
|
StringToCursor::iterator it = specialNamespaces->find(ns);
|
|
|
|
return auto_ptr<Cursor>
|
|
|
|
(it == specialNamespaces->end() ?
|
|
|
|
0 : it->second->clone());
|
|
|
|
}
|
|
|
|
|
|
|
|
void SingleResultObjCursor::reg(const char *as) {
|
|
|
|
if( specialNamespaces == 0 )
|
|
|
|
specialNamespaces = new StringToCursor();
|
|
|
|
if( specialNamespaces->count(as) == 0 ) {
|
|
|
|
(*specialNamespaces)[as] = this;
|
|
|
|
}
|
|
|
|
}
|