12 FixSeparator ( const string
& s
)
15 char* p
= strchr ( &s2
[0], CBAD_SEP
);
19 p
= strchr ( p
, CBAD_SEP
);
24 Module::Module ( Project
* project
,
25 const XMLElement
& moduleNode
,
26 const string
& moduleName
,
27 const string
& modulePath
)
33 type
= GetModuleType ( *moduleNode
.GetAttribute ( "type", true ) );
39 for ( i
= 0; i
< files
.size(); i
++ )
41 for ( i
= 0; i
< libraries
.size(); i
++ )
46 Module::ProcessXML ( const XMLElement
& e
,
49 string
subpath ( path
);
50 if ( e
.name
== "file" && e
.value
.size () )
52 files
.push_back ( new File ( path
+ CSEP
+ e
.value
) );
54 else if ( e
.name
== "library" && e
.value
.size () )
56 libraries
.push_back ( new Library ( e
.value
) );
58 else if ( e
.name
== "directory" )
60 const XMLAttribute
* att
= e
.GetAttribute ( "name", true );
62 subpath
= path
+ CSEP
+ att
->value
;
64 for ( size_t i
= 0; i
< e
.subElements
.size (); i
++ )
65 ProcessXML ( *e
.subElements
[i
], subpath
);
69 Module::GetModuleType ( const XMLAttribute
& attribute
)
71 if ( attribute
.value
== "buildtool" )
73 if ( attribute
.value
== "staticlibrary" )
75 if ( attribute
.value
== "kernelmodedll" )
77 throw InvalidAttributeValueException ( attribute
.name
,
84 return FixSeparator (path
) + CSEP
+ name
+ EXEPOSTFIX
;
88 File::File ( const string
& _name
)
94 Library::Library ( const string
& _name
)