repo_name
stringlengths
6
97
path
stringlengths
3
341
text
stringlengths
8
1.02M
kashiftriffort/TestAnalyticsApproach
TestAnalyticsApproach/TestAnalyticsApproach.h
<gh_stars>0 // // TestAnalyticsApproach.h // TestAnalyticsApproach // // Created by <NAME> on 10/8/20. // Copyright © 2020 <NAME>. All rights reserved. // #import <Foundation/Foundation.h> //! Project version number for TestAnalyticsApproach. FOUNDATION_EXPORT double TestAnalyticsApproachVersionNumber; //! Proje...
McdonaldSeanp/horsewhisperer
include/horsewhisperer/horsewhisperer.h
<gh_stars>0 #ifndef INCLUDE_HORSEWHISPERER_HORSEWHISPERER_H_ #define INCLUDE_HORSEWHISPERER_HORSEWHISPERER_H_ #include <string> #include <map> #include <vector> #include <functional> #include <iostream> #include <sstream> #include <iomanip> #include <cctype> #include <algorithm> #include <memory> #include <stdexcept> ...
marioamgad9/Tweetx
Launch/Launch/Launch.h
<filename>Launch/Launch/Launch.h // // Launch.h // Launch // // Created by <NAME> on 03/02/2021. // #import <Foundation/Foundation.h> //! Project version number for Launch. FOUNDATION_EXPORT double LaunchVersionNumber; //! Project version string for Launch. FOUNDATION_EXPORT const unsigned char LaunchVersionStrin...
marioamgad9/Tweetx
Onboarding/Onboarding/Onboarding.h
// // Onboarding.h // Onboarding // // Created by <NAME> on 03/02/2021. // #import <Foundation/Foundation.h> //! Project version number for Onboarding. FOUNDATION_EXPORT double OnboardingVersionNumber; //! Project version string for Onboarding. FOUNDATION_EXPORT const unsigned char OnboardingVersionString[]; // ...
marioamgad9/Tweetx
Followers/Followers/Followers.h
<reponame>marioamgad9/Tweetx<filename>Followers/Followers/Followers.h // // Followers.h // Followers // // Created by <NAME> on 03/02/2021. // #import <Foundation/Foundation.h> //! Project version number for Followers. FOUNDATION_EXPORT double FollowersVersionNumber; //! Project version string for Followers. FOUN...
synesissoftware/FastFormat
include/fastformat/internal/shim_macros.h
<filename>include/fastformat/internal/shim_macros.h /* ///////////////////////////////////////////////////////////////////////// * File: fastformat/internal/shim_macros.h * * Purpose: Definitions of macros used internally in the library * components * * Created: 19th September 2006 * ...
synesissoftware/FastFormat
include/fastformat/init_codes.h
/* ///////////////////////////////////////////////////////////////////////// * File: fastformat/init_codes.h * * Purpose: Initialisation codes. * * Created: 27th May 2008 * Updated: 13th September 2010 * * Home: http://www.include.org/ * * Copyright (c) 2008-2010, <NAME> and Synesis ...
synesissoftware/FastFormat
include/fastformat/util/string/snprintf.h
<gh_stars>10-100 /* ///////////////////////////////////////////////////////////////////////// * File: fastformat/util/string/snprintf.h (was fastformat/util/string/string.h) * * Purpose: snprintf() utility functions. * * Created: 1st June 2008 * Updated: 1st December 2011 * * Home: htt...
synesissoftware/FastFormat
include/fastformat/internal/threading.h
/* ///////////////////////////////////////////////////////////////////////// * File: fastformat/internal/threading.h * * Purpose: Detects whether the library is being built single- or * multi-threaded. * * Created: 20th November 2007 * Updated: 16th February 2009 * * Home: ...
aquaxp/yolo-tyrion
Yolo-Tyrion/Yolo-Tyrion/MenubarController.h
// // MenubarController.h // Yolo-Tyrion // // Created by mindworm on 24/11/14. // Copyright (c) 2014 <EMAIL>. All rights reserved. // #import <Foundation/Foundation.h> @interface MenubarController : NSObject @end
aquaxp/yolo-tyrion
Yolo-Tyrion/Yolo-Tyrion/AppDelegate.h
// // AppDelegate.h // Yolo-Tyrion // // Created by mindworm on 15/11/14. // Copyright (c) 2014 <EMAIL>. All rights reserved. // #import <Cocoa/Cocoa.h> #import "iTunes.h" #import "Spotify.h" @interface AppDelegate : NSObject <NSApplicationDelegate>{ NSStatusItem *statusItem; iTunesApplication* iTunes; ...
mynameistechno/aimet
ModelOptimizations/DlQuantization/src/TfEnhancedEncodingAnalyzer.h
<reponame>mynameistechno/aimet // // @@-COPYRIGHT-START-@@ // // Copyright (c) 2019-2021, Qualcomm Innovation Center, Inc. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // 1. Redistribu...
asdwangcg/ConnectModel
ConnectModel.h
// // ConnectModel.h // 封装网络 // // Created by wangchonggang on 14/11/7. // Copyright (c) 2014年 wangchonggang. All rights reserved. // #import <Foundation/Foundation.h> #import <UIKit/UIKit.h> typedef void(^ReciveBlock)(NSData *); @protocol ConnectModelDelegate <NSObject> - (void)pushData:(NSData *)data; @end ...
asdwangcg/ConnectModel
SaveModel.h
// // SaveModel.h // 封装网络 // // Created by wangchonggang on 14/11/7. // Copyright (c) 2014年 wangchonggang. All rights reserved. // #import <Foundation/Foundation.h> @interface SaveModel : NSObject + (NSData *)readFileWithName:(NSString *)name; + (BOOL)writeFileWithName:(NSString *)name data:(NSData *)data; + (BOO...
Aakash2017/envoy-wasm
source/extensions/common/wasm/wasm.h
<filename>source/extensions/common/wasm/wasm.h #pragma once #include <atomic> #include <chrono> #include <map> #include <memory> #include "envoy/common/exception.h" #include "envoy/extensions/wasm/v3/wasm.pb.validate.h" #include "envoy/http/filter.h" #include "envoy/server/lifecycle_notifier.h" #include "envoy/stats/...
Aakash2017/envoy-wasm
test/mocks/server/mocks.h
#pragma once #include <chrono> #include <cstdint> #include <list> #include <string> #include "envoy/common/mutex_tracer.h" #include "envoy/config/bootstrap/v3/bootstrap.pb.h" #include "envoy/config/core/v3/base.pb.h" #include "envoy/config/core/v3/config_source.pb.h" #include "envoy/config/listener/v3/listener.pb.h" ...
Feliix42/lingua-franca
org.lflang/src/lib/core/platform/lf_unix_clock_support.c
<reponame>Feliix42/lingua-franca #include <time.h> #include <errno.h> /** * Offset to _LF_CLOCK that would convert it * to epoch time. * For CLOCK_REALTIME, this offset is always zero. * For CLOCK_MONOTONIC, it is the difference between those * clocks at the start of the execution. */ interval_t _lf_epoch_offse...
Feliix42/lingua-franca
util/tracing/trace_to_influxdb.c
/** * @file * @author <NAME> * @author <NAME> * * @section LICENSE Copyright (c) 2021, The University of California at Berkeley Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must ret...
Feliix42/lingua-franca
org.lflang/src/lib/core/federated/federate.h
/** * @file * @author <NAME> (<EMAIL>) * * @section LICENSE Copyright (c) 2020, The University of California at Berkeley. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the...
Feliix42/lingua-franca
test/C/src/include/hello.h
<filename>test/C/src/include/hello.h #ifndef HELLO_H #define HELLO_H typedef struct hello_t { char* name; int value; } hello_t; typedef int* int_pointer; #endif
Feliix42/lingua-franca
org.lflang/src/lib/C/util/sensor_simulator.h
/** @file @author <NAME> (<EMAIL>) @section LICENSE Copyright (c) 2020, The University of California at Berkeley. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copy...
Feliix42/lingua-franca
benchmark/C/Savina/include/PseudoRandom.h
<filename>benchmark/C/Savina/include/PseudoRandom.h /** * Simple deterministic pseudo random number generator for * some benchmarks. * * Original author: <NAME> * Adapted to C by: <NAME> */ #ifndef PSUEDO_RANDOM_H #define PSUEDO_RANDOM_H struct PseudoRandom { long mValue; }; void initPseudoRandom(struct Pseudo...
Feliix42/lingua-franca
org.lflang/src/lib/core/tag.c
/** * @file * @author <NAME> * @author <NAME> * * @section LICENSE Copyright (c) 2020, The University of California at Berkeley. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must re...
Feliix42/lingua-franca
util/tracing/trace_util.h
/** * @file * @author <NAME> * * @section LICENSE Copyright (c) 2020, The University of California at Berkeley Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copy...
Feliix42/lingua-franca
org.lflang/src/lib/C/ctarget.h
/** * @file * @author <NAME> (<EMAIL>) * * @section LICENSE Copyright (c) 2020, The University of California at Berkeley. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the...
Feliix42/lingua-franca
util/tracing/trace_util.c
<reponame>Feliix42/lingua-franca<filename>util/tracing/trace_util.c /** * @file * @author <NAME> * * @section LICENSE Copyright (c) 2020, The University of California at Berkeley Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions ar...
Feliix42/lingua-franca
test/Cpp/src/include/hello.h
#ifndef HELLO_H #define HELLO_H struct Hello { std::string name; int value; }; #endif
Feliix42/lingua-franca
util/tracing/influxdb.h
<gh_stars>10-100 #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <sys/uio.h> #include <netdb.h> #include <stdarg.h> #include <string.h> #include <stdio.h> #include <unistd.h> #include <curl/curl.h> /* Usage: send_udp/post_http(c, INFLUX_MEAS("foo...
InfiCell/clearwater-net-snmp
include/net-snmp/library/int64.h
#ifndef INT64_INCLUDED #define INT64_INCLUDED #ifdef __cplusplus extern "C" { #endif #define I64CHARSZ 21 void divBy10(struct counter64, struct counter64 *, unsigned int *); void multBy10(struct counter64, struct counter64 *); void incrByU16(struct counter64 *, u...
InfiCell/clearwater-net-snmp
agent/mibgroup/agentx/master_admin.c
/* * AgentX Administrative request handling */ #include <net-snmp/net-snmp-config.h> #include <net-snmp/net-snmp-features.h> #include <sys/types.h> #ifdef HAVE_STRING_H #include <string.h> #else #include <strings.h> #endif #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif #if TIME_WITH_SYS_TIME # include <sys/time.h>...
InfiCell/clearwater-net-snmp
apps/snmptrapd_auth.c
/* * snmptrapd_auth.c - authorize notifications for further processing * */ #include <net-snmp/net-snmp-config.h> #if HAVE_SYS_TYPES_H #include <sys/types.h> #endif #if HAVE_NETINET_IN_H #include <netinet/in.h> #endif #if HAVE_NETDB_H #include <netdb.h> #endif #include <net-snmp/net-snmp-includes.h> #include "snmp...
InfiCell/clearwater-net-snmp
agent/mibgroup/examples/example.c
/* * Template MIB group implementation - example.c * */ /* * include important headers */ #include <net-snmp/net-snmp-config.h> #if HAVE_STDLIB_H #include <stdlib.h> #endif #if HAVE_STRING_H #include <string.h> #else #include <strings.h> #endif #include <net-snmp/net-snmp-includes.h> #include <net-snmp/agent/n...
TizenTeam/iotivitymap
src/server.h
<gh_stars>1-10 // -*-c++-*- //****************************************************************** // // Copyright 2014 Intel Corporation. // Copyright 2015 Eurogiciel <<EMAIL>> // Copyright 2016 Samsung <<EMAIL>> // //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= // // Licensed under the Apache Licens...
TizenTeam/iotivitymap
src/client.h
// -*-c++-*- //****************************************************************** // // Copyright 2014 Intel Corporation. // Copyright 2015 Eurogiciel <<EMAIL>> // Copyright 2016 Samsung <<EMAIL>> // //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= // // Licensed under the Apache License, Version 2.0 ...
flyyee/typer
typer.h
<reponame>flyyee/typer<gh_stars>0 #ifndef TYPER_H #define TYPER_H #include <iostream> using namespace std; //use array of bools instead of fc, fe class typer { public: typer(); string word; int s_Sleep, f_Sleep; const int sver, fver; const string sverinfo, fverinfo; bool fctrl, fenter, fa...
zeling/tiger
c/regalloc.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include "util.h" #include "symbol.h" #include "temp.h" #include "tree.h" #include "absyn.h" #include "assem.h" #include "frame.h" #include "graph.h" #include "color.h" #include "flowgraph.h" #include "liveness.h" #include "regalloc.h" #include "table.h" stati...
zeling/tiger
c/codegen.c
<reponame>zeling/tiger #include <stdio.h> #include <stdlib.h> #include "util.h" #include "symbol.h" #include "absyn.h" #include "temp.h" #include "errormsg.h" #include "tree.h" #include "assem.h" #include "frame.h" #include "codegen.h" #include "table.h" static AS_instrList iList = NULL, last = NULL; static bool lastI...
zeling/tiger
c/x86frame.c
<filename>c/x86frame.c #include <stdio.h> #include <stdlib.h> #include <string.h> #include "util.h" #include "symbol.h" #include "temp.h" #include "table.h" #include "tree.h" #include "frame.h" /*Lab5: Your implementation here.*/ typedef struct F_frameList_ *F_frameList; struct F_access_ { enum {inFrame, inReg} k...
j7ios/ScrollingNavBar
ScrollingNavigationViewController.h
<reponame>j7ios/ScrollingNavBar // Created by Jack7 on 30/08/16. // Copyright © 2016 GiacomoB. All rights reserved. // #import <UIKit/UIKit.h> @interface ScrollingNavigationViewController : UIViewController<UIScrollViewDelegate> @end
markrad/Azure-Embedded-IoT-C-Sample
include/heap.h
<filename>include/heap.h #pragma once //#define _DEBUG_HEAP #include <stdint.h> #include <stddef.h> typedef void* HEAPHANDLE; typedef struct _HEAPINFO { int freeBytes; int usedBytes; int totalBytes; int largestFree; } HEAPINFO; // Initialize the private heap with buffer or bufferLen bytes HEA...
markrad/Azure-Embedded-IoT-C-Sample
src/base64util.c
<reponame>markrad/Azure-Embedded-IoT-C-Sample #include <azure/core/internal/az_precondition_internal.h> #include "base64util.h" // Used for Base64 encoding and decoding static const char* CODES = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; az_result az_decode_base64(az_span source, az_span d...
markrad/Azure-Embedded-IoT-C-Sample
include/vector_heap.h
<reponame>markrad/Azure-Embedded-IoT-C-Sample #pragma once #include <stdint.h> #include <stdbool.h> #include "heap.h" typedef void* VECTORHANDLE; // Create a new vector on the private heap VECTORHANDLE vector_create(HEAPHANDLE hheap, uint16_t element_size); // Wraps an existing buffer VECTORHANDLE vec...
markrad/Azure-Embedded-IoT-C-Sample
src/bearssltagenerator.c
#include <stdbool.h> #include <stdio.h> #include <string.h> #include <bearssl.h> #include "heap.h" #include "azheap.h" #include "bearssltagenerator.h" #include "vector_heap.h" extern HEAPHANDLE hHeap; typedef struct { bool error; uint16_t data_length; uint16_t buffer_length; uint8_t *buffer; } buffer...
markrad/Azure-Embedded-IoT-C-Sample
include/llcomms.h
#pragma once #include <mqtt_pal.h> /** * @brief Initialize the BearSSL library * * @param ctx[in] Control block * @param bearssl_iotbuf[in] Buffer for BearSSL * @param bearssl_iobuf_len Length of buffer */ int initialize_TLS(bearssl_context *ctx, br_x509_certificate *x509cert, int x509cert_count, private_key *...
markrad/Azure-Embedded-IoT-C-Sample
src/vector_heap.c
#include <memory.h> #include "vector_heap.h" static const uint16_t growth = 4; typedef struct _VECTOR { HEAPHANDLE hheap; uint16_t all_elements; uint16_t current_elements; uint16_t element_size; uint16_t error; uint8_t* elements; } VECTOR_STRUCT, *VECTOR; static int vector_si...
markrad/Azure-Embedded-IoT-C-Sample
src/heap.c
#include "heap.h" #ifdef _DEBUG_HEAP #include <stdio.h> #define _DEBUG_HEAP_SANITY(HEAP) (heap_sanity(HEAP)); #define _DEBUG_HEAP_CHECK(HEAP) (heap_check(HEAP)) #else #define _DEBUG_HEAP_SANITY(HEAP) (0) #define _DEBUG_HEAP_CHECK(HEAP) (0) #endif #include <memory.h> #define MIN_ALLOC sizeof(MEMORYBLOC...
markrad/Azure-Embedded-IoT-C-Sample
src/devicesample.c
/** * @file devicesample.c * * @brief Example of an application that uses the Embedded IoT C library. This example avoids using any of the * libraries used by the examples in the below GitHub repository. * * For MQTT it uses MQTT-C https://github.com/LiamBindle/MQTT-C * For TLS it used BearSSL: https://bears...
markrad/Azure-Embedded-IoT-C-Sample
src/azheap.c
#include "azheap.h" inline az_span az_heap_alloc(HEAPHANDLE h, size_t bytes) { return az_span_init(heap_malloc(h, bytes), bytes); } inline az_span az_heap_adjust(HEAPHANDLE h, az_span target) { return az_span_init(heap_realloc(h, az_span_ptr(target), az_span_size(target)) , az_span_size(target)); } inline vo...
markrad/Azure-Embedded-IoT-C-Sample
include/bearssltagenerator.h
<gh_stars>1-10 #pragma once #include <bearssl.h> typedef struct { int key_type; /* BR_KEYTYPE_RSA or BR_KEYTYPE_EC */ union { br_rsa_private_key rsa; br_ec_private_key ec; } key; } private_key; typedef struct { char *name; unsigned char *data; size_t data_len; } pem_object; /** * @brief Generates trust ...
markrad/Azure-Embedded-IoT-C-Sample
include/azheap.h
<gh_stars>1-10 #pragma once #include <azure/core/az_span.h> #include "heap.h" // Allocate an az_span from the private heap for size bytes az_span az_heap_alloc(HEAPHANDLE h, size_t bytes); // Reallocate on the private heap the az_span target to its actual length az_span az_heap_adjust(HEAPHANDLE h, az_span target); ...
markrad/Azure-Embedded-IoT-C-Sample
include/base64util.h
<reponame>markrad/Azure-Embedded-IoT-C-Sample<filename>include/base64util.h<gh_stars>1-10 #pragma once #include <azure/core/az_span.h> /** * @brief Decodes the \p source from Base64 to the original string in \p destination * * @param[in] Span containing base64 string to be decoded * @param[out] Span to receive ...
Ashlzw/simple_json
simple_vector.h
#pragma once #ifndef SIMPLE_VECTOR_H #define SIMPLE_VECTOR_H #include <utility> #include <algorithm> #include <memory> #include <stdexcept> #include <iostream> template <typename T> class simple_vector { friend bool operator==(const simple_vector<T> &lhs, const simple_vector<T> &rhs) { if (lhs.size...
Ashlzw/simple_json
simplejson.h
<reponame>Ashlzw/simple_json #pragma once #ifndef SIMPLEJSON_H #define SIMPLEJSON_H #include <iostream> #include <string> #include <cassert> #include <cstring> #include "simple_vector.h" #include "name_value.h" enum class json_type { JSON_NULL, JSON_TRUE, JSON_FALSE, JSON_NUMBER, JSON_STRING, JSON_...
Ashlzw/simple_json
name_value.h
#pragma once #include "simple_vector.h" class json_value; template<typename Name = simple_vector<char>, typename Value = json_value> class json_obj { public: json_obj() : _name(0), _value(0) {} json_obj(const json_obj &jo) { _name = new Name(*jo._name); _value = new Value(*jo._value); } ~json_obj() { de...
qvex/suil
gap/resource_handler_priv.h
// // Created by dc on 6/6/16. // #ifndef GAR_RESOURCE_HANDLER_PRIV_H #define GAR_RESOURCE_HANDLER_PRIV_H #include "request.h" #include "response.h" namespace gap { class ResourceHandler; class ResourceHandlerPriv { public: typedef std::shared_ptr<ResourceHandlerPriv> Ptr; void setHandler...
qvex/suil
gap/version.h
// // Created by dc on 7/8/16. // #ifndef SUIL_VERSION_H #define SUIL_VERSION_H #include <inttypes.h> #include <string> namespace gap { struct Version { int16_t major; int16_t minor; int32_t patch; }; const Version& gapVersion(); } #endif //SUIL_VERSION_...
qvex/suil
gatls/gatls_cli.h
// // Created by dc on 6/11/16. // #ifndef GAR_SUIL_ARGS_H #define GAR_SUIL_ARGS_H #include <string> #include <wait.h> #include <unistd.h> #include <sys/types.h> namespace gatls { extern int create(int argc, char *argv[]); extern void showCreateHelp(); extern int build(int argc, char* argv[]); exter...
qvex/suil
gap/route.h
// // Created by dc on 6/7/16. // #ifndef GAR_ROUTE_H #define GAR_ROUTE_H #include "resource_handler.h" #include "route_params_parser.h" namespace gap { /** * @brief The binding between a route and a resource on the server. The rule defines, * how the resource can be reached and how to parse the url b...
qvex/suil
gar/server.h
<reponame>qvex/suil<gh_stars>0 // // Created by dc on 6/4/16. // #ifndef GAR_SERVER_H #define GAR_SERVER_H #include <future> #include "util.h" #include "ioservice_pool.h" #include "session.h" #include "server_config.h" #include "middleware_pipeline_priv.h" #include "resource_handler_priv.h" namespace gar { using...
qvex/suil
gar/ioservice_pool.h
// // Created by dc on 6/2/16. // #ifndef GAR_IOSERVICE_POOL_H #define GAR_IOSERVICE_POOL_H #include <memory> #include <vector> #include <boost/thread.hpp> #include <boost/asio/io_service.hpp> #include <boost/noncopyable.hpp> namespace gar { using boost::asio::io_service; typedef std::shared_ptr<boost::thre...
qvex/suil
common/log.h
<reponame>qvex/suil // // Created by dc on 6/2/16. // #ifndef GAR_LOG_H #define GAR_LOG_H #include<stdarg.h> #include <memory> #include <ctime> #include <boost/noncopyable.hpp> #include <boost/thread.hpp> #include <boost/lexical_cast.hpp> #include <boost/date_time/local_time/local_time.hpp> namespace gap { #ifndef ...
qvex/suil
gap/app.h
<gh_stars>0 // // Created by dc on 6/6/16. // #ifndef GAR_APP_H #define GAR_APP_H #include "middleware_pipeline.h" #include "resource_handler.h" namespace gap { class AppPriv; class App : public std::enable_shared_from_this<App> { public: typedef std::shared_ptr<App> Ptr; App(); ...
qvex/suil
gap/app_handler.h
<reponame>qvex/suil<filename>gap/app_handler.h // // Created by dc on 6/9/16. // #ifndef GAR_APPHANDLER_H #define GAR_APPHANDLER_H #include "app.h" namespace gap { class AppHandler { public: typedef std::shared_ptr<AppHandler> Ptr; /** * @brief The first callback onto the applicatio...
qvex/suil
gar/module_config.h
// // Created by dc on 6/8/16. // #ifndef GAR_MODULE_OPTIONS_H #define GAR_MODULE_OPTIONS_H #include <string> namespace gar { struct ModuleConfig { std::string soname{""}; std::string main{""}; std::string exit{""}; std::string prefix{""}; static ModuleCon...
qvex/suil
test/gap/route_params_tests.h
<reponame>qvex/suil<gh_stars>0 // // Created by dc on 7/14/16. // #ifndef SUIL_ROUTE_PARAMS_TESTS_H #define SUIL_ROUTE_PARAMS_TESTS_H #include "gtest/gtest.h" #include "route_params.h" using namespace gap; TEST(ParamValuesTest, IntParamValueTest) { ParamValue::Type type = ParamValue::Type::T_INT; ParamValu...
qvex/suil
gar/stats.h
// // Created by dc on 6/3/16. // #ifndef GAR_STATS_H #define GAR_STATS_H #include <memory> #include <atomic> namespace gar { struct Stats : public std::enable_shared_from_this<Stats> { typedef std::shared_ptr<Stats> Ptr; std::atomic_uint totalConnections; std::atomic_uint ...
qvex/suil
gar/http_parser_impl.h
<reponame>qvex/suil // // Created by dc on 6/3/16. // #ifndef GAR_HTTP_PARSER_H #define GAR_HTTP_PARSER_H #include "util.h" #include "http_parser.h" #include "request.h" namespace gar { class HttpParserHandler { public: virtual void handleHeader() = 0; virtual void handleMessage() = 0; }...
qvex/suil
gap/route_params_parser.h
<filename>gap/route_params_parser.h // // Created by dc on 6/7/16. // #ifndef GAR_ROUTE_PARAMS_PARSER_H #define GAR_ROUTE_PARAMS_PARSER_H #include <regex> #include <cassert> #include "route_params.h" namespace gap { class RouteParamsParser { public: typedef std::vector<std::pair<std::string, ParamV...
qvex/suil
examples/echo/src/handlers.h
<reponame>qvex/suil // // Created by dc on 6/10/16. // #ifndef GAR_ECHO_HANDLER_H_H #define GAR_ECHO_HANDLER_H_H #include "gap.h" #include <chrono> using namespace gap; class EchoApp : public AppHandler { public: virtual void onStart(App::Ptr app); }; class EchoMiddleware: public Middleware { public: virtu...
qvex/suil
gap/server_config.h
<gh_stars>0 // // Created by dc on 6/4/16. // #ifndef GAR_SERVER_OPTIONS_H #define GAR_SERVER_OPTIONS_H #include <memory> #include "json.h" namespace gap { struct ServerConfig { uint timeout{5}; uint port; uint concurrency{0}; std::string serv...
qvex/suil
common/query_string.h
// // Created by dc on 6/3/16. // #ifndef GAR_QUERY_STRING_H #define GAR_QUERY_STRING_H #include <vector> #include <string> #include <ostream> namespace gap { class QueryString { public: static const int MAX_KEY_VALUE_PAIRS_COUNT = 256; QueryString(); QueryString(const QueryString...
qvex/suil
gap/gap.h
// // Created by dc on 6/8/16. // #ifndef GAR_GAP_H #define GAR_GAP_H #include "log.h" #include "resource_router.h" #include "app.h" #include "app_handler.h" namespace gap { inline Router& UseSystemRouter(App::Ptr app) { Router *r = new Router(); app->setResourceHandler(ResourceHandler::Ptr(r))...
qvex/suil
gap/resource_router.h
<reponame>qvex/suil // // Created by dc on 6/7/16. // #ifndef GAR_RESOURCE_ROUTER_H #define GAR_RESOURCE_ROUTER_H #include "route.h" #include "trie.h" #include "resource_handler.h" namespace gap { class RuleCollection { public: typedef std::shared_ptr<RuleCollection> Ptr; RuleCollection(con...
qvex/suil
gap/middleware.h
// // Created by dc on 6/5/16. // #ifndef GAR_MIDDLEWARE_H #define GAR_MIDDLEWARE_H #include "response.h" namespace gap { /* * @brief The base class for a middleware that can be installed into the Middleware * pipeline */ class Middleware { public: typedef std::shared_ptr<Middlewa...
qvex/suil
gap/app_config.h
// // Created by dc on 6/8/16. // #ifndef GAR_APP_OPTIONS_H #define GAR_APP_OPTIONS_H #include "json.h" namespace gap { struct AppConfig { bool enableSsl{false}; std::string name{""}; std::string administrator{""}; std::string sslcert{""}; ...
qvex/suil
gap/middleware_pipeline_priv.h
<gh_stars>0 // // Created by dc on 6/5/16. // #ifndef GAR_MIDDLEWARE_PIPELINE_PRIV_H #define GAR_MIDDLEWARE_PIPELINE_PRIV_H #include "middleware_factory.h" #include <deque> namespace gap { class MiddlewarePipelinePriv { public: typedef std::deque<Middleware::Ptr> CallStack; typedef std::shar...
qvex/suil
gar/session.h
<reponame>qvex/suil<gh_stars>0 // // Created by dc on 6/3/16. // #ifndef GAR_SESSION_H #define GAR_SESSION_H #include "stats.h" #include "timer_queue.h" #include "socket_adaptors.h" #include "resource_handler_priv.h" #include "http_parser_impl.h" #include "response_internal.h" #include "middleware_pipeline_priv.h" #...
qvex/suil
common/response.h
<filename>common/response.h // // Created by dc on 6/3/16. // #ifndef GAR_HTTPRESPONSE_H #define GAR_HTTPRESPONSE_H #include "request.h" #include "json.h" namespace gar { struct HttpResponseHandlers; } namespace gap { class HttpResponse { public: gar::HttpResponseHandlers *handlers(); ...
qvex/suil
common/response_internal.h
// // Created by dc on 6/3/16. // #ifndef GAR_RESPONSE_INTERNAL_H #define GAR_RESPONSE_INTERNAL_H #include <functional> namespace gar { struct HttpResponseHandlers { std::function<void()> completeRequestHandler; std::function<bool()> isAliveChecker; }; } #endif //GAR_RESPONSE_INTERNAL_H
qvex/suil
gap/param_value.h
<reponame>qvex/suil // // Created by dc on 6/6/16. // #ifndef GAR_ROUTE_RULE_H #define GAR_ROUTE_RULE_H #include <string> namespace gap { class ParamValue { public: enum class Type { T_INT, T_FLOAT, T_UINT, T_STRING, T_UNDEFINED }; ...
qvex/suil
gar/configuration.h
// // Created by dc on 6/9/16. // #ifndef GAR_OPTIONS_H #define GAR_OPTIONS_H #include "server_config.h" #include "module_config.h" #include "app_config.h" namespace gap { class Configuration { public: static Configuration loadFromFile(const std::string& configFile); ServerConfig& serverC...
qvex/suil
gap/app_priv.h
<reponame>qvex/suil<filename>gap/app_priv.h // // Created by dc on 6/6/16. // #ifndef GAR_APP_PRIV_H #define GAR_APP_PRIV_H #include "server_config.h" #include "middleware_pipeline.h" #include "middleware_pipeline_priv.h" #include "resource_handler.h" #include "resource_handler_priv.h" namespace gap { class App...
qvex/suil
gar/gar.h
// // Created by dc on 6/8/16. // #ifndef GAR_GAR_H #define GAR_GAR_H #include "server.h" #include "app_handler.h" #include "configuration.h" namespace gar { /** * @brief GAR is the hook between the application and the server. * It loads the user application and runs in on the server using * set...
qvex/suil
gap/trie.h
<filename>gap/trie.h<gh_stars>0 // // Created by dc on 6/6/16. // #ifndef GAR_TRIE_H #define GAR_TRIE_H #include <memory> #include <vector> #include <string> #include <algorithm> namespace gap { template<typename ContentType> class Trie { protected: typedef std::shared_ptr<ContentType> ContentPt...
qvex/suil
gap/middleware_factory.h
// // Created by dc on 6/5/16. // #ifndef GAR_MIDDLEWARE_FACTORY_H #define GAR_MIDDLEWARE_FACTORY_H #include "middleware.h" namespace gap { class MiddlewareFactory { public: typedef std::shared_ptr<MiddlewareFactory> Ptr; virtual Middleware::Ptr createMiddleware() = 0; }; } #endif //GAR...
qvex/suil
gap/resource_handler.h
// // Created by dc on 6/6/16. // #ifndef GAR_RESOURCE_HANDLER_H #define GAR_RESOURCE_HANDLER_H #include "request.h" #include "response.h" namespace gap { class ResourceHandler { public: typedef std::shared_ptr<ResourceHandler> Ptr; virtual void handle(const HttpRequest& req, HttpResponse& r...
qvex/suil
gar/socket_adaptors.h
<filename>gar/socket_adaptors.h // // Created by dc on 6/3/16. // #ifndef GAR_SOCKET_ADAPTORS_H #define GAR_SOCKET_ADAPTORS_H #include <boost/asio.hpp> #ifdef GAR_OPENSSL_ENABLED #include <boost/asio/ssl.hpp> #endif namespace gar { using boost::asio::ip::tcp; typedef tcp::endpoint SocketEp; typedef b...
qvex/suil
gar/timer_queue.h
// // Created by dc on 6/4/16. // #ifndef GAR_TIMER_QUEUE_H #define GAR_TIMER_QUEUE_H #include <memory> #include <boost/asio.hpp> #include <deque> #include <functional> #include <thread> #include <chrono> #include "log.h" namespace gar { class TimerQueue : public std::enable_shared_from_this<TimerQueue> { ...
qvex/suil
common/request.h
// // Created by dc on 6/3/16. // #ifndef GAR_REQUEST_H #define GAR_REQUEST_H #include "util.h" #include "query_string.h" #include <unordered_map> namespace gap { enum HttpMethod { DELETE = 0x1, GET = 0x2, HEAD = 0X4, POST = 0X8, PUT = 0x10, CONNECT...
qvex/suil
test/gap/trie_tests.h
<filename>test/gap/trie_tests.h<gh_stars>0 // // Created by dc on 6/8/16. // #ifndef GAR_TRIE_TESTS_H #define GAR_TRIE_TESTS_H #include <gtest/gtest.h> #include "trie.h" using namespace gap; class TrieTest : public ::testing::Test { public: typedef std::shared_ptr<int> Content; Content testData_; Trie<i...
qvex/suil
gap/middleware_pipeline.h
// // Created by dc on 6/5/16. // #ifndef GAR_MIDDLEWARE_PIPELINE_H #define GAR_MIDDLEWARE_PIPELINE_H #include "middleware_factory.h" namespace gap { class MiddlewarePipelinePriv; class MiddlewarePipeline { public: typedef std::shared_ptr<MiddlewarePipeline> Ptr; MiddlewarePipeline(); ...
qvex/suil
gap/route_params.h
// // Created by dc on 6/6/16. // #ifndef GAR_ROUTER_H #define GAR_ROUTER_H #include <unordered_map> #include "util.h" #include "param_value.h" UT_FRIEND_DECLARE(RouteParamsTest); namespace gap { class RouteParamsParser; class RouteParams { public: const ParamValue &operator[](const std::string&...
adeca/ADCExtensions
ADCExtensions/UIImageView+ADC.h
<reponame>adeca/ADCExtensions<gh_stars>1-10 // // UIImageView+ADC.h // ADCExtensions // // Created by <NAME> on 18/10/2013. // Copyright (c) 2013 <NAME>. All rights reserved. // #import <UIKit/UIKit.h> @interface UIImageView (ADC) - (id)initWithImageNamed:(NSString *)name; @end
adeca/ADCExtensions
ADCExtensions/UICollectionView+FlowLayout.h
<reponame>adeca/ADCExtensions // // UICollectionView+FlowLayout.h // ADCExtensions // // Created by <NAME> on 18/10/2013. // Copyright (c) 2013 <NAME>. All rights reserved. // #import <UIKit/UIKit.h> @interface UICollectionView (FlowLayout) @property (nonatomic, retain) UICollectionViewFlowLayout *collectionView...
adeca/ADCExtensions
ADCExtensions/NSDictionary+ADC.h
// // NSDictionary+ADC.h // ADCExtensions // // Created by <NAME> on 19/02/2013. // Copyright (c) 2013 <NAME>. All rights reserved. // #import <Foundation/Foundation.h> @interface NSDictionary (ADC) /*! Returns the set of objects from the dictionary that corresponds to the specified keys as an NSArray. Keys no...
adeca/ADCExtensions
ADCExtensions/UIImage+Cache.h
// // UIImage+Cache.h // ADCExtensions // // Created by <NAME> on 18/10/2013. // Copyright (c) 2013 <NAME>. All rights reserved. // #import <UIKit/UIKit.h> @interface UIImage (Cache) + (UIImage*)cachedImageForPath:(NSString*)path; @end
adeca/ADCExtensions
ADCExtensions/NSArray+Functional.h
// // NSArray+Functional.h // ADCExtensions // // Created by <NAME> on 14/07/2013. // Copyright (c) 2013 <NAME>. All rights reserved. // #import <Foundation/Foundation.h> @interface NSArray (Functional) /*! Calls block once for each element in self, passing that element as a parameter. */ - (void)each:(void (^...
adeca/ADCExtensions
ADCExtensions/UIView+Constraints.h
// // UIView+Constraints.h // ADCExtensions // // Created by <NAME> on 2/27/15. // Copyright (c) 2015 <NAME>. All rights reserved. // #import <UIKit/UIKit.h> @interface UIView (Constraints) /** These methods add constraints to a view that will make it resize along with its superview. When a view is added via...
adeca/ADCExtensions
ADCExtensions/UIImage+Orientation.h
// // UIImage+Orientation.h // ADCExtensions // // Created by <NAME> on 18/10/2013. // Copyright (c) 2013 <NAME>. All rights reserved. // #import <UIKit/UIKit.h> @interface UIImage (Orientation) - (UIImage*)imageWithOrientation:(UIImageOrientation)orientation; - (UIImage*)verticallyMirroredImage; - (UIImage*)ho...
adeca/ADCExtensions
ADCExtensions/NSSet+Sorting.h
// // NSSet+Sorting.h // ADCExtensions // // Created by <NAME> on 14/07/2013. // Copyright (c) 2013 <NAME>. All rights reserved. // #import <Foundation/Foundation.h> @interface NSSet (Sorting) /*! Returns an array of the set’s content sorted by using a given key path for comparison. */ - (NSArray *)sortedArray...