NEST  2.6.0,not_revisioned_source_dir@0
symboldatum.h
Go to the documentation of this file.
1 /*
2  * symboldatum.h
3  *
4  * This file is part of NEST.
5  *
6  * Copyright (C) 2004 The NEST Initiative
7  *
8  * NEST is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * NEST is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with NEST. If not, see <http://www.gnu.org/licenses/>.
20  *
21  */
22 
23 #ifndef SYMBOLDATUM_H
24 #define SYMBOLDATUM_H
25 
26 // Include all headers, needed to use token and datum objects
27 #include <typeinfo>
28 
29 // <string> MUST be included before any STL header, since there are
30 // some conflicts between this and the g++-2.7.2 STL version
31 
32 #include <string>
33 #include "name.h"
34 #include "aggregatedatum.h"
35 #include "interpret.h"
36 
37 /* These are declarations to specialize the static memory pool BEFORE
38  we instantiate the AggregateDatum. Note, that this is onlz a declaration,
39  because we do not provide an initializer (see ISO14882 Sec. 14.7.3.15.)
40  The definition is given in the *.CC file with the appropriate
41  initializer.
42 
43  Note that SUN's Forte 6.2 does not handle this correctly, so we have
44  to use a compiler-switch.
45 */
46 #ifndef HAVE_STATIC_TEMPLATE_DECLARATION_FAILS
47 template<>
49 #endif
50 
51 class SymbolDatum: public AggregateDatum<Name,&SLIInterpreter::Symboltype>
52 {
53  Datum * clone(void) const
54  {
55  return new SymbolDatum(*this);
56  }
57 
58 public:
59  SymbolDatum(const Name &n):
60  AggregateDatum<Name,&SLIInterpreter::Symboltype>(n) {}
62  AggregateDatum<Name,&SLIInterpreter::Symboltype>(n) {}
64 
65 };
66 
67 #endif
68 
Datum * clone(void) const
Virtual copy constructor.
Definition: symboldatum.h:53
Represent strings by ints to facilitate fast comparison.
Definition: name.h:53
SymbolDatum(const SymbolDatum &n)
Definition: symboldatum.h:61
Definition: aggregatedatum.h:53
~SymbolDatum()
Definition: symboldatum.h:63
Definition: interpret.h:69
const Name n("n")
Number of synaptic release sites (int >=0) (Tsodyks2_connection)
Definition: nest_names.h:202
Definition: symboldatum.h:51
pool is a specialized allocator class for many identical small objects.
Definition: allocator.h:50
Definition: datum.h:33
SymbolDatum(const Name &n)
Definition: symboldatum.h:59