Skip to content

Draft PR with multiple changes #35

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 24 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
e0dadf9
Added support for decoupled, type-dependent node-encoding strategies
regexident Oct 5, 2018
be560c1
Added missing visibility declarations
regexident Oct 1, 2018
f14b02b
Improved `.gitignore` and removed tracked `*.xcuserdata` files
regexident Oct 1, 2018
50c00a5
Made `XMLEncoder.OutputFormatting.prettyPrinted` actually do something
regexident Oct 1, 2018
faddb3f
Add tvOS deployment target to podspec
evandcoleman Oct 24, 2018
3c713ef
Fixing Carthage command
salavert Oct 22, 2018
f971d69
set deployment versions to allow older SDKs
Lutzifer Oct 16, 2018
c7c8107
Add Info.plist to allow Framework use in App Store Connect via Carthage
Lutzifer Oct 16, 2018
73f3830
set CURRENT_PROJECT_VERSION
Lutzifer Oct 17, 2018
6d14773
Add convertFromCapitalized strategy, simple test
MaxDesiatov Oct 27, 2018
292cea9
add some sources from CHDataStructures
Nov 23, 2018
aa1d32e
Use CHOrderedDictionary instead of NSMutableDictionary
Nov 23, 2018
ff41377
Additional use CHOrderedDictionary instead of NSMutableDictionary
Nov 23, 2018
9cc358f
Trying to get rid of the nullability warnings
Nov 23, 2018
e995c9e
[proj] Exclude the bridging header file from public framework headers
Nov 24, 2018
48dbc32
[proj] dark magic with modulemap to hide internal usage of objc classes
Nov 24, 2018
bb11d60
[proj] change iOS minimum deployment target
Nov 24, 2018
b6dddd6
Install objc compat header (*-Swift.h) -> make Carthage happy
Nov 25, 2018
f9906cf
Fix testing project
Dec 2, 2018
b6ef543
Standard compliant treatment of present empty elements and support of…
Dec 2, 2018
cfc9117
trying to fix the bundle signature issues
Dec 2, 2018
c7def6a
ignore .idea folder
Dec 3, 2018
10dd707
Add support for SNAKE_UPPERCASE key encoding / decoding strategy
Dec 3, 2018
c299fe7
Improve working with numbers
Dec 16, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
157 changes: 155 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,156 @@

# Created by https://www.gitignore.io/api/swift

### Swift ###
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore

## Build generated
build/
DerivedData/

## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/

## Other
*.moved-aside
*.xccheckout
*.xcscmblueprint

## Obj-C/Swift specific
*.hmap
*.ipa
*.dSYM.zip
*.dSYM

## Playgrounds
timeline.xctimeline
playground.xcworkspace

# Swift Package Manager
#
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
# Packages/
# Package.pins
# Package.resolved
.build/

# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
# Pods/
#
# Add this line if you want to avoid checking in source code from the Xcode workspace
# *.xcworkspace

# Carthage
#
# Add this line if you want to avoid checking in source code from Carthage dependencies.
# Carthage/Checkouts

Carthage/Build

# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/#source-control

fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots/**/*.png
fastlane/test_output

# Code Injection
#
# After new code Injection tools there's a generated folder /iOSInjectionProject
# https://github.com/johnno1962/injectionforxcode

iOSInjectionProject/


# End of https://www.gitignore.io/api/swift

# Created by https://www.gitignore.io/api/xcode

### Xcode ###
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore

## User settings
xcuserdata/

## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9)
*.xcscmblueprint
*.xccheckout

## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4)
build/
DerivedData/
*.moved-aside
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3

### Xcode Patch ###
*.xcodeproj/*
!*.xcodeproj/project.pbxproj
!*.xcodeproj/xcshareddata/
!*.xcworkspace/contents.xcworkspacedata
/*.gcno


# End of https://www.gitignore.io/api/xcode

# Created by https://www.gitignore.io/api/macos

### macOS ###
# General
.DS_Store
/.build
/Packages
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk


# End of https://www.gitignore.io/api/macos
.idea
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ $ brew install carthage
Inside of your `Cartfile`, specify XMLParsing:

```ogdl
github "ShawmMoore/XMLParsing"
github "ShawnMoore/XMLParsing"
```

Then, run the following command to build the framework:
Expand Down
76 changes: 76 additions & 0 deletions Sources/XMLParsing/CHDataStructures/CHCircularBuffer.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
/*
CHDataStructures.framework -- CHCircularBuffer.h

Copyright (c) 2009-2010, Quinn Taylor <http://homepage.mac.com/quinntaylor>

This source code is released under the ISC License. <http://www.opensource.org/licenses/isc-license>

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

The software is provided "as is", without warranty of any kind, including all implied warranties of merchantability and fitness. In no event shall the authors or copyright holders be liable for any claim, damages, or other liability, whether in an action of contract, tort, or otherwise, arising from, out of, or in connection with the software or the use or other dealings in the software.
*/

#import "Util.h"

/**
@file CHCircularBuffer.h

A circular buffer array.
*/

/**
A <a href="http://en.wikipedia.org/wiki/Circular_buffer">circular buffer</a> is a structure that emulates a continuous ring of N data slots. This class uses a C array and tracks the indexes of the front and back elements in the buffer, such that the first element is treated as logical index 0 regardless of where it is actually stored. The buffer dynamically expands to accommodate added objects. This type of storage is ideal for scenarios where objects are added and removed only at one or both ends (such as a stack or queue) but still supports all normal NSMutableArray functionality.

@note Any method inherited from NSArray or NSMutableArray is supported by this class and its children. Please see the documentation for those classes for details.
*/
@interface CHCircularBuffer : NSMutableArray {
__strong id *array; // Primitive C array for storing collection contents.
NSUInteger arrayCapacity; // How many pointers @a array can accommodate.
NSUInteger count; // The number of objects currently in the buffer.
NSUInteger headIndex; // The array index of the first object.
NSUInteger tailIndex; // The array index after the last object.
unsigned long mutations; // Tracks mutations for NSFastEnumeration.
}

// The following methods are undocumented since they are only reimplementations.
// Users should consult the API documentation for NSArray and NSMutableArray.

- (id) init;
- (id) initWithArray:(NSArray*)anArray;

// This is the designated initializer for CHCircularBuffer.
- (id) initWithCapacity:(NSUInteger)capacity NS_DESIGNATED_INITIALIZER;

#pragma mark <NSCoding>

- (id) initWithCoder:(NSCoder*)decoder;

- (NSArray*) allObjects;
- (BOOL) containsObject:(id)anObject;
- (BOOL) containsObjectIdenticalTo:(id)anObject;
- (void) exchangeObjectAtIndex:(NSUInteger)idx1 withObjectAtIndex:(NSUInteger)idx2;
- (id) firstObject;
- (NSUInteger) indexOfObject:(id)anObject;
- (NSUInteger) indexOfObjectIdenticalTo:(id)anObject;
- (id) lastObject;
- (NSEnumerator*) objectEnumerator;
- (NSArray*) objectsAtIndexes:(NSIndexSet*)indexes;
- (void) removeAllObjects;
- (void) removeFirstObject;
- (void) removeLastObject;
- (void) removeObject:(id)anObject;
- (void) removeObjectIdenticalTo:(id)anObject;
- (void) removeObjectsAtIndexes:(NSIndexSet*)indexes;
- (void) replaceObjectAtIndex:(NSUInteger)index withObject:(id)anObject;
- (NSEnumerator*) reverseObjectEnumerator;

#pragma mark Adopted Protocols

- (void) encodeWithCoder:(NSCoder*)encoder;
- (id) initWithCoder:(NSCoder*)decoder;
- (id) copyWithZone:(NSZone*)zone;
- (NSUInteger) countByEnumeratingWithState:(NSFastEnumerationState*)state
objects:(id*)stackbuf
count:(NSUInteger)len;

@end
Loading