File: template.cc

package info (click to toggle)
gri 2.12.26-1
  • links: PTS
  • area: main
  • in suites: buster
  • size: 5,952 kB
  • ctags: 2,396
  • sloc: cpp: 36,598; sh: 4,196; lisp: 3,764; perl: 1,362; ansic: 1,046; makefile: 606
file content (98 lines) | stat: -rw-r--r-- 3,315 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
/*
    Gri - A language for scientific graphics programming
    Copyright (C) 2008 Daniel Kelley

    This program 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; version 3 of the License, or
    (at your option) any later version.

    This program 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 this program; if not, write to the Free Software Foundation, Inc.,
    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

// Instantiate templates.
// NB. This code may need changing as compilers evolve :-(

#define _PUT_STATIC_DATA_MEMBERS_HERE
#include <string>
#include <vector>		// part of STL
#include <algorithm>		// part of STL
#include <stdio.h>
#include "gr.hh"
#include "defaults.hh"
#include "private.hh"
#include "types.hh"
#include "gr_coll.hh"
#include "GriColor.hh"
#include "GMatrix.hh"
#include "GriState.hh"
#include "Synonym.hh"
#include "Variable.hh"

#if defined(USING_CXX_REPO)
template void  sort(vector<double>::iterator, vector<double>::iterator);
#else
// DEC c++ compiler
#if defined(__DECCXX)
//#pragma define_template void reverse(vector<double>::iterator, vector<double>::iterator);
//#pragma define_template void sort(vector<double>::iterator, vector<double>::iterator);
#pragma define_template vector<BlockSource>
#pragma define_template vector<CmdFile>
#pragma define_template vector<DataFile>
#pragma define_template vector<GriState>
#pragma define_template vector<GriSynonym>
#pragma define_template vector<GriVariable>
#pragma define_template vector<RpnItem>
#pragma define_template vector<bool>
#pragma define_template vector<double>
#pragma define_template vector<float>
#pragma define_template vector<int>
#pragma define_template vector<unsigned char>
#pragma define_template vector<const char*>
#pragma define_template GriMatrix<bool>
#pragma define_template GriMatrix<double>
#endif // DEC compiler


// GNU c++ compiler
#if defined(__GNUC__)

#if __GNUC__ >= 3		// avoid deficiency in old compilers

//void std::reverse(std::vector<double>::iterator, std::vector<double>::iterator);
//void std::sort(std::vector<double>::iterator, std::vector<double>::iterator);

#else

template void std::reverse(std::vector<double>::iterator, std::vector<double>::iterator);
template void std::sort(std::vector<double>::iterator, std::vector<double>::iterator);

#endif

template class std::vector<BlockSource>;
template class std::vector<CmdFile>;
template class std::vector<DataFile>;
template class std::vector<GriNamedColor>;
template class std::vector<GriState>;
template class std::vector<GriSynonym>;
template class std::vector<GriVariable>;
template class std::vector<RpnItem>;
template class std::vector<bool>;
template class std::vector<double>;
template class std::vector<float>;
template class std::vector<int>;
template class std::vector<unsigned char>;
template class std::vector<const char*>;
template class GriMatrix<bool>;
template class GriMatrix<double>;

#endif

#endif