xref: /AOO41X/main/slideshow/source/inc/expressionnodefactory.hxx (revision aaef562f9b4401da6d8a910634bb68eaaacb4ebd)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef INCLUDED_SLIDESHOW_EXPRESSIONNODEFACTORY_HXX
25 #define INCLUDED_SLIDESHOW_EXPRESSIONNODEFACTORY_HXX
26 
27 #include "expressionnode.hxx"
28 
29 #include <basegfx/vector/b2dsize.hxx>
30 #include <basegfx/range/b2drectangle.hxx>
31 
32 
33 /* Definition of ExpressionNodeFactory class */
34 
35 namespace slideshow
36 {
37     namespace internal
38     {
39         /** ExpressionNode factory
40 
41             This class can be used to generate a wide variety of
42             ExpressionNode objects, e.g. when parsing SMIL function
43             expressions.
44         */
45         class ExpressionNodeFactory
46         {
47         public:
48             static ExpressionNodeSharedPtr createConstantValueExpression( double rConstantValue );
49 
50             static ExpressionNodeSharedPtr createValueTExpression    ();
51 
52             static ExpressionNodeSharedPtr createPlusExpression      ( const ExpressionNodeSharedPtr&   rLHS,
53                                                                        const ExpressionNodeSharedPtr&   rRHS );
54             static ExpressionNodeSharedPtr createMinusExpression     ( const ExpressionNodeSharedPtr&   rLHS,
55                                                                        const ExpressionNodeSharedPtr&   rRHS );
56             static ExpressionNodeSharedPtr createMultipliesExpression( const ExpressionNodeSharedPtr&   rLHS,
57                                                                        const ExpressionNodeSharedPtr&   rRHS );
58             static ExpressionNodeSharedPtr createDividesExpression   ( const ExpressionNodeSharedPtr&   rLHS,
59                                                                        const ExpressionNodeSharedPtr&   rRHS );
60 
61             /** Composes two ExpressionNode function.
62 
63                 The resulting expression will calculate
64                 rOuterFunction( rInnerFunction(t) ).
65              */
66             static ExpressionNodeSharedPtr createComposedExpression  ( const ExpressionNodeSharedPtr&   rOuterFunction,
67                                                                        const ExpressionNodeSharedPtr&   rInnerFunction );
68 
69             static ExpressionNodeSharedPtr createMinExpression      ( const ExpressionNodeSharedPtr&    rOuterFunction,
70                                                                       const ExpressionNodeSharedPtr&    rInnerFunction );
71 
72             static ExpressionNodeSharedPtr createMaxExpression      ( const ExpressionNodeSharedPtr&    rOuterFunction,
73                                                                       const ExpressionNodeSharedPtr&    rInnerFunction );
74         };
75     }
76 }
77 
78 #endif /* INCLUDED_SLIDESHOW_EXPRESSIONNODEFACTORY_HXX */
79