File: template.cc

package info (click to toggle)
gri 2.4.2-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 4,540 kB
  • ctags: 1,966
  • sloc: cpp: 32,542; lisp: 3,243; perl: 806; makefile: 548; sh: 253
file content (70 lines) | stat: -rw-r--r-- 2,227 bytes parent folder | download
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
// Instantiate templates.
// BUG: this code may well need changing as compilers evolve
// BUG: in how they handle templates.  :=(

#define _PUT_STATIC_DATA_MEMBERS_HERE
#include <string>
#include <stdio.h>

#include <algorithm>		// part of STL
#include <vector>		// part of STL
#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
// Instantiate on 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<string>
#pragma define_template GriMatrix<bool>
#pragma define_template GriMatrix<double>
#endif // DEC compiler


// Instantiate on GNU c++ compiler
#if defined(__GNUC__)
template void  reverse(vector<double>::iterator, vector<double>::iterator);
template void  sort(vector<double>::iterator, vector<double>::iterator);
template class vector<BlockSource>;
template class vector<CmdFile>;
template class vector<DataFile>;
template class vector<GriNamedColor>;
template class vector<GriState>;
template class vector<GriSynonym>;
template class vector<GriVariable>;
template class vector<RpnItem>;
template class vector<bool>;
template class vector<double>;
template class vector<float>;
template class vector<int>;
template class vector<unsigned char>;
template class vector<string>;
template class GriMatrix<bool>;
template class GriMatrix<double>;

#endif

#endif