#!/usr/bin/env python
#
# Generate the SIP specification files for C++ templates.
#
# Copyright (C) 2004 Gerard Vermeulen
#
# This file is part of PyQwt3D.
#
# PyQwt3D is free software; you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
#
# PyQwt3D is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along
# with PyQwt3D; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
#
# In addition, as a special exception, Gerard Vermeulen gives permission to
# link PyQwt3D dynamically with commercial, non-commercial or educational
# versions of Qt, PyQt and sip, and distribute PyQwt in this form, provided
# that equally powerful versions of Qt, PyQt and sip have been released under
# the terms of the GNU General Public License.
#
# If PyQwt3D is dynamically linked with commercial, non-commercial or
# educational versions of Qt, PyQt and sip, PyQwt3D becomes a free plug-in for
# a non-free program.


import os

STD_VECTOR_BASE = open('STD_VECTOR_BASE').read()
STD_VECTOR_USER = open('STD_VECTOR_USER').read()

file = open('qwt3d_axisvector.sip', 'w')
print >> file, STD_VECTOR_USER % {
    'HEAD': ('\n#include <vector>'
             '\n#include <qwt3d_axis.h>'          
             '\nusing namespace std;'
             '\nusing namespace Qwt3D;'
             '\ntypedef vector<Axis> AxisVector;'
             ),
    'ITEM': 'Axis',
    'VECTOR': 'AxisVector',
    }

file = open('qwt3d_cell.sip', 'w')
print >> file, STD_VECTOR_BASE % {
    'HEAD': ('\n#include <vector>'
             '\n#include <qwt3d_types.h>'          
             '\nusing namespace std;'
             '\nusing namespace Qwt3D;'
             ),
    'ITEM': 'size_type',
    'VECTOR': 'Cell',
    }

file = open('qwt3d_cellfield.sip', 'w')
print >> file, STD_VECTOR_USER % {
    'HEAD': ('\n#include <vector>'
             '\n#include <qwt3d_types.h>'          
             '\nusing namespace std;'
             '\nusing namespace Qwt3D;'
             ),
    'ITEM': 'Cell',
    'VECTOR': 'CellField',
    }

file = open('qwt3d_colorvector.sip', 'w')
print >> file, STD_VECTOR_USER % {
    'HEAD': ('\n#include <vector>'
             '\n#include <qwt3d_color.h>'          
             '\nusing namespace std;'
             '\nusing namespace Qwt3D;'
             ),
    'ITEM': 'RGBA',
    'VECTOR': 'ColorVector',
    }

file = open('qwt3d_doublevector.sip', 'w')
print >> file, STD_VECTOR_BASE % {
    'HEAD': ('\n#include <vector>'          
             '\nusing namespace std;'
             '\ntypedef vector<double> DoubleVector;'
             ),
    'ITEM': 'double',
    'VECTOR': 'DoubleVector',
    }

file = open('qwt3d_freevectorfield.sip', 'w')
print >> file, STD_VECTOR_USER % {
    'HEAD': ('\n#include <vector>'
             '\n#include <qwt3d_types.h>'
             '\n#include <sip_Qwt3DFreeVector.h>'          
             '\nusing namespace std;'
             '\nusing namespace Qwt3D;'
             ),
    'ITEM': 'FreeVector',
    'VECTOR': 'FreeVectorField',
    }

file = open('qwt3d_triplefield.sip', 'w')
print >> file, STD_VECTOR_USER % {
    'HEAD': ('\n#include <vector>'
             '\n#include <qwt3d_types.h>'
             '\n#include <sip_Qwt3DTriple.h>'          
             '\nusing namespace std;'
             '\nusing namespace Qwt3D;'
             ),
    'ITEM': 'Triple',
    'VECTOR': 'TripleField',
    }

# Local Variables: ***
# mode: python ***
# End: ***
