cleanup
authorJens Thiele <jens.thiele@intra2net.com>
Mon, 18 Dec 2006 16:19:05 +0000 (16:19 +0000)
committerJens Thiele <jens.thiele@intra2net.com>
Mon, 18 Dec 2006 16:19:05 +0000 (16:19 +0000)
codegen/TODO
codegen/main.cpp

index d90cf65..998f2e3 100644 (file)
@@ -1,4 +1,3 @@
-- remove support for LIBT2N_EXPORT_GROUP(group) (this will simplify the generator a lot)
 - add option similar to gccs -MD (at the moment it is a fixed set of files generated and
   they are handled in the makefile snippet [codegen.make])
 - it would really be much nicer if the client lib includes would not depend upon boost serialization
index f228ece..bfe12e0 100644 (file)
@@ -106,19 +106,14 @@ std::string get_namespace(const xmlpp::Element* root, const std::string &id)
      return element->get_attribute("name")->get_value();
 }
 
-//! extract group from attributes
-std::string
-extract_group(const std::string &attrs)
+//! procedure marked for export?
+bool
+is_marked(const std::string &attrs)
 {
      // todo: improve this
-     std::string error;
      std::string to_match("gccxml(libt2n-");
      std::string::size_type p(attrs.find(to_match));
-     if (p==std::string::npos) return error;
-     std::string group(attrs, p+to_match.length(), attrs.length());
-     p=group.find_first_of(')');
-     assert(p!=std::string::npos);
-     return std::string(group,0,p);
+     return (p!=std::string::npos);
 }
 
 struct type_info
@@ -260,7 +255,7 @@ protected:
          // attributes are speparated by spaces?
 
          t2n_procedure f;
-         if (extract_group(attributes->get_value()).empty()) return;
+         if (!is_marked(attributes->get_value())) return;
 
          // we need the return type
          f.ret_type=get_type(root, returns->get_value());