/[escript]/branches/split/escriptcore/src/Crates.h
ViewVC logotype

Contents of /branches/split/escriptcore/src/Crates.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4736 - (show annotations)
Tue Mar 11 05:57:11 2014 UTC (4 years, 4 months ago) by jfenwick
File MIME type: text/plain
File size: 1674 byte(s)
I did some things
1 /*****************************************************************************
2 *
3 * Copyright (c) 2014 by University of Queensland
4 * http://www.uq.edu.au
5 *
6 * Primary Business: Queensland, Australia
7 * Licensed under the Open Software License version 3.0
8 * http://www.opensource.org/licenses/osl-3.0.php
9 *
10 * Development until 2012 by Earth Systems Science Computational Center (ESSCC)
11 * Development 2012-2013 by School of Earth Sciences
12 * Development from 2014 by Centre for Geoscience Computing (GeoComp)
13 *
14 *****************************************************************************/
15
16 #ifndef ESCRIPT_CRATES_H
17 #define ESCRIPT_CRATES_H
18
19 #include <string>
20 #include <boost/shared_ptr.hpp>
21
22 namespace escript
23 {
24
25 class AbstractCrate
26 {
27 public:
28 AbstractCrate(const std::string& name, const std::string& opname);
29 // If we allow custom python functions as the operator, add another constructor chain
30
31 virtual ~AbstractCrate();
32 const std::string& getLabel();
33 protected:
34
35 // true if "opname" is a legal operator for this crate
36 virtual bool OpLegal(const std::string& opname)=0; // pure virtual to force Crate to be abstract
37 const std::string label;
38 const std::string op;
39
40 };
41
42 typedef boost::shared_ptr<AbstractCrate> crate_ptr;
43
44 class DataCrate : public AbstractCrate
45 {
46 public:
47 DataCrate(const std::string& name, const std::string& opname);
48 ~DataCrate();
49
50 protected:
51 bool OpLegal(const std::string& opname);
52
53 };
54
55 class PickleCrate : public AbstractCrate
56 {
57 public:
58 PickleCrate(const std::string& name, const std::string& opname);
59 ~PickleCrate();
60
61 protected:
62 bool OpLegal(const std::string& opname);
63
64 };
65
66
67
68
69 }
70
71 #endif

  ViewVC Help
Powered by ViewVC 1.1.26