Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*
3 : : * This file is part of the LibreOffice project.
4 : : *
5 : : * This Source Code Form is subject to the terms of the Mozilla Public
6 : : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : : *
9 : : * This file incorporates work covered by the following license notice:
10 : : *
11 : : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : : * contributor license agreements. See the NOTICE file distributed
13 : : * with this work for additional information regarding copyright
14 : : * ownership. The ASF licenses this file to you under the Apache
15 : : * License, Version 2.0 (the "License"); you may not use this file
16 : : * except in compliance with the License. You may obtain a copy of
17 : : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : : */
19 : :
20 : : #ifndef SUBCOMPONENTS_HXX
21 : : #define SUBCOMPONENTS_HXX
22 : :
23 : : #include "dbaccessdllapi.h"
24 : :
25 : : #include <com/sun/star/sdb/application/DatabaseObject.hpp>
26 : :
27 : : #include <rtl/ustring.hxx>
28 : :
29 : : #include <boost/unordered_map.hpp>
30 : : #include <map>
31 : :
32 : : //........................................................................
33 : : namespace dbaccess
34 : : {
35 : : //........................................................................
36 : :
37 : : namespace DatabaseObject = ::com::sun::star::sdb::application::DatabaseObject;
38 : :
39 : : // -------------------------------------------------------------------
40 : : enum SubComponentType
41 : : {
42 : : TABLE = DatabaseObject::TABLE,
43 : : QUERY = DatabaseObject::QUERY,
44 : : FORM = DatabaseObject::FORM,
45 : : REPORT = DatabaseObject::REPORT,
46 : :
47 : : RELATION_DESIGN = 1000,
48 : :
49 : : UNKNOWN = 10001
50 : : };
51 : :
52 : : // -------------------------------------------------------------------
53 : 0 : struct DBACCESS_DLLPRIVATE SubComponentDescriptor
54 : : {
55 : : ::rtl::OUString sName;
56 : : bool bForEditing;
57 : :
58 : 0 : SubComponentDescriptor()
59 : : :sName()
60 : 0 : ,bForEditing( false )
61 : : {
62 : 0 : }
63 : :
64 : : SubComponentDescriptor( const ::rtl::OUString& i_rName, const bool i_bForEditing )
65 : : :sName( i_rName )
66 : : ,bForEditing( i_bForEditing )
67 : : {
68 : : }
69 : : };
70 : :
71 : : // -------------------------------------------------------------------
72 : : typedef ::boost::unordered_map< ::rtl::OUString, SubComponentDescriptor, ::rtl::OUStringHash > MapStringToCompDesc;
73 : : typedef ::std::map< SubComponentType, MapStringToCompDesc > MapCompTypeToCompDescs;
74 : :
75 : :
76 : : //........................................................................
77 : : } // namespace dbaccess
78 : : //........................................................................
79 : :
80 : : #endif // SUBCOMPONENTS_HXX
81 : :
82 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|