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