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_DRAWINGLAYER_PRIMITIVE2D_INFOHIERARCHYPRIMITIVE2D_HXX
25 #define INCLUDED_DRAWINGLAYER_PRIMITIVE2D_INFOHIERARCHYPRIMITIVE2D_HXX
26 
27 #include <drawinglayer/drawinglayerdllapi.h>
28 #include <drawinglayer/primitive2d/groupprimitive2d.hxx>
29 #include <tools/string.hxx>
30 
31 //////////////////////////////////////////////////////////////////////////////
32 
33 namespace drawinglayer
34 {
35 	namespace primitive2d
36 	{
37         /** ObjectInfoPrimitive2D class
38 
39             Info hierarchy helper class to hold contents like Name, Title and
40             Description which are valid for the child content, e.g. created for
41             primitives based on DrawingLayer objects or SVG parts. It decomposes
42             to it's content, so all direct renderers may ignore it. May e.g.
43             be used when re-creating graphical content from a sequence of primitives
44          */
45 		class DRAWINGLAYER_DLLPUBLIC ObjectInfoPrimitive2D : public GroupPrimitive2D
46 		{
47 		private:
48             rtl::OUString                           maName;
49             rtl::OUString                           maTitle;
50             rtl::OUString                           maDesc;
51 
52         public:
53             /// constructor
54 			ObjectInfoPrimitive2D(
55                 const Primitive2DSequence& rChildren,
56                 const rtl::OUString& rName,
57                 const rtl::OUString& rTitle,
58                 const rtl::OUString& rDesc);
59 
60 			/// data read access
getName() const61 			const rtl::OUString& getName() const { return maName; }
getTitle() const62 			const rtl::OUString& getTitle() const { return maTitle; }
getDesc() const63 			const rtl::OUString& getDesc() const { return maDesc; }
64 
65 			/// compare operator
66 			virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
67 
68             /// provide unique ID
69 			DeclPrimitrive2DIDBlock()
70 		};
71 	} // end of namespace primitive2d
72 } // end of namespace drawinglayer
73 
74 //////////////////////////////////////////////////////////////////////////////
75 
76 #endif //INCLUDED_DRAWINGLAYER_PRIMITIVE2D_INFOHIERARCHYPRIMITIVE2D_HXX
77 
78 //////////////////////////////////////////////////////////////////////////////
79 // eof
80