]> git.localhorst.tv Git - l2e.git/blobdiff - src/loader/ParsedSource.cpp
added utility function to create headers
[l2e.git] / src / loader / ParsedSource.cpp
index bceed089f0377f4a4678edc84414afa4d7c3084b..90498e71f3e17ee5e2b96dea5d58803994851cc3 100644 (file)
@@ -103,6 +103,12 @@ const Definition &ParsedSource::GetDefinition(const std::string &name) const {
        }
 }
 
+void ParsedSource::WriteHeader(std::ostream &out) const {
+       for (std::set<string>::const_iterator i(exports.begin()), end(exports.end()); i != end; ++i) {
+               out << GetDeclaration(*i).TypeName() << ' ' << *i << std::endl;
+       }
+}
+
 
 Definition::~Definition() {
        if (isLiteral) {