1
/******************************************************************************
3
* Purpose: Declaration of the VecSegIndex class.
5
* This class is used to manage a vector segment data block index. There
6
* will be two instances created, one for the record data (sec_record) and
7
* one for the vertices (sec_vert). This class is exclusively a private
8
* helper class for VecSegHeader.
10
******************************************************************************
12
* PCI Geomatics, 50 West Wilmot Street, Richmond Hill, Ont, Canada
14
* Permission is hereby granted, free of charge, to any person obtaining a
15
* copy of this software and associated documentation files (the "Software"),
16
* to deal in the Software without restriction, including without limitation
17
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
18
* and/or sell copies of the Software, and to permit persons to whom the
19
* Software is furnished to do so, subject to the following conditions:
21
* The above copyright notice and this permission notice shall be included
22
* in all copies or substantial portions of the Software.
24
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
25
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
27
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
29
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
30
* DEALINGS IN THE SOFTWARE.
31
****************************************************************************/
33
#ifndef __INCLUDE_SEGMENT_VECSEGDATAINDEX_H
34
#define __INCLUDE_SEGMENT_VECSEGDATAINDEX_H
36
#include "pcidsk_config.h"
37
#include "pcidsk_types.h"
38
#include "pcidsk_vectorsegment.h"
47
friend class CPCIDSKVectorSegment;
48
friend class VecSegHeader;
54
void Initialize( CPCIDSKVectorSegment *seg,
57
uint32 SerializedSize();
62
const std::vector<uint32> *GetIndex();
63
void AddBlockToIndex( uint32 block );
64
void VacateBlockRange( uint32 start, uint32 count );
66
uint32 GetSectionEnd();
67
void SetSectionEnd( uint32 new_size );
70
CPCIDSKVectorSegment *vs;
74
uint32 offset_on_disk_within_section;
77
bool block_initialized;
80
std::vector<uint32> block_index;
83
} // end namespace PCIDSK
85
#endif // __INCLUDE_SEGMENT_VECSEGDATAINDEX_H