X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Fstructure.pl;h=b6137d0b41f57c2ddec32b254b9d07d621215377;hp=de365edee5308bedadb123fe83593a6727607f55;hb=8bcccf834ad41e94a1a4f3a0304c2945b228b4f4;hpb=a8507b8af1c08d9b27d98d57f95c7ca1a8671e27;ds=inline diff --git a/ginac/structure.pl b/ginac/structure.pl index de365ede..b6137d0b 100755 --- a/ginac/structure.pl +++ b/ginac/structure.pl @@ -119,7 +119,9 @@ $types_ok_statements=generate( $interface=< +#include + +namespace GiNaC { class ${STRUCTURE} : public structure { @@ -211,6 +215,8 @@ extern const unsigned tinfo_${STRUCTURE}; #define ex_to_${STRUCTURE}(X) (static_cast<${STRUCTURE} const &>(*(X).bp)) +} // namespace GiNaC + #endif // ndef _${STRUCTURE_UC}_H_ END_OF_INTERFACE @@ -218,7 +224,9 @@ END_OF_INTERFACE $implementation=< -#include "ginac.h" +#include "${STRUCTURE}.h" + +namespace GiNaC { ////////// // default constructor, destructor, copy constructor assignment operator and helpers @@ -498,6 +508,8 @@ const ${STRUCTURE} some_${STRUCTURE}; type_info const & typeid_${STRUCTURE}=typeid(some_${STRUCTURE}); const unsigned tinfo_${STRUCTURE}=structure::register_new("${STRUCTURE}"); +} // namespace GiNaC + END_OF_IMPLEMENTATION print "Creating interface file ${STRUCTURE}.h...";