blob: 83e6f1691bc6b969bcc9eba8df56503f75bece01 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
//
// MCOIndexSet.h
// mailcore2
//
// Created by DINH Viêt Hoà on 3/23/13.
// Copyright (c) 2013 MailCore. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <MailCore/MCORange.h>
#ifndef __MAILCORE_MCOINDEXSET_H_
#define __MAILCORE_MCOINDEXSET_H_
// similar to NSMutableIndexSet but supports int64_t
@interface MCOIndexSet : NSObject <NSCopying>
+ (MCOIndexSet *) indexSet;
+ (MCOIndexSet *) indexSetWithRange:(MCORange)range;
+ (MCOIndexSet *) indexSetWithIndex:(uint64_t)idx;
- (unsigned int) count;
- (void) addIndex:(uint64_t)idx;
- (void) removeIndex:(uint64_t)idx;
- (BOOL) containsIndex:(uint64_t)idx;
- (void) addRange:(MCORange)range;
- (void) removeRange:(MCORange)range;
- (void) intersectsRange:(MCORange)range;
- (MCORange *) allRanges;
- (unsigned int) rangesCount;
@end
#endif
|