1 /* === S I N F G =========================================================== */
3 ** \brief Template Header
5 ** $Id: transform.h,v 1.1.1.1 2005/01/04 01:23:15 darco Exp $
8 ** Copyright (c) 2002 Robert B. Quattlebaum Jr.
10 ** This software and associated documentation
11 ** are CONFIDENTIAL and PROPRIETARY property of
12 ** the above-mentioned copyright holder.
14 ** You may not copy, print, publish, or in any
15 ** other way distribute this software without
16 ** a prior written agreement with
17 ** the copyright holder.
20 /* ========================================================================= */
22 /* === S T A R T =========================================================== */
24 #ifndef __SINFG_TRANSFORM_H
25 #define __SINFG_TRANSFORM_H
27 /* === H E A D E R S ======================================================= */
35 /* === M A C R O S ========================================================= */
37 /* === T Y P E D E F S ===================================================== */
39 /* === C L A S S E S & S T R U C T S ======================================= */
43 class Transform : public etl::shared_object
48 typedef etl::handle<Transform> Handle;
51 Transform(const GUID& guid=GUID(0)):guid_(guid) { }
55 const GUID& get_guid()const { return guid_; }
57 virtual ~Transform() { }
58 virtual sinfg::Vector perform(const sinfg::Vector& x)const=0;
59 virtual sinfg::Vector unperform(const sinfg::Vector& x)const=0;
61 virtual sinfg::Rect perform(const sinfg::Rect& x)const;
62 virtual sinfg::Rect unperform(const sinfg::Rect& x)const;
64 }; // END of class Transform
66 class TransformStack : public std::list<Transform::Handle>
71 sinfg::Vector perform(const sinfg::Vector& x)const;
72 sinfg::Vector unperform(const sinfg::Vector& x)const;
74 sinfg::Rect perform(const sinfg::Rect& x)const;
75 sinfg::Rect unperform(const sinfg::Rect& x)const;
77 void push(const Transform::Handle& x) { if(x)push_back(x); }
78 void pop() { pop_back(); }
79 }; // END of class TransformStack
81 }; // END of namespace sinfg
83 /* === E N D =============================================================== */