diff --git a/Algorithm.h b/Algorithm.h new file mode 100644 index 0000000..eafb9e1 --- /dev/null +++ b/Algorithm.h @@ -0,0 +1,14 @@ +// +// Algorithm.h +// GodEngine +// +// Created by Saturneric on 17/1/29. +// Copyright © 2017年 Bakantu Eric. All rights reserved. +// + +@interface findByString : NSObject + +@property(nonatomic)NSString *targetName; +@property(nonatomic)NSArray *targetArray; + +@end diff --git a/Effect.h b/Effect.h new file mode 100644 index 0000000..57d48e4 --- /dev/null +++ b/Effect.h @@ -0,0 +1,24 @@ +// +// Effect.h +// GodEngine +// +// Created by Saturneric on 17/1/25. +// Copyright © 2017年 Bakantu Eric. All rights reserved. +// + +#import "Engine.h" + +@interface GEEffect : NSObject + +@property(nonatomic)NSSet *requireObjectType; +@property(nonatomic)NSSet *requirePropertyName; +@property(nonatomic)id function; + +- (void)setRequireObjectType:(NSSet *)requireObjectType; +- (void)addRequireObjectType:(NSSet *)typeName; +- (void)setRequireObject:(NSSet *)objects; +- (void)setFunction:(id)function; +- (void)startMeasure; + +@end + diff --git a/Effect.m b/Effect.m new file mode 100644 index 0000000..01286b5 --- /dev/null +++ b/Effect.m @@ -0,0 +1,9 @@ +// +// Effect.m +// GodEngine +// +// Created by Saturneric on 17/1/25. +// Copyright © 2017年 Bakantu Eric. All rights reserved. +// + +#import "Effect.h" diff --git a/Engine.h b/Engine.h new file mode 100644 index 0000000..ae6d6bc --- /dev/null +++ b/Engine.h @@ -0,0 +1,10 @@ +// +// Engine.h +// GodEngine +// +// Created by Saturneric on 17/1/29. +// Copyright © 2017年 Bakantu Eric. All rights reserved. +// + +#import +#import "Algorithm.h" diff --git a/Object.h b/Object.h new file mode 100644 index 0000000..6069f53 --- /dev/null +++ b/Object.h @@ -0,0 +1,82 @@ +// +// Object.h +// GodEngine +// +// Created by Saturneric on 17/1/25. +// Copyright © 2017年 Bakantu Eric. All rights reserved. +// + +#import "Engine.h" + +#define VECTOR 0 +#define SCARLAR 1 + +@interface GEUniverse : NSObject + +@property(nonatomic)NSSet *specialPropertyList; +@property(nonatomic)NSString *universeID; +@property(nonatomic)NSArray *objects; + + +@end + +@interface GEObjectGroup : NSObject + +@property(nonatomic)NSSet *defaultPropertyList; + +@end + +@interface GEProperty : NSObject + +@property(nonatomic) NSString *name; +@property(nonatomic) NSInteger type; +@property(nonatomic) id variable; + +- (void)setPropertyName:(NSString *)name; +- (void)setPropertyVariable:(NSInteger)type variable:(id) variable; +@end + +@interface GEVector : NSObject + +@property(assign,nonatomic) NSInteger demention; +@property(nonatomic) NSArray *describtion; + +- (void)setDemention:(NSInteger)dementionNumber; +- (void)setVectorValue:(NSInteger)demention value:(NSSwappedDouble)value; +- (void)setVectorValues:(NSArray *) describtion; +- (NSSwappedDouble *)getVectorValue:(NSInteger) demention; +- (NSArray *)getVectorValues; + +@end + +@interface GEScalar : NSObject + +@property(nonatomic) NSSwappedDouble value; + +- (void)setScalarValue:(NSSwappedDouble)value; +- (NSSwappedDouble)getScalarValue; + +@end + +@interface GEObject : NSObject + +@property(nonatomic) NSDictionary *defaultProperty; +@property(nonatomic) NSDictionary *specialProperty; +@property(nonatomic) NSString *type; +@property(nonatomic) NSString *objectID; +@property(nonatomic) NSString *groupID; +@property(nonatomic) NSString *universeID; +@property(nonatomic) GEUniverse *container; +@property(nonatomic) GEObjectGroup *group; + + +- (GEProperty *)getDefultPropertyWithName:(NSString *)name; +- (GEProperty *)getSpecialPropertyWithName:(NSString *)name; +- (void)setSpecialProperty:(GEProperty *)property; +- (void)setDefultProperty:(GEProperty *)property; +- (void)addSpecialProperties:(NSDictionary *) properties; +- (void)addDefaultProperties:(NSDictionary *) properties; +- (void)initWithProperties:(NSDictionary *) properties universe:(GEUniverse *)container group:(GEObjectGroup *) group; + + +@end diff --git a/Object.m b/Object.m new file mode 100644 index 0000000..de314a4 --- /dev/null +++ b/Object.m @@ -0,0 +1,45 @@ +// +// Object.m +// GodEngine +// +// Created by Saturneric on 17/1/25. +// Copyright © 2017年 Bakantu Eric. All rights reserved. +// + +#import "Object.h" + + +@implementation GEObject + +- (void)addDefultProperty:(GEProperty *)property{ + +} + +- (void)initWithProperties:(NSDictionary *) properties universe:(GEUniverse *)container group:(GEObjectGroup *) group{ + self.objectID = [[NSUUID UUID] UUIDString]; + self.universeID = container.universeID; + self.container = container; + NSString *p_property = nil; + self.specialProperty = [[NSDictionary alloc] init]; + for (p_property in container.specialPropertyList){ + [self.specialProperty insertValue:[properties objectForKey:p_property] inPropertyWithKey:p_property]; + } + for (p_property in group.defaultPropertyList){ + [self.defaultProperty insertValue:[properties objectForKey:p_property] inPropertyWithKey:p_property]; + } + +} + +-(GEProperty *)getSpecialPropertyWithName:(NSString *)name{ + return [self.specialProperty objectForKey:name]; +} + +-(GEProperty *)getDefultPropertyWithName:(NSString *)name{ + return [self.specialProperty objectForKey:name]; +} + +-(void)addSpecialProperty:(GEProperty *)property{ + [self.specialProperty insertValue:<#(nonnull id)#> inPropertyWithKey:<#(nonnull NSString *)#>] +} + +@end diff --git a/Time.h b/Time.h new file mode 100644 index 0000000..cf244c7 --- /dev/null +++ b/Time.h @@ -0,0 +1,41 @@ +// +// Time.h +// GodEngine +// +// Created by Saturneric on 17/1/25. +// Copyright © 2017年 Bakantu Eric. All rights reserved. +// + +#import "Engine.h" +#import "Update.h" + +@interface GETime : NSObject + +@property(nonatomic) NSUInteger *moment; + +@end + +@interface GEPhoto : NSObject + +@property (nonatomic)NSMutableArray *record; +@property (nonatomic)GETime* time; +@property (nonatomic)NSMutableArray *finalRecord; + +@end + +@interface GETimeLine : NSObject + +@property(strong,nonatomic)NSMutableArray *line; +@property(strong,nonatomic)NSString *timeLineID; +@property(nonatomic)GEPhoto *linePhoto; +@property(nonatomic)NSInteger *precision; + +@end + +@interface GENowMonent : NSObject + +@property(nonatomic)GEPhoto *thisPhoto; +@property(nonatomic)GETime *thisTime; +@property(nonatomic)GETimeLine *thisTimeLine; + +@end diff --git a/Time.m b/Time.m new file mode 100644 index 0000000..cceb151 --- /dev/null +++ b/Time.m @@ -0,0 +1,9 @@ +// +// Time.m +// GodEngine +// +// Created by Saturneric on 17/1/25. +// Copyright © 2017年 Bakantu Eric. All rights reserved. +// + +#import "Time.h" diff --git a/Update.h b/Update.h new file mode 100644 index 0000000..db100ec --- /dev/null +++ b/Update.h @@ -0,0 +1,26 @@ +// +// Update.h +// GodEngine +// +// Created by Saturneric on 17/1/29. +// Copyright © 2017年 Bakantu Eric. All rights reserved. +// + +#import "Engine.h" +#import "Object.h" + +@interface GEUpdate : NSObject + +@property(nonatomic)NSArray *relatedObjectID; +@property(nonatomic)NSArray *changeAction; + +@end + +@interface GEAction : NSObject + +@property(nonatomic)GEProperty *historyProperty; +@property(nonatomic)GEProperty *changedProperty; + +@end + + diff --git a/Update.m b/Update.m new file mode 100644 index 0000000..8079489 --- /dev/null +++ b/Update.m @@ -0,0 +1,9 @@ +// +// Update.m +// GodEngine +// +// Created by Saturneric on 17/1/29. +// Copyright © 2017年 Bakantu Eric. All rights reserved. +// + +#import "Update.h" diff --git a/main.m b/main.m new file mode 100644 index 0000000..c4cbe48 --- /dev/null +++ b/main.m @@ -0,0 +1,17 @@ +// +// main.m +// GodEngine +// +// Created by Saturneric on 17/1/25. +// Copyright © 2017年 Bakantu Eric. All rights reserved. +// + +#import "Engine.h" + +int main(int argc, const char * argv[]) { + @autoreleasepool { + // insert code here... + NSLog(@"Hello, World!"); + } + return 0; +}