1 // Copyright (c) 1997 James Clark
2 // See the file copying.txt for copying permission.
4 #ifndef MacroFlowObj_INCLUDED
5 #define MacroFlowObj_INCLUDED 1
14 #include "Expression.h"
16 #ifdef DSSSL_NAMESPACE
17 namespace DSSSL_NAMESPACE {
24 class MacroFlowObj : public CompoundFlowObj {
26 void *operator new(size_t, Collector &c) {
27 return c.allocateObject(1);
29 class Definition : public Resource {
31 Definition(Vector<const Identifier *> &,
32 NCVector<Owner<Expression> > &,
33 const Identifier *contentsId,
36 void process(ProcessContext &, MacroFlowObj *);
37 bool isCompound() const;
38 const Vector<const Identifier *> &nics() const;
40 Definition(const Definition &); // undefined
41 void operator=(const Definition &); // undefined
42 void compile(Interpreter &);
44 Vector<const Identifier *> charics_;
45 NCVector<Owner<Expression> > charicInits_;
46 const Identifier *contentsId_;
47 Owner<Expression> body_;
51 MacroFlowObj(Vector<const Identifier *> &,
52 NCVector<Owner<Expression> > &,
53 const Identifier *contentsId,
55 MacroFlowObj(const MacroFlowObj &);
57 FlowObj *copy(Collector &) const;
58 CompoundFlowObj *asCompoundFlowObj();
59 bool hasNonInheritedC(const Identifier *) const;
60 void setNonInheritedC(const Identifier *, ELObj *, const Location &, Interpreter &);
61 void traceSubObjects(Collector &) const;
62 void processInner(ProcessContext &);
65 void operator=(const MacroFlowObj &); // undefined
71 bool MacroFlowObj::Definition::isCompound() const
73 return contentsId_ != 0;
77 const Vector<const Identifier *> &MacroFlowObj::Definition::nics() const
82 #ifdef DSSSL_NAMESPACE
86 #endif /* not MacroFlowObj_INCLUDED */