[C++-sig] how do I instantiate templates in pyste with types defined in different files?

Alexis H. Rivera-Rios ahrivera at yahoo.com
Fri Aug 12 20:23:39 CEST 2005


I'm trying to do something like the following.  Let
say I have a file test.h that contains the following

template <class A, class B>
class Test
   A a;
   B b;

Now I want to export an instanciate this template
class using the types Astruct1, Astruct2 defined in
atruct1.h and astruct2.h respectively.

In pyste, I write this:

Test = Template("Test","test.h")

When I try to compile this I get an error because the
temporary file that is generated only includes test.h
and it doens't now where the other types come from. 
What is the best way to handle this?

Is there a way to specify additional include files
when I try to instantiate this code?  Or should I
write code that does the appropriate instanciation and
then export that?


Programming Tutorial:
In Python: To do this, do this
In Perl: To do this, do this or this or this or this...
In C: To do this, do this, but be careful
In C++: To do this, do this, but don't do this, be careful of this, watch out for this, and whatever you do, don't do this

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

More information about the Cplusplus-sig mailing list