Fresco/Berlin/include/Berlin DrawTraversalImpl.hh,1.25,1.26 TraversalImpl.hh,1.25,1.26
Tobias Hunger <[email protected]> Wed, 10 Dec 2003 18:12:31 +0000
| Newsgroups | gmane.comp.video.fresco.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvs/fresco/Fresco/Berlin/include/Berlin
In directory purcel:/tmp/cvs-serv28902/Berlin/include/Berlin
Modified Files:
DrawTraversalImpl.hh TraversalImpl.hh
Log Message:
Styleguideify TraversalImpl and DrawTraversalImpl. No real changes, just
'fixing' the indention.
Index: DrawTraversalImpl.hh
===================================================================
RCS file: /cvs/fresco/Fresco/Berlin/include/Berlin/DrawTraversalImpl.hh,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- DrawTraversalImpl.hh 29 May 2002 06:49:38 -0000 1.25
+++ DrawTraversalImpl.hh 10 Dec 2003 18:12:25 -0000 1.26
@@ -35,44 +35,45 @@
class DrawTraversalImpl : public virtual POA_Fresco::DrawTraversal,
public TraversalImpl
{
-public:
- //. Generates a DrawTraversal-Object that will start it the given graphic. It
- //. will consider anything that is inside or intersects the given Region
- //. to be damaged. The Region is 'watched', it does not matter where it is
- //. at this time: It will be reevaluated for each traversal. The given
- //. Transformation will be used on all objects encountered (in addition to
- //. all the other transformations that might be found during the Traversal).
- //. Any graphic in need of redrawing will do so using the given DrawingKit.
- DrawTraversalImpl(Fresco::Graphic_ptr, Fresco::Region_ptr,
- Fresco::Transform_ptr, Fresco::DrawingKit_ptr);
- DrawTraversalImpl(const DrawTraversalImpl &);
- virtual ~DrawTraversalImpl();
-
- //. This method is called by the ScreenManager just before a traversal.
- //. This means the stack contains a single entry. It is this entry which
- //. this method modifies...
- void damage(Fresco::Region_ptr);
-
- virtual CORBA::Boolean intersects_allocation();
- virtual CORBA::Boolean intersects_region(Fresco::Region_ptr);
-
- virtual void traverse_child(Fresco::Graphic_ptr, Fresco::Tag,
- Fresco::Region_ptr, Fresco::Transform_ptr);
- virtual void visit(Fresco::Graphic_ptr);
- virtual Fresco::Traversal::order direction();
- virtual CORBA::Boolean ok();
- virtual Fresco::DrawingKit_ptr drawing();
-
- //. Saves the DrawingKit's state and sets it to sane values for
- //. the DrawTraversal.
- void init();
- //. Restores the DrawingKit's state prior to the DrawTraversal.
- void finish();
-private:
- Fresco::DrawingKit_var _drawing;
- Fresco::Region_var _clipping;
- Impl_var<TransformImpl> _id;
- Fresco::DrawTraversal_var __this;
+ public:
+ //. Generates a DrawTraversal-Object that will start it the given
+ //. graphic. It will consider anything that is inside or intersects
+ //. the given Region to be damaged. The Region is 'watched', it does
+ //. not matter where it is at this time: It will be reevaluated for
+ //. each traversal. The given Transformation will be used on all
+ //. objects encountered (in addition to all the other transformations
+ //. that might be found during the Traversal). Any graphic in need of
+ //. redrawing will do so using the given DrawingKit.
+ DrawTraversalImpl(Fresco::Graphic_ptr, Fresco::Region_ptr,
+ Fresco::Transform_ptr, Fresco::DrawingKit_ptr);
+ DrawTraversalImpl(const DrawTraversalImpl &);
+ virtual ~DrawTraversalImpl();
+
+ //. This method is called by the ScreenManager just before a traversal.
+ //. This means the stack contains a single entry. It is this entry which
+ //. this method modifies...
+ void damage(Fresco::Region_ptr);
+
+ virtual CORBA::Boolean intersects_allocation();
+ virtual CORBA::Boolean intersects_region(Fresco::Region_ptr);
+
+ virtual void traverse_child(Fresco::Graphic_ptr, Fresco::Tag,
+ Fresco::Region_ptr, Fresco::Transform_ptr);
+ virtual void visit(Fresco::Graphic_ptr);
+ virtual Fresco::Traversal::order direction();
+ virtual CORBA::Boolean ok();
+ virtual Fresco::DrawingKit_ptr drawing();
+
+ //. Saves the DrawingKit's state and sets it to sane values for
+ //. the DrawTraversal.
+ void init();
+ //. Restores the DrawingKit's state prior to the DrawTraversal.
+ void finish();
+ private:
+ Fresco::DrawingKit_var my_drawing;
+ Fresco::Region_var my_clipping;
+ Impl_var<TransformImpl> my_id;
+ Fresco::DrawTraversal_var my_this;
};
#endif
Index: TraversalImpl.hh
===================================================================
RCS file: /cvs/fresco/Fresco/Berlin/include/Berlin/TraversalImpl.hh,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- TraversalImpl.hh 29 May 2002 06:49:38 -0000 1.25
+++ TraversalImpl.hh 10 Dec 2003 18:12:25 -0000 1.26
@@ -43,47 +43,55 @@
class TraversalImpl : public virtual POA_Fresco::Traversal,
public virtual ServantBase
{
- struct State
- {
- State() : id(0), transformation(0) {}
- State(Fresco::Graphic_ptr g, Fresco::Tag i, RegionImpl *a, TransformImpl *t)
- : graphic(g), id(i), allocation(a), transformation(t) {}
- Fresco::Graphic_ptr graphic;
- Fresco::Tag id;
- RegionImpl *allocation;
- TransformImpl *transformation;
- };
- typedef std::vector<State> stack_t;
-public:
- TraversalImpl(Fresco::Graphic_ptr, Fresco::Region_ptr, Fresco::Transform_ptr);
- TraversalImpl(const TraversalImpl &);
- ~TraversalImpl();
- TraversalImpl &operator = (const TraversalImpl &);
- virtual Fresco::Region_ptr current_allocation();
- virtual Fresco::Transform_ptr current_transformation();
- virtual Fresco::Graphic_ptr current_graphic();
- virtual CORBA::Boolean bounds(Fresco::Vertex &, Fresco::Vertex &, Fresco::Vertex &);
- virtual CORBA::Boolean intersects_allocation() = 0;
- virtual CORBA::Boolean intersects_region(Fresco::Region_ptr) = 0;
- virtual void traverse_child(Fresco::Graphic_ptr, Fresco::Tag, Fresco::Region_ptr, Fresco::Transform_ptr) = 0;
- virtual void visit(Fresco::Graphic_ptr) = 0;
- virtual Fresco::Traversal::order direction() = 0;
- virtual CORBA::Boolean ok() = 0;
- virtual void update();
-protected:
- //. push puts the actual trail values on a stack. They are *not* reference counted,
- //. it is assumed that pop is called in the same scope.
- //. Alternatively, values not removed from the stack are deallocated in the destructor.
- void push(Fresco::Graphic_ptr, Fresco::Tag, RegionImpl *, TransformImpl *);
- void pop();
- size_t size() const { return _stack.size();}
- RegionImpl *get_allocation(size_t i) { return _stack[i].allocation;}
- TransformImpl *get_transformation(size_t i) { return _stack[i].transformation;}
- Fresco::Graphic_ptr get_graphic(size_t i) { return _stack[i].graphic;}
-private:
- void clear();
- stack_t _stack;
+ struct State
+ {
+ State() : id(0), transformation(0) { }
+ State(Fresco::Graphic_ptr g, Fresco::Tag i,
+ RegionImpl *a, TransformImpl *t) :
+ graphic(g), id(i), allocation(a), transformation(t)
+ { }
+ Fresco::Graphic_ptr graphic;
+ Fresco::Tag id;
+ RegionImpl *allocation;
+ TransformImpl *transformation;
+ };
+ typedef std::vector<State> stack_t;
+ public:
+ TraversalImpl(Fresco::Graphic_ptr, Fresco::Region_ptr,
+ Fresco::Transform_ptr);
+ TraversalImpl(const TraversalImpl &);
+ ~TraversalImpl();
+ TraversalImpl &operator = (const TraversalImpl &);
+ virtual Fresco::Region_ptr current_allocation();
+ virtual Fresco::Transform_ptr current_transformation();
+ virtual Fresco::Graphic_ptr current_graphic();
+ virtual CORBA::Boolean bounds(Fresco::Vertex &, Fresco::Vertex &,
+ Fresco::Vertex &);
+ virtual CORBA::Boolean intersects_allocation() = 0;
+ virtual CORBA::Boolean intersects_region(Fresco::Region_ptr) = 0;
+ virtual void traverse_child(Fresco::Graphic_ptr, Fresco::Tag,
+ Fresco::Region_ptr,
+ Fresco::Transform_ptr) = 0;
+ virtual void visit(Fresco::Graphic_ptr) = 0;
+ virtual Fresco::Traversal::order direction() = 0;
+ virtual CORBA::Boolean ok() = 0;
+ virtual void update();
+ protected:
+ //. push puts the actual trail values on a stack. They are *not*
+ //. reference counted, it is assumed that pop is called in the same
+ //. scope. Alternatively, values not removed from the stack are
+ //. deallocated in the destructor.
+ void push(Fresco::Graphic_ptr, Fresco::Tag,
+ RegionImpl *, TransformImpl *);
+ void pop();
+ size_t size() const { return my_stack.size(); }
+ RegionImpl *get_allocation(size_t i) { return my_stack[i].allocation; }
+ TransformImpl *get_transformation(size_t i)
+ { return my_stack[i].transformation; }
+ Fresco::Graphic_ptr get_graphic(size_t i) { return my_stack[i].graphic; }
+ private:
+ void clear();
+ stack_t my_stack;
};
#endif
-