1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/bindings/Cocoa/MYVersionDictionary.h Thu Sep 24 21:47:06 2009 -0700
1.3 @@ -0,0 +1,55 @@
1.4 +//
1.5 +// MYVersionDictionary.h
1.6 +// Ottoman
1.7 +//
1.8 +// Created by Jens Alfke on 9/21/09.
1.9 +// Copyright 2009 Jens Alfke. All rights reserved.
1.10 +//
1.11 +
1.12 +#import <Foundation/NSDictionary.h>
1.13 +
1.14 +#ifdef __cplusplus
1.15 +namespace Mooseyard {
1.16 + class OverlayDictionary;
1.17 + class VersionDictionary;
1.18 +}
1.19 +#endif
1.20 +
1.21 +
1.22 +/** A persistent NSDictionary embedded in a memory-mapped file,
1.23 + representing one complete version of a MYOttoman dictionary. */
1.24 +@interface MYVersionDictionary : NSDictionary
1.25 +{
1.26 +#ifdef __cplusplus
1.27 + const Mooseyard::VersionDictionary *_dict;
1.28 +#else
1.29 + void *_dict;
1.30 +#endif
1.31 +}
1.32 +
1.33 +/** The generation number. The first version in a new file is zero. */
1.34 +@property (readonly) int generation;
1.35 +
1.36 +/** The time at which this version was written to the file. */
1.37 +@property (readonly) NSDate *dateCreated;
1.38 +
1.39 +/** The previous version, before this one was saved. */
1.40 +@property (readonly) MYVersionDictionary *previousVersion;
1.41 +
1.42 +/** Is this the latest version in the file? */
1.43 +@property (readonly) BOOL isLatestVersion;
1.44 +
1.45 +@end
1.46 +
1.47 +
1.48 +
1.49 +@interface MYCurrentVersionDictionary : NSMutableDictionary
1.50 +{
1.51 +#ifdef __cplusplus
1.52 + Mooseyard::OverlayDictionary *_dict;
1.53 +#else
1.54 + void *_dict;
1.55 +#endif
1.56 +}
1.57 +
1.58 +@end