//
//  CCHCompoundItemFilter.h
//  Chikoo
//
//  Created by Shlok Datye on 25.03.2013.
//  Copyright (c) 2013 Coding Turtle. All rights reserved.
//

//This class should never be subclassed.

#import <Foundation/Foundation.h>
#import "CCHItemFilter.h"
#import "CODPropertyListRepresentationProtocol.h"


typedef NS_ENUM(NSUInteger, CCHCompoundItemFilterMode) {
  CCHCompoundItemFilterModeAll,
  CCHCompoundItemFilterModeAny,
  CCHCompoundItemFilterModeNone
};


@interface CCHCompoundItemFilter : CCHItemFilter <CODPropertyListRepresentationProtocol>

//any subfilters that we add to this must also adopt CODPropertyListRepresentationProtocol
@property(readonly) NSMutableArray *subfilters;
@property(readwrite) CCHCompoundItemFilterMode mode; //defaults to “all”

//“Whole gamut” in the sense that it contains “all” the UUIDs---for now the attribute UUIDs and type group UUIDs.
//Later, this could include “tag attribute” UUIDs. See the comments for the “associatedUuidStrings” method in CCHItemFilter.
- (void)removeItemFiltersThatHaveAtLeastOneAssociatedUuidStringThatIsNotInTheWholeGamutOfUuidStrings:(NSSet *)wholeGamutOfUuidStrings;

//Recursive aggregation of all the associated UUID strings (obtained with “associatedUuidStrings”) for all the subfilters.
- (NSSet *)recursivelyAggregatedAssociatedUuidStrings;

@end
