xref: /trunk/main/chart2/source/model/inc/DataSeriesTree.hxx (revision 91144cd0085a7583d2099b982122deb2184ab956)
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 #ifndef CHART_DATASERIESTREE_HXX
24 #define CHART_DATASERIESTREE_HXX
25 
26 #include <cppuhelper/implbase2.hxx>
27 
28 #include "ServiceMacros.hxx"
29 #include <com/sun/star/uno/XComponentContext.hpp>
30 #include <com/sun/star/lang/XServiceInfo.hpp>
31 #include <com/sun/star/chart2/XDataSeriesTreeParent.hpp>
32 
33 #include <vector>
34 
35 namespace chart
36 {
37 
38 class DataSeriesTree : public
39     ::cppu::WeakImplHelper2<
40     ::com::sun::star::lang::XServiceInfo,
41     ::com::sun::star::chart2::XDataSeriesTreeParent >
42 {
43 public:
44     DataSeriesTree( const ::com::sun::star::uno::Reference<
45                     ::com::sun::star::uno::XComponentContext > & xContext );
46     virtual ~DataSeriesTree();
47 
48     /// declare XServiceInfo methods
49     APPHELPER_XSERVICEINFO_DECL()
50     /// establish methods for factory instantiation
51     APPHELPER_SERVICE_FACTORY_HELPER( DataSeriesTree )
52 
53 protected:
54 
55     // ____ XDataSeriesTreeParent ____
56     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSeriesTreeNode > >
57         SAL_CALL getChildren();
58     virtual void SAL_CALL setChildren(
59         const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSeriesTreeNode > >& aNewChildren );
60     virtual void SAL_CALL addChild(
61         const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSeriesTreeNode >& aNode );
62     virtual void SAL_CALL removeChild(
63         const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSeriesTreeNode >& aNode );
64 
65     // ____ XDataSeriesTreeNode ____
66 
67 private:
68     typedef ::std::vector< ::com::sun::star::uno::Reference<
69         ::com::sun::star::chart2::XDataSeriesTreeNode > >
70         m_tChildType;
71 
72     m_tChildType   m_aChildren;
73 
74     ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
75         m_xContext;
76 };
77 
78 } //  namespace chart
79 
80 // CHART_DATASERIESTREE_HXX
81 #endif
82