root/bdm/uibuilder.cpp @ 250

Revision 248, 0.8 kB (checked in by smidl, 15 years ago)

doc

Line 
1#include "uibuilder.h"
2
3UImap __uimap__;
4
5void UIexternal::build(Setting &S, void** result) const{
6        Config C;
7        try{
8                C.readFile((const char*)S["filename"]);
9        } catch (...){
10                it_error("File " + string((const char*)S["filename"]) + " not found or broken");
11        }
12        try {   
13                Setting& remS=C.lookup((const char*)S["path"]);
14                UIbuild(remS,result);
15        }
16        catch (...) { it_error("External field " + string(S.getPath()) + " not valid");
17        }
18       
19};
20UIREGISTER(UIexternal);
21
22void UIinternal::build(Setting &S, void** result) const{
23        try {   
24                Setting* Stmp = &S;
25                do {Stmp=&(Stmp->getParent());} while (!Stmp->isRoot());
26                Setting& intS=Stmp->lookup((const char*)S["path"]);
27                UIbuild(intS,result);
28        }
29        catch (...) { it_error("Internal field " + string(S.getPath()) + " not valid");
30        }
31       
32};
33UIREGISTER(UIinternal);
34
35
36//UIexternal* UIexternal_instance =new UIexternal();
Note: See TracBrowser for help on using the browser.