// Copyright (c) 1999 Matthias Clasen // See the file copying.txt for copying permission. #ifndef TransformationMode_INCLUDED #define TransformationMode_INCLUDED 1 #include #include #include #include #include "Insn.h" #include #include "ELObj.h" #ifdef DSSSL_NAMESPACE namespace DSSSL_NAMESPACE { #endif class Expression; class TransformationMode { public: class Action : public Resource { public: Action(unsigned partIndex, Owner &, const Location &); void compile(Interpreter &); void get(InsnPtr &, Vector&) const; const Location &location() const; unsigned partIndex() const; private: Location defLoc_; Owner expr_; // must be permanent Vector specs_; InsnPtr insn_; unsigned partIndex_; }; class Association { public: Association(); Association(Owner &,Owner &,const Ptr &); const Action &action() const; Action &action(); long priority() const; const Location &location() const; void compile(Interpreter &, const NodePtr &); void swap(Association &); private: Owner qexpr_; Owner pexpr_; long priority_; NodeListObj *nl_; InsnPtr insn_; Ptr action_; }; TransformationMode(); void addAssociation(Owner &, Owner &, Owner&, const Location &, Interpreter &); void compile(Interpreter &, const NodePtr &); private: NCVector associations_; friend class TransformContext; }; #ifdef DSSSL_NAMESPACE } #endif #endif /* not TransformationMode_INCLUDED */