std::cout << " ";
}
-
-
//! get child element by id
/*!
\return pointer to element having id or null on error
void visit_node(const xmlpp::Element* root, const xmlpp::Node* node = NULL, unsigned int indentation = 0)
{
if (!node) node=root;
- std::cout << std::endl; //Separate nodes by an empty line.
const xmlpp::ContentNode* nodeContent = dynamic_cast<const xmlpp::ContentNode*>(node);
const xmlpp::TextNode* nodeText = dynamic_cast<const xmlpp::TextNode*>(node);
if(!nodeText && !nodeComment && !nodename.empty()) //Let's not say "name: text".
{
- print_indentation(indentation);
+ // print_indentation(indentation);
// std::cout << "Node name = " << node->get_name() << std::endl;
// std::cout << "Node name = " << nodename << std::endl;
if (node->get_name() == "Function") {
parse_function(root, node);
}
}
+#if 0
else if(nodeText) //Let's say when it's text. - e.g. let's say what that white space is.
{
print_indentation(indentation);
}
}
-
+#endif
if(!nodeContent)
{
//Recurse through child nodes:
int
main(int argc, char* argv[])
{
- std::string filepath;
- if(argc > 1 )
- filepath = argv[1]; //Allow the user to specify a different XML file to parse.
- else
- filepath = "example.xml";
+ if (argc != 3) {
+ std::cerr << "Usage: " << argv[0] << " gccxml-file outputprefix" << std::endl;
+ return 1;
+ }
+ std::string filepath(argv[1]);
+ std::string prefix(argv[2]);
Parser parser(filepath);
std::list<t2n_procedure> procedures(parser.get_procedures());
for (std::set<std::string>::const_iterator it=groups.begin();it!=groups.end();++it)
std::cerr << *it << std::endl;
- std::string prefix("test_");
std::string common_hpp_fname(prefix+"common.hxx");
std::string common_cpp_fname(prefix+"common.cpp");
std::string client_hpp_fname(prefix+"client.hxx");