All Projects → macmade → Objective-CPP

macmade / Objective-CPP

Licence: MIT license
C++ compatibility library for Objective-C - Objective-CPP is a library intended to ease software development using Objective-C++. It declares categories on Objective-C classes, to work with the STL C++ types, such as std::string, std::vector, etc.

Programming Languages

Objective-C++
1391 projects
C++
36643 projects - #6 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to Objective-CPP

tools-android
Objective-C on Android with Foundation, CoreFoundation, and libdispatch.
Stars: ✭ 38 (+2.7%)
Mutual labels:  objective-c-plus-plus, foundation
Objcxx
Stars: ✭ 54 (+45.95%)
Mutual labels:  foundation, interoperability
Neslib
Delphi utilities shared with other Neslib repositories
Stars: ✭ 33 (-10.81%)
Mutual labels:  foundation
Polkadex
An Orderbook-based Decentralized Exchange using the Substrate Blockchain Framework.
Stars: ✭ 223 (+502.7%)
Mutual labels:  interoperability
linkedresearch.org
🌐 linkedresearch.org
Stars: ✭ 32 (-13.51%)
Mutual labels:  interoperability
ethrelay
Ethereum smart contracts that enable the verification of transactions of a "target" blockchain on a different "verifying" blockchain in a trustless and decentralized way
Stars: ✭ 34 (-8.11%)
Mutual labels:  interoperability
any invocable
Сonservative, move-only equivalent of std::function
Stars: ✭ 14 (-62.16%)
Mutual labels:  std
kiva
Ground heat transfer calculation tool
Stars: ✭ 23 (-37.84%)
Mutual labels:  foundation
preface
Preface is an opinionated library designed to facilitate the handling of recurring functional programming idioms in OCaml.
Stars: ✭ 116 (+213.51%)
Mutual labels:  stdlib
opendata
Finland national open data portal (avoindata.fi) source code.
Stars: ✭ 27 (-27.03%)
Mutual labels:  interoperability
std-env
Detect current Javascript environment
Stars: ✭ 85 (+129.73%)
Mutual labels:  std
stdlib
🎁 Gleam's standard library
Stars: ✭ 153 (+313.51%)
Mutual labels:  stdlib
tb-grid
tb-grid is a super simple and lightweight 12 column responsive grid system utilizing css grid.
Stars: ✭ 19 (-48.65%)
Mutual labels:  foundation
force-bridge-eth
Decentralized, trustless bridge between Ethereum and Nervos.
Stars: ✭ 32 (-13.51%)
Mutual labels:  interoperability
hashport-validator
Official repository containing the source code of the Hashport validators
Stars: ✭ 19 (-48.65%)
Mutual labels:  interoperability
speckle-unity
AEC Interoperability for Unity through Speckle
Stars: ✭ 28 (-24.32%)
Mutual labels:  interoperability
Foundation
My Software BASE
Stars: ✭ 48 (+29.73%)
Mutual labels:  foundation
curry
curry is a framework built to enhance and compliment Foundation and UIKit.
Stars: ✭ 47 (+27.03%)
Mutual labels:  foundation
cli
Autocode CLI and standard library tooling
Stars: ✭ 3,791 (+10145.95%)
Mutual labels:  stdlib
SEPA
Get notifications about changes in your SPARQL endpoint.
Stars: ✭ 21 (-43.24%)
Mutual labels:  interoperability

Objective-CPP

Build Status Issues Status License
Contact Sponsor

About

C++ compatibility library for Objective-C
Objective-CPP is a library intended to ease software development using Objective-C++.

It declares categories on Objective-C classes, to work with the STL C++ types, such as std::string, std::vector, etc.

For instance, with Objective-CPP, you can call every method of the NSString class passing std::string objects, instead of NSString objects. The same applies for the return types, as you can get seamlessly std::string objects out of NSString objects.

Example:

Here's a little example with NSString:

{
    NSString * objcString = @"hello, world";
    std::string cppString = [ objcString cppStringUsingEncoding: NSUTF8StringEncoding ];
    
    std::cout << cppString << std::endl;
}

And the same in the other way:

{
    std::string cppString = "hello, world";
    NSString * objcString = [ NSString stringWithCPPString: cppString encoding: NSUTF8StringEncoding ];
    
    NSLog( @"%@", objcString );
}

Strings:

Objective-CPP expands the NSString class with a category, adding support for C++ strings (std::string).
All methods from NSString can then return a std::string instead of a NSString *, or take std::string arguments instead of NSString * arguments.

By default, Objective-CPP uses UTF-8 as default encoding for strings, for converting NSString objects into C++ string objects, and reverse.
You can set another encoding using the new 'setDefaultCPPStringEncoding' class method of NSString:

[ NSString setDefaultCPPStringEncoding: NSASCIIStringEncoding ];

License

Objective-CPP is released under the terms of the MIT License.

Repository Infos

Owner:			Jean-David Gadina - XS-Labs
Web:			www.xs-labs.com
Blog:			www.noxeos.com
Twitter:		@macmade
GitHub:			github.com/macmade
LinkedIn:		ch.linkedin.com/in/macmade/
StackOverflow:	stackoverflow.com/users/182676/macmade
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].