Giter Site home page Giter Site logo

cfpp's Introduction

๐Ÿ’€๐Ÿฆ„๐Ÿค– Blood, Sweat & Code (& Rock 'n Roll)

Macmade

cfpp's People

Contributors

ddna-buildagent avatar fish2000 avatar jeremyagost avatar macmade avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

cfpp's Issues

Localisation functions

Declared in CFBundle:

String GetLocalizedString( String key, const char * comment );
String GetLocalizedStringFromTable( String key, String tableName, const char * comment );
String GetLocalizedStringFromTableInBundle( String key, String tableName, Bundle bundle, const char * comment );
String GetLocalizedStringWithDefaultValue( String key, String tableName, String value, const char * comment );

CF::Error - Ambiguous constructors

Constructors of CF::Error are ambiguous due to implicit casts to CF::String from std::string, CFTypeRef, CFStringRef, and const char *.

Simpler operators

Operators should call themselves whenever possible, in order to remove duplicate code.

Eg: CF::URL::operator = ( CFURLRef ) should simply call CF::URL::operator = ( CFTypeRef ).

README typo and grammar

"CoreFoundation is an powerfull C API, allowing object-oriented style coding in C, reference counting memory management, and providing a lot of useful classes."

Should be:

"CoreFoundation is a powerful C API which allows object-oriented style coding and reference counting memory management in C and provides a lot of useful classes."

Unit tests

Finish unit tests for all CF++ classes, so planned features may be implemented safely.

Code coverage should ideally be around 95%.

Dictionary constructor doesn't take ints.

According to the readme CF::Dictionary d3( 100 ); is valid for constructing a dictionary with an initial capacity. If I do this I get error Types CF::Dictionary and int are not compatible. As well, I don't see a constructor for int in the Dictionary header.

STL iterators

Add STL iterators for CF::Array, CF::Dictionary, and maybe CF::String and CF::Data.

Take ownership constructors for wrapper types

I can envision a factory function for CFPP types conceptually similar to CFBridgingRelease from ARC-enabled Objective-C. The purpose of which is to assign a CF object to a wrapper and release it. The most obvious benefit would be the ability to write code like CF::Array components = CFStringCreateArrayBySeparatingStrings(NULL, string, separator).

I'm planning on using CFPP in a project and I'm probably going to implement this functionality for that purpose. If you aren't opposed to the idea on principle I'd be happy to Pull Request it.

Tag a version?

When using this library it would be quite useful to be able to reference a specific version and know what snapshot of the code it represents.

I see milestones are already used for the roadmap items. It appears that all outstanding issues are marked for v0.3.0+. Could we tag current master as v0.2.0 for a reference point?

CF::Dictionary::ContainsKey crash if key is std::string

Consider the following example:

CF::Dictionary dic;
dic << CF::Pair( "Key", "Value" );
CF::String value = dic[ "Key" ]; //no problem.
bool contains = dic.ContainsKey( "Key" ); //crash
contains = dic.ContainsKey( CF::String( "Key" ) ); //OK.

CF::Pair's ctor accepts std::string. CF::Dictionary's subscript operator accepts std::string too. Wouldn't it make sense for ContainsKey to behave the same?

More explicit constructors

The following should not be valid:

CF::Dictionary d;
d = true;

Call is:

d.operator=( CF::Dictionary( ( CFIndex )true ) );

Use explicit constructors to fix the issue...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.