00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00031 #ifndef ASSET_BUILDINSTRUCT_H
00032 #define ASSET_BUILDINSTRUCT_H
00033
00034
00035 #include <boost/variant.hpp>
00036 #include <string>
00037
00038 using std::string;
00039
00040
00041
00042 namespace asset
00043 {
00044 using lumiera::P;
00045
00046 class Proc;
00047 class ProcPatt;
00048
00049 typedef P<const asset::Proc> PProc;
00050 typedef P<const asset::ProcPatt> PProcPatt;
00051
00052
00053 static Symbol CURRENT = "current";
00054
00055 struct DoAttach
00056 {
00057 vector<PProc> nodes;
00058
00060 string point;
00061
00062 DoAttach (Symbol where = CURRENT)
00063 : point(where)
00064 { }
00065
00066 DoAttach (PProc& node, Symbol where = CURRENT)
00067 : point(where)
00068 {
00069 nodes.push_back(node);
00070 }
00071
00072 };
00073
00074
00075 struct DoRecurse
00076 {
00077 PProcPatt subPattern_;
00078
00079 explicit DoRecurse (PProcPatt& pattern) : subPattern_(pattern) {}
00080 };
00081
00082
00083
00084 class DoConditional
00085 {
00086
00087 };
00088
00089
00090 typedef boost::variant< DoAttach, DoRecurse, DoConditional > InstructEntry;
00091
00107 struct BuildInstruct
00108 : public InstructEntry
00109 {
00110 template<typename T>
00111 BuildInstruct (T& instr) : InstructEntry() {}
00112
00113
00114
00115
00116
00117
00118
00119
00120 };
00121
00122
00123
00124
00125
00126 }
00127 #endif