/** * Autogenerated by Thrift * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ /** * @generated by Thrift */ #import #import "TProtocol.h" #import "TApplicationException.h" #import "TProtocolException.h" #import "TProtocolUtil.h" #import "TProcessor.h" #import "TObjective-C.h" #import "TBase.h" #import "TBaseStruct.h" #import "TBaseException.h" #import "module.h" NSString* exampleExampleToString(const exampleExample value) { switch(value) { case exampleExample_caseA: return @"exampleExample_caseA"; case exampleExample_caseB: return @"exampleExample_caseB"; } return [NSString stringWithFormat:@"exampleExample_%d", (int)value]; } exampleExample exampleExampleFromString(NSString *str, int fallbackValue) { static NSDictionary *mapping = nil; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ mapping = @{ @"exampleExample_caseA": @(exampleExample_caseA), @"exampleExample_caseB": @(exampleExample_caseB), }; }); return mapping[str] ? [mapping[str] intValue] : fallbackValue; }