X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Fstructure.pl;h=b6137d0b41f57c2ddec32b254b9d07d621215377;hp=725b03a592519e0c6d7b7b038e15414f25c4c29c;hb=8bcccf834ad41e94a1a4f3a0304c2945b228b4f4;hpb=6b3768e8c544739ae53321539cb4d1e3112ded1b;ds=sidebyside diff --git a/ginac/structure.pl b/ginac/structure.pl index 725b03a5..b6137d0b 100755 --- a/ginac/structure.pl +++ b/ginac/structure.pl @@ -119,18 +119,38 @@ $types_ok_statements=generate( $interface=< -#include +namespace GiNaC { class ${STRUCTURE} : public structure { @@ -195,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 @@ -202,9 +224,27 @@ END_OF_INTERFACE $implementation=< -#include "ginac.h" +#include "${STRUCTURE}.h" + +namespace GiNaC { ////////// // default constructor, destructor, copy constructor assignment operator and helpers @@ -466,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...";