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 _CONNECTIVITY_MACAB_HEADER_HXX_
25 #define _CONNECTIVITY_MACAB_HEADER_HXX_
26 
27 #include "MacabRecord.hxx"
28 #include <cppuhelper/compbase3.hxx>
29 
30 namespace connectivity
31 {
32 	namespace macab
33 	{
34 		class MacabHeader: public MacabRecord{
35 			protected:
36 				macabfield **sortRecord(sal_Int32 _start, sal_Int32 _length);
37 			public:
38 				MacabHeader();
39 				MacabHeader(const sal_Int32 _size, macabfield **_fields);
40 				virtual ~MacabHeader();
41 				void operator+= (const MacabHeader *r);
42 				::rtl::OUString getString(const sal_Int32 i) const;
43 				void sortRecord();
44 				sal_Int32 getColumnNumber(const ::rtl::OUString s) const;
45 
46 				static sal_Int32 compareFields(const macabfield *_field1, const macabfield *_field2);
47 
48 				MacabHeader *begin();
49 				sal_Int32 end() const;
50 				class iterator{
51 					protected:
52 						sal_Int32 id;
53 						MacabHeader *record;
54 					public:
55 						void operator= (MacabHeader *_record);
56 						iterator();
57 						~iterator();
58 						void operator++ ();
59 						sal_Bool operator!= (const sal_Int32 i) const;
60 						sal_Bool operator== (const sal_Int32 i) const;
61 						macabfield *operator* () const;
62 				};
63 		};
64 	}
65 }
66 
67 #endif // _CONNECTIVITY_MACAB_HEADER_HXX_
68