47 #ifdef CEXMC_USE_CUSTOM_FILTER
50 #include <boost/variant/recursive_variant.hpp>
56 using boost::recursive_wrapper;
81 Operator( OperatorType type = Uninitialized,
int priority = 0,
82 bool hasRLAssoc =
false ) :
83 type( type ), priority( priority ), hasRLAssoc( hasRLAssoc )
96 Variable() : index1( 0 ), index2( 0 ), addr( (
const int * ) NULL )
105 variant< const int *, const double * > addr;
111 typedef std::string Function;
113 typedef variant< int, double > Constant;
115 typedef variant< Variable, Constant > Leaf;
117 typedef recursive_wrapper< Subtree > Tree;
119 typedef variant< Tree, Leaf > Node;
121 typedef variant< Operator, Function > NodeType;
126 Subtree() : type( Operator( Uninitialized ) )
129 void Print(
int level = 0 )
const;
131 void PrintLeaf(
const Leaf * leaf,
int level = 0 )
const;
133 std::vector< Node > children;
137 static const int printIndent = 4;
144 typedef variant< int, double > ScalarValueType;
147 virtual ~BasicEval();
150 bool operator()(
const Subtree & ast )
const;
153 ScalarValueType GetScalarValue(
const Node & node )
const;
155 virtual ScalarValueType GetFunScalarValue(
const Subtree & ast )
158 virtual ScalarValueType GetVarScalarValue(
const Variable &
var )
161 ScalarValueType GetBasicFunScalarValue(
162 const Subtree & ast,
bool &
result )
typedef int(XMLCALL *XML_NotStandaloneHandler)(void *userData)
G4double G4NeutronHPJENDLHEData::G4double result
const G4ThreeVector const G4double const
REAL *8 function var(A, B, C, D)
void Print(G4Element &ele)