-
Notifications
You must be signed in to change notification settings - Fork 377
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
removed framework dependency; resolved #15
- Loading branch information
1 parent
0b1a153
commit be5b9f0
Showing
121 changed files
with
2,590 additions
and
380 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Submodule framework
deleted from
0d192b
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* Copyright (c) 2013, 2014, 2015 Corvusoft | ||
*/ | ||
|
||
#ifndef _RESTBED_BYTE_H | ||
#define _RESTBED_BYTE_H 1 | ||
|
||
//System Includes | ||
#include <vector> | ||
#include <cstdint> | ||
|
||
//Project Includes | ||
|
||
//External Includes | ||
|
||
//System Namespaces | ||
using std::vector; | ||
|
||
//Project Namespaces | ||
|
||
//External Namespaces | ||
|
||
namespace restbed | ||
{ | ||
typedef uint8_t Byte; | ||
|
||
typedef std::vector< Byte > Bytes; | ||
} | ||
|
||
#endif /* _RESTBED_BYTE_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
/* | ||
* Copyright (c) 2013, 2014, 2015 Corvusoft | ||
*/ | ||
|
||
//System Includes | ||
#include <utility> | ||
#include <algorithm> | ||
|
||
//Project Includes | ||
#include "corvusoft/restbed/string.hpp" | ||
#include "corvusoft/restbed/detail/map_impl.hpp" | ||
|
||
//External Includes | ||
|
||
//System Namespaces | ||
using std::map; | ||
using std::pair; | ||
using std::string; | ||
using std::find_if; | ||
using std::multimap; | ||
|
||
//Project Namespaces | ||
|
||
//External Namespaces | ||
|
||
namespace restbed | ||
{ | ||
namespace detail | ||
{ | ||
MapImpl::iterator MapImpl::find_ignoring_case( const string& key, map< string, string >& container ) | ||
{ | ||
auto identifier = String::lowercase( key ); | ||
|
||
auto iterator = find_if( container.begin( ), container.end( ), [ &identifier ]( const pair< string, string >& value ) | ||
{ | ||
return ( identifier == String::lowercase( value.first ) ); | ||
} ); | ||
|
||
return iterator; | ||
} | ||
|
||
MapImpl::const_iterator MapImpl::find_ignoring_case( const string& key, const map< string, string >& container ) | ||
{ | ||
return find_ignoring_case( key, const_cast< map< string, string >& >( container ) ); | ||
} | ||
|
||
MapImpl::iterator MapImpl::find_ignoring_case( const string& key, multimap< string, string >& container ) | ||
{ | ||
auto identifier = String::lowercase( key ); | ||
|
||
auto iterator = find_if( container.begin( ), container.end( ), [ &identifier ]( const pair< string, string >& value ) | ||
{ | ||
return ( identifier == String::lowercase( value.first ) ); | ||
} ); | ||
|
||
return iterator; | ||
} | ||
|
||
MapImpl::const_iterator MapImpl::find_ignoring_case( const string& key, const multimap< string, string >& container ) | ||
{ | ||
return find_ignoring_case( key, const_cast< multimap< string, string >& >( container ) ); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
/* | ||
* Copyright (c) 2013, 2014, 2015 Corvusoft | ||
*/ | ||
|
||
#ifndef _RESTBED_DETAIL_MAP_IMPL_H | ||
#define _RESTBED_DETAIL_MAP_IMPL_H 1 | ||
|
||
//System Includes | ||
#include <map> | ||
#include <string> | ||
|
||
//Project Includes | ||
|
||
//External Includes | ||
|
||
//System Namespaces | ||
|
||
//Project Namespaces | ||
|
||
//External Namespaces | ||
|
||
namespace restbed | ||
{ | ||
//Forward Declarations | ||
|
||
namespace detail | ||
{ | ||
//Forward Declarations | ||
|
||
class MapImpl | ||
{ | ||
public: | ||
//Friends | ||
|
||
//Definitions | ||
typedef std::map< std::string, std::string >::iterator iterator; | ||
|
||
typedef std::map< std::string, std::string >::const_iterator const_iterator; | ||
|
||
//Constructors | ||
|
||
//Functionality | ||
static iterator find_ignoring_case( const std::string& key, std::map< std::string, std::string >& container ); | ||
|
||
static const_iterator find_ignoring_case( const std::string& key, const std::map< std::string, std::string >& container ); | ||
|
||
static iterator find_ignoring_case( const std::string& key, std::multimap< std::string, std::string >& container ); | ||
|
||
static const_iterator find_ignoring_case( const std::string& key, const std::multimap< std::string, std::string >& container ); | ||
|
||
//Getters | ||
|
||
//Setters | ||
|
||
//Operators | ||
|
||
//Properties | ||
|
||
protected: | ||
//Friends | ||
|
||
//Definitions | ||
|
||
//Constructors | ||
|
||
//Functionality | ||
|
||
//Getters | ||
|
||
//Setters | ||
|
||
//Operators | ||
|
||
//Properties | ||
|
||
private: | ||
//Friends | ||
|
||
//Definitions | ||
|
||
//Constructors | ||
MapImpl( void ) = delete; | ||
|
||
MapImpl( const MapImpl& original ) = delete; | ||
|
||
virtual ~MapImpl( void ) = delete; | ||
|
||
//Functionality | ||
|
||
//Getters | ||
|
||
//Setters | ||
|
||
//Operators | ||
MapImpl& operator =( const MapImpl& value ) = delete; | ||
|
||
//Properties | ||
}; | ||
} | ||
} | ||
|
||
#endif /* _RESTBED_DETAIL_MAP_IMPL_H */ |
Oops, something went wrong.