| 1 |
/* |
| 2 |
Copyright (C) 2018, 2019, 2020, 2021 Free Software Foundation, Inc. |
| 3 |
|
| 4 |
Written by: Gregory John Casamento <[email protected]> |
| 5 |
Date: 2022 |
| 6 |
|
| 7 |
This file is part of the GNUstep XCode Library |
| 8 |
|
| 9 |
This library is free software; you can redistribute it and/or |
| 10 |
modify it under the terms of the GNU Lesser General Public |
| 11 |
License as published by the Free Software Foundation; either |
| 12 |
version 2 of the License, or (at your option) any later version. |
| 13 |
|
| 14 |
This library is distributed in the hope that it will be useful, |
| 15 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 17 |
Lesser General Public License for more details. |
| 18 |
|
| 19 |
You should have received a copy of the GNU Lesser General Public |
| 20 |
License along with this library; if not, write to the Free |
| 21 |
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 22 |
Boston, MA 02110 USA. |
| 23 |
*/ |
| 24 |
|
| 25 |
#import "PBXCommon.h" |
| 26 |
#import "XCVersionGroup.h" |
| 27 |
|
| 28 |
@implementation XCVersionGroup |
| 29 |
|
| 30 |
// Methods.... |
| 31 |
- (NSString *) sourceTree // getter |
| 32 |
{ |
| 33 |
return sourceTree; |
| 34 |
} |
| 35 |
|
| 36 |
- (void) setSourceTree: (NSString *)object; // setter |
| 37 |
{ |
| 38 |
ASSIGN(sourceTree,object); |
| 39 |
} |
| 40 |
|
| 41 |
- (PBXFileReference *) currentVersion // getter |
| 42 |
{ |
| 43 |
return currentVersion; |
| 44 |
} |
| 45 |
|
| 46 |
- (void) setCurrentVersion: (PBXFileReference *)object; // setter |
| 47 |
{ |
| 48 |
ASSIGN(currentVersion,object); |
| 49 |
} |
| 50 |
|
| 51 |
- (NSString *) versionGroupType // getter |
| 52 |
{ |
| 53 |
return versionGroupType; |
| 54 |
} |
| 55 |
|
| 56 |
- (void) setVersionGroupType: (NSString *)object; // setter |
| 57 |
{ |
| 58 |
ASSIGN(versionGroupType,object); |
| 59 |
} |
| 60 |
|
| 61 |
- (NSString *) path // getter |
| 62 |
{ |
| 63 |
return path; |
| 64 |
} |
| 65 |
|
| 66 |
- (void) setPath: (NSString *)object; // setter |
| 67 |
{ |
| 68 |
ASSIGN(path,object); |
| 69 |
} |
| 70 |
|
| 71 |
- (NSString *) buildPath |
| 72 |
{ |
| 73 |
return [self path]; |
| 74 |
} |
| 75 |
|
| 76 |
- (NSMutableArray *) children // getter |
| 77 |
{ |
| 78 |
return children; |
| 79 |
} |
| 80 |
|
| 81 |
- (void) setChildren: (NSMutableArray *)object; // setter |
| 82 |
{ |
| 83 |
ASSIGN(children,object); |
| 84 |
} |
| 85 |
|
| 86 |
- (void) setTarget: (NSString *)target |
| 87 |
{ |
| 88 |
} |
| 89 |
|
| 90 |
- (void) setTotalFiles: (NSUInteger)total |
| 91 |
{ |
| 92 |
_totalFiles = total; |
| 93 |
} |
| 94 |
|
| 95 |
- (NSUInteger) totalFiles |
| 96 |
{ |
| 97 |
return _totalFiles; |
| 98 |
} |
| 99 |
|
| 100 |
|
| 101 |
- (BOOL) build |
| 102 |
{ |
| 103 |
NSEnumerator *en = [children objectEnumerator]; |
| 104 |
id o = nil; |
| 105 |
BOOL result = YES; |
| 106 |
while((o = [en nextObject]) != nil && result) |
| 107 |
{ |
| 108 |
xcputs([[NSString stringWithFormat: @"\tProcessing %@",[o path]] cString]); |
| 109 |
} |
| 110 |
return result; |
| 111 |
} |
| 112 |
|
| 113 |
@end |