1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: expressionnodefactory.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef INCLUDED_SLIDESHOW_EXPRESSIONNODEFACTORY_HXX
32 #define INCLUDED_SLIDESHOW_EXPRESSIONNODEFACTORY_HXX
34 #include "expressionnode.hxx"
36 #include <basegfx/vector/b2dsize.hxx>
37 #include <basegfx/range/b2drectangle.hxx>
40 /* Definition of ExpressionNodeFactory class */
46 /** ExpressionNode factory
48 This class can be used to generate a wide variety of
49 ExpressionNode objects, e.g. when parsing SMIL function
52 class ExpressionNodeFactory
55 static ExpressionNodeSharedPtr
createConstantValueExpression( double rConstantValue
);
57 static ExpressionNodeSharedPtr
createValueTExpression ();
59 static ExpressionNodeSharedPtr
createPlusExpression ( const ExpressionNodeSharedPtr
& rLHS
,
60 const ExpressionNodeSharedPtr
& rRHS
);
61 static ExpressionNodeSharedPtr
createMinusExpression ( const ExpressionNodeSharedPtr
& rLHS
,
62 const ExpressionNodeSharedPtr
& rRHS
);
63 static ExpressionNodeSharedPtr
createMultipliesExpression( const ExpressionNodeSharedPtr
& rLHS
,
64 const ExpressionNodeSharedPtr
& rRHS
);
65 static ExpressionNodeSharedPtr
createDividesExpression ( const ExpressionNodeSharedPtr
& rLHS
,
66 const ExpressionNodeSharedPtr
& rRHS
);
68 /** Composes two ExpressionNode function.
70 The resulting expression will calculate
71 rOuterFunction( rInnerFunction(t) ).
73 static ExpressionNodeSharedPtr
createComposedExpression ( const ExpressionNodeSharedPtr
& rOuterFunction
,
74 const ExpressionNodeSharedPtr
& rInnerFunction
);
76 static ExpressionNodeSharedPtr
createMinExpression ( const ExpressionNodeSharedPtr
& rOuterFunction
,
77 const ExpressionNodeSharedPtr
& rInnerFunction
);
79 static ExpressionNodeSharedPtr
createMaxExpression ( const ExpressionNodeSharedPtr
& rOuterFunction
,
80 const ExpressionNodeSharedPtr
& rInnerFunction
);
85 #endif /* INCLUDED_SLIDESHOW_EXPRESSIONNODEFACTORY_HXX */