Skip to content

Commit

Permalink
Update for minimum Swift 5.6 comparability.
Browse files Browse the repository at this point in the history
  • Loading branch information
DimaRU committed Jan 13, 2024
1 parent e5b6dc7 commit 6464c8b
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 85 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019 Dmitriy Borovikov
Copyright (c) 2024 Dmitriy Borovikov

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
8 changes: 0 additions & 8 deletions LinuxMain.swift

This file was deleted.

3 changes: 1 addition & 2 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// swift-tools-version:4.2
// The swift-tools-version declares the minimum version of Swift required to build this package.
// swift-tools-version:5.6

import PackageDescription

Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

![Build](https://github.com/DimaRU/CDRCodable/workflows/Build/badge.svg)

A [OMG Common Data Representation (CDR)](https://msgpack.org/https://www.omg.org/spec/DDS-XTypes/) encoder and decoder for Swift `Codable` types.
A [OMG Common Data Representation (CDR)](https://www.omg.org/spec/DDS-XTypes/) encoder and decoder for Swift `Codable` types.

Now can be used with [FastRTPSBridge](https://github.com/DimaRU/FastRTPSBridge), a Swift wrapper for eProsima [FastDDS](https://github.com/eProsima/Fast-DDS) library.
Now can be used with [FastRTPSSwift](https://github.com/DimaRU/FastRTPSSwift), a Swift wrapper for eProsima [FastDDS](https://github.com/eProsima/Fast-DDS) library.

## Requirements

- Swift 4.2+
- Swift 5.6+

## Usage

Expand Down Expand Up @@ -37,7 +37,7 @@ let value = try! decoder.decode([Int16].self, from: data)

### Swift Package Manager

Add the MessagePack package to your target dependencies in `Package.swift`:
Add the CDRCodable package to your target dependencies in `Package.swift`:

```swift
import PackageDescription
Expand Down Expand Up @@ -78,7 +78,7 @@ The following table shows the basic IDL types supported by CDRCodable and how th
| String | std::string | string |

### 2. Arrays
Static size arrays is not supported by CDRCodable directly, needed custom coding.
Static size arrays is not supported by CDRCodable directly and needed custom coding.

### 3. Sequences
CDRCodable supports sequences, which map between Swift Array and C++ std::vector container. The following table represents how the map between Swift, C++11 and IDL and is handled.
Expand Down Expand Up @@ -151,7 +151,7 @@ enum ESubsystemState: Int32, Codable {

### 5. Union

Union type is not supported by CDRCodable directly, needed custom coding.
Union type is not supported by CDRCodable directly and needed custom coding.
Example:

IDL definition:
Expand Down
2 changes: 1 addition & 1 deletion Sources/CDRCodable/Decoder/CDRDecoder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ extension _CDRDecoder: Decoder {
}
}

protocol _CDRDecodingContainer: class {
protocol _CDRDecodingContainer: AnyObject {
var codingPath: [CodingKey] { get set }
var userInfo: [CodingUserInfoKey : Any] { get }
var data: _CDRDecoder.DataBlock { get }
Expand Down
67 changes: 0 additions & 67 deletions Tests/XCTestManifests.swift

This file was deleted.

0 comments on commit 6464c8b

Please sign in to comment.