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 SUBCOMPONENTS_HXX 25 #define SUBCOMPONENTS_HXX 26 27 #include "dbaccessdllapi.h" 28 29 /** === begin UNO includes === **/ 30 #include <com/sun/star/sdb/application/DatabaseObject.hpp> 31 /** === end UNO includes === **/ 32 33 #include <rtl/ustring.hxx> 34 35 #include <hash_map> 36 #include <map> 37 38 //........................................................................ 39 namespace dbaccess 40 { 41 //........................................................................ 42 43 namespace DatabaseObject = ::com::sun::star::sdb::application::DatabaseObject; 44 45 // ------------------------------------------------------------------- 46 enum SubComponentType 47 { 48 TABLE = DatabaseObject::TABLE, 49 QUERY = DatabaseObject::QUERY, 50 FORM = DatabaseObject::FORM, 51 REPORT = DatabaseObject::REPORT, 52 53 RELATION_DESIGN = 1000, 54 55 UNKNOWN = 10001 56 }; 57 58 // ------------------------------------------------------------------- 59 struct DBACCESS_DLLPRIVATE SubComponentDescriptor 60 { 61 ::rtl::OUString sName; 62 bool bForEditing; 63 SubComponentDescriptordbaccess::SubComponentDescriptor64 SubComponentDescriptor() 65 :sName() 66 ,bForEditing( false ) 67 { 68 } 69 SubComponentDescriptordbaccess::SubComponentDescriptor70 SubComponentDescriptor( const ::rtl::OUString& i_rName, const bool i_bForEditing ) 71 :sName( i_rName ) 72 ,bForEditing( i_bForEditing ) 73 { 74 } 75 }; 76 77 // ------------------------------------------------------------------- 78 typedef ::std::hash_map< ::rtl::OUString, SubComponentDescriptor, ::rtl::OUStringHash > MapStringToCompDesc; 79 typedef ::std::map< SubComponentType, MapStringToCompDesc > MapCompTypeToCompDescs; 80 81 82 //........................................................................ 83 } // namespace dbaccess 84 //........................................................................ 85 86 #endif // SUBCOMPONENTS_HXX 87