// Copyright (c) 1997 James Clark // See the file copying.txt for copying permission. #ifndef MacroFlowObj_INCLUDED #define MacroFlowObj_INCLUDED 1 #include "SosofoObj.h" #include "Insn.h" #include "Resource.h" #include "Ptr.h" #include "Vector.h" #include "NCVector.h" #include "Owner.h" #include "Expression.h" #ifdef DSSSL_NAMESPACE namespace DSSSL_NAMESPACE { #endif class ProcessContext; class Identifier; class Interpreter; class MacroFlowObj : public CompoundFlowObj { public: void *operator new(size_t, Collector &c) { return c.allocateObject(1); } class Definition : public Resource { public: Definition(Vector &, NCVector > &, const Identifier *contentsId, Owner &); void process(ProcessContext &, MacroFlowObj *); bool isCompound() const; const Vector &nics() const; private: Definition(const Definition &); // undefined void operator=(const Definition &); // undefined void compile(Interpreter &); Vector charics_; NCVector > charicInits_; const Identifier *contentsId_; Owner body_; InsnPtr code_; }; MacroFlowObj(Vector &, NCVector > &, const Identifier *contentsId, Owner &); MacroFlowObj(const MacroFlowObj &); ~MacroFlowObj(); FlowObj *copy(Collector &) const; CompoundFlowObj *asCompoundFlowObj(); bool hasNonInheritedC(const Identifier *) const; void setNonInheritedC(const Identifier *, ELObj *, const Location &, Interpreter &); void traceSubObjects(Collector &) const; void processInner(ProcessContext &); void unpack(VM &); private: void operator=(const MacroFlowObj &); // undefined Ptr def_; ELObj **charicVals_; }; inline bool MacroFlowObj::Definition::isCompound() const { return contentsId_ != 0; } inline const Vector &MacroFlowObj::Definition::nics() const { return charics_; } #ifdef DSSSL_NAMESPACE } #endif #endif /* not MacroFlowObj_INCLUDED */