$interface=<<END_OF_INTERFACE;
/** \@file ${CONTAINER}.h
*
- * Definition of GiNaC's ${CONTAINER}.
+ * Definition of GiNaC's ${CONTAINER}. */
+
+/*
* This file was generated automatically by container.pl.
* Please do not modify it directly, edit the perl script instead!
* container.pl options: \$CONTAINER=${CONTAINER}
#define __GINAC_${CONTAINER_UC}_H__
#include <${STLHEADER}>
-#include <ginac/ginac.h>
+#include <ginac/basic.h>
+#include <ginac/ex.h>
+
+namespace GiNaC {
typedef ${STLHEADER}<ex> ${STLT};
extern const ${CONTAINER} some_${CONTAINER};
extern type_info const & typeid_${CONTAINER};
-// macros
+// utility functions
+inline const ${CONTAINER} &ex_to_${CONTAINER}(const ex &e)
+{
+ return static_cast<const ${CONTAINER} &>(*e.bp);
+}
-#define ex_to_${CONTAINER}(X) (static_cast<${CONTAINER} const &>(*(X).bp))
+} // namespace GiNaC
#endif // ndef __GINAC_${CONTAINER_UC}_H__
$implementation=<<END_OF_IMPLEMENTATION;
/** \@file ${CONTAINER}.cpp
*
- * Implementation of GiNaC's ${CONTAINER}.
+ * Implementation of GiNaC's ${CONTAINER}. */
+
+/*
* This file was generated automatically by container.pl.
* Please do not modify it directly, edit the perl script instead!
* container.pl options: \$CONTAINER=${CONTAINER}
#include <iostream>
#include <stdexcept>
-#include "ginac.h"
+#include "${CONTAINER}.h"
+#include "ex.h"
+#include "debugmsg.h"
+
+namespace GiNaC {
${RESERVE_IMPLEMENTATION}
// public
-${CONTAINER}::${CONTAINER}() : basic(TINFO_${CONTAINER_UC})
+${CONTAINER}::${CONTAINER}() : basic(TINFO_${CONTAINER})
{
debugmsg("${CONTAINER} default constructor",LOGLEVEL_CONSTRUCT);
}
// public
-${CONTAINER}::${CONTAINER}(${STLT} const & s, bool discardable) : basic(TINFO_${CONTAINER_UC})
+${CONTAINER}::${CONTAINER}(${STLT} const & s, bool discardable) : basic(TINFO_${CONTAINER})
{
debugmsg("${CONTAINER} constructor from ${STLT}",
LOGLEVEL_CONSTRUCT);
}
}
-${CONTAINER}::${CONTAINER}(${STLT} * vp) : basic(TINFO_${CONTAINER_UC})
+${CONTAINER}::${CONTAINER}(${STLT} * vp) : basic(TINFO_${CONTAINER})
{
debugmsg("${CONTAINER} constructor from ${STLT} *",LOGLEVEL_CONSTRUCT);
ASSERT(vp!=0);
delete vp;
}
-${CONTAINER}::${CONTAINER}(ex const & e1) : basic(TINFO_${CONTAINER_UC})
+${CONTAINER}::${CONTAINER}(ex const & e1) : basic(TINFO_${CONTAINER})
{
debugmsg("${CONTAINER} constructor from 1 ex",
LOGLEVEL_CONSTRUCT);
seq.push_back(e1);
}
-${CONTAINER}::${CONTAINER}(ex const & e1, ex const & e2) : basic(TINFO_${CONTAINER_UC})
+${CONTAINER}::${CONTAINER}(ex const & e1, ex const & e2) : basic(TINFO_${CONTAINER})
{
debugmsg("${CONTAINER} constructor from 2 ex",
LOGLEVEL_CONSTRUCT);
}
${CONTAINER}::${CONTAINER}(ex const & e1, ex const & e2, ex const & e3)
- : basic(TINFO_${CONTAINER_UC})
+ : basic(TINFO_${CONTAINER})
{
debugmsg("${CONTAINER} constructor from 3 ex",
LOGLEVEL_CONSTRUCT);
}
${CONTAINER}::${CONTAINER}(ex const & e1, ex const & e2, ex const & e3,
- ex const & e4) : basic(TINFO_${CONTAINER_UC})
+ ex const & e4) : basic(TINFO_${CONTAINER})
{
debugmsg("${CONTAINER} constructor from 4 ex",
LOGLEVEL_CONSTRUCT);
}
${CONTAINER}::${CONTAINER}(ex const & e1, ex const & e2, ex const & e3,
- ex const & e4, ex const & e5) : basic(TINFO_${CONTAINER_UC})
+ ex const & e4, ex const & e5) : basic(TINFO_${CONTAINER})
{
debugmsg("${CONTAINER} constructor from 5 ex",
LOGLEVEL_CONSTRUCT);
${CONTAINER}::${CONTAINER}(ex const & e1, ex const & e2, ex const & e3,
ex const & e4, ex const & e5, ex const & e6)
- : basic(TINFO_${CONTAINER_UC})
+ : basic(TINFO_${CONTAINER})
{
debugmsg("${CONTAINER} constructor from 6 ex",
LOGLEVEL_CONSTRUCT);
${CONTAINER}::${CONTAINER}(ex const & e1, ex const & e2, ex const & e3,
ex const & e4, ex const & e5, ex const & e6,
- ex const & e7) : basic(TINFO_${CONTAINER_UC})
+ ex const & e7) : basic(TINFO_${CONTAINER})
{
debugmsg("${CONTAINER} constructor from 7 ex",
LOGLEVEL_CONSTRUCT);
${CONTAINER}::${CONTAINER}(ex const & e1, ex const & e2, ex const & e3,
ex const & e4, ex const & e5, ex const & e6,
- ex const & e7, ex const & e8) : basic(TINFO_${CONTAINER_UC})
+ ex const & e7, ex const & e8) : basic(TINFO_${CONTAINER})
{
debugmsg("${CONTAINER} constructor from 8 ex",
LOGLEVEL_CONSTRUCT);
${CONTAINER}::${CONTAINER}(ex const & e1, ex const & e2, ex const & e3,
ex const & e4, ex const & e5, ex const & e6,
ex const & e7, ex const & e8, ex const & e9)
- : basic(TINFO_${CONTAINER_UC})
+ : basic(TINFO_${CONTAINER})
{
debugmsg("${CONTAINER} constructor from 9 ex",
LOGLEVEL_CONSTRUCT);
ex const & e4, ex const & e5, ex const & e6,
ex const & e7, ex const & e8, ex const & e9,
ex const &e10)
- : basic(TINFO_${CONTAINER_UC})
+ : basic(TINFO_${CONTAINER})
{
debugmsg("${CONTAINER} constructor from 10 ex",
LOGLEVEL_CONSTRUCT);
const ${CONTAINER} some_${CONTAINER};
type_info const & typeid_${CONTAINER}=typeid(some_${CONTAINER});
+} // namespace GiNaC
+
END_OF_IMPLEMENTATION
print "Creating interface file ${CONTAINER}.h...";