repo_name
stringlengths
5
122
path
stringlengths
3
232
text
stringlengths
6
1.05M
393385724/DDMISDKDemo
DDMISDK/DDMIAuthViewController.h
// // DDMIAuthViewController.h // HMLoginDemo // // Created by lilingang on 15/8/4. // Copyright (c) 2015年 lilingang. All rights reserved. // #import "DDMIBaseViewController.h" @class DDMIAuthViewController; @protocol DDMIAuthViewControllerDelegate <NSObject> - (void)authViewController:(DDMIAuthViewController *...
393385724/DDMISDKDemo
DDMISDK/DDMIDefines.h
<filename>DDMISDK/DDMIDefines.h // // DDMIDefines.h // MDLoginSDK // // Created by lilingang on 16/1/19. // Copyright © 2016年 LiLingang. All rights reserved. // #ifndef DDMIDefines_h #define DDMIDefines_h #ifndef MIResourceBundlePath #define MIResourceBundlePath \ [[NSBundle mainBundle] pathForResource: @ "DDMIRe...
393385724/DDMISDKDemo
DDMISDK/DDMIHandler.h
// // DDMIHandler.h // HMLoginDemo // // Created by lilingang on 15/8/3. // Copyright (c) 2015年 lilingang. All rights reserved. // /// info.plist 配置 CFBundleURLName为xiaomi #import <Foundation/Foundation.h> #import "DDMIUserInfoItem.h" #import "DDMITypeDefines.h" @class UIViewController; typedef NS_ENUM(NSUIntege...
393385724/DDMISDKDemo
DDMISDK/DDMITypeDefines.h
// // DDMITypeDefines.h // DDMISDKDemo // // Created by lilingang on 16/2/29. // Copyright © 2016年 LiLingang. All rights reserved. // #ifndef DDMITypeDefines_h #define DDMITypeDefines_h typedef NS_ENUM(NSUInteger, DDMIAuthResponseType) { DDMIAuthResponseTypeCode, //Authorization Code Flow DDMIAuthResponseT...
393385724/DDMISDKDemo
DDMISDK/XMPassport.framework/Headers/MPWebViewController.h
// // MPWebViewController.h // MiPassportFoundation // // Created by <NAME> on 13-11-28. // Copyright (c) 2013年 Xiaomi. All rights reserved. // #import <UIKit/UIKit.h> @protocol MPWebViewControllerDelegate; @interface MPWebViewController : UIViewController { UIWebView *webView; UIButton *closeButton; ...
mateusfgomes/ICC
Trabalho4.c
#include <stdio.h> #include <stdlib.h> /* <NAME> Nº USP: 10734773 Instituto de Ciencias Matematicas e de Computacao - Universidade de Sao Paulo Trabalho 4 Programa que calcula se ha' ou nao interseccao entre dois planos, duas retas ou plano e reta dadas suas equacoes, alem disso imprime a matriz escalonada que auxil...
mateusfgomes/ICC
Trabalho2.c
<filename>Trabalho2.c #include <stdio.h> #include <math.h> int main(void){ int n;//n -> numero de usuarios da base de dados int i;// i -> o numero de itens da base de dados double t;// t -> o limiar de itens da base de dados scanf("%d ", &n); scanf("%d ", &i); scanf("%lf", &t); int k,f,g,y; int usuario1, usu...
mateusfgomes/ICC
Trabalho3.c
<filename>Trabalho3.c<gh_stars>0 #include <stdio.h> #include <stdlib.h> /* <NAME> Instituto de Ciencias Matematicas e de Computacao da Universidade de Sao Paulo (Campus Sao Carlos) No USP: 10734773 */ //funcao flood-fill que passa preenchendo uma matriz paralela a' matriz mapa void flood(int* count, int posicaox, i...
jameskirkwood/port2-nds
nds/echo_test/source/main.c
<gh_stars>1-10 #include <nds.h> #include "App.h" int main() { defaultExceptionHandler(); vramDefault(); consoleDemoInit(); lcdSwap(); App_init(); while (1) { swiWaitForVBlank(); App_draw(); App_frame(); } return 0; }
jameskirkwood/port2-nds
nds/echo_test/include/App.h
#ifndef APP_H #define APP_H // App initialisation extern void App_init(); // Draw to the screen extern void App_draw(); // Process one frame extern void App_frame(); #endif
jameskirkwood/port2-nds
nds/echo_test/source/App.c
<gh_stars>1-10 #include "App.h" #include <nds.h> #include <stdio.h> #include "Port2.h" #define TICKS_TO_MICROS(ticks) ((ticks) / 33.513982) // Private //------------------------------------------------------------------------------ static int echo_ticks; static float echo_micros; static float average_micros; stat...
jameskirkwood/port2-nds
ino/port2_serial/Port2.h
<reponame>jameskirkwood/port2-nds<filename>ino/port2_serial/Port2.h #import <Arduino.h> #import <avr/io.h> #import <avr/interrupt.h> class Port2 { private: static const int READ_BACK_PIN = 12; static const int BUS_FORWARD_PIN = 3; // The time to keep driving the NDS side of the bus after sending an IRQ // T...
jameskirkwood/port2-nds
nds/port2_terminal/source/Port2.c
#include "Port2.h" #include <nds.h> // Private //------------------------------------------------------------------------------ static void (*input_listener)(u8); // slot 2 IRQ handler when listening void listen_isr() { (*input_listener)(SRAM[0]); } // Public //-------------------------------------------------...
jameskirkwood/port2-nds
nds/echo_test/source/Port2.c
#include "Port2.h" #include <nds.h> // Private //------------------------------------------------------------------------------ static volatile enum { PORT2_IDLE, PORT2_IRQ_WAIT } Port2_status; // slot 2 IRQ handler when waiting for an echo reply // (stops timer 0 and changes to idle state) void echo_isr() { T...
jameskirkwood/port2-nds
nds/port2_terminal/include/Port2.h
<reponame>jameskirkwood/port2-nds<gh_stars>1-10 #ifndef PORT2_H #define PORT2_H #include <nds.h> // Module initialisation extern void Port2_init(); // Register a listener function to be called each time a byte is received. // Passing a null pointer causes all bytes sent by a Port2 peripheral to be // ignored (by dis...
jameskirkwood/port2-nds
nds/port2_terminal/source/main.c
#include <nds.h> #include "App.h" int main() { defaultExceptionHandler(); videoSetMode(MODE_0_2D); videoSetModeSub(MODE_0_2D); consoleInit(NULL, 3,BgType_Text4bpp, BgSize_T_256x256, 31, 0, true, true); keyboardInit(NULL, 3, BgType_Text4bpp, BgSize_T_256x512, 20, 0, false, true); keyboardShow(); App_init();...
jameskirkwood/port2-nds
nds/echo_test/include/Port2.h
#ifndef PORT2_H #define PORT2_H // Module initialisation extern void Port2_init(); // Attempt to interrupt a Port2 peripheral and wait for an interrupt in return. // Returns the round trip response time of the peripheral (including the libnds // interrupt dispatch latency) in bus clock ticks, if there is a response. ...
jameskirkwood/port2-nds
nds/port2_terminal/source/App.c
<filename>nds/port2_terminal/source/App.c #include "App.h" #include <nds.h> #include <stdio.h> #include "Port2.h" // Private //------------------------------------------------------------------------------ void listener(u8 byte) { putchar(byte); } // Public //---------------------------------------------------...
zhoonit/api
c/src/nnstreamer-capi-pipeline.c
<reponame>zhoonit/api /* SPDX-License-Identifier: Apache-2.0 */ /** * Copyright (c) 2019 Samsung Electronics Co., Ltd. All Rights Reserved. * * @file nnstreamer-capi-pipeline.c * @date 11 March 2019 * @brief NNStreamer/Pipeline(main) C-API Wrapper. * This allows to construct and control NNStreamer pipeline...
CrackerCat/MiniSTL
Source/AssociativeContainers/RB-Tree/rb_tree.h
<gh_stars>0 #pragma once #include "Algorithms/algobase/stl_algobase.h" #include "Allocator/subAllocation/allocator.h" #include "Function/stl_function.h" #include "rb_tree_iterator.h" namespace MiniSTL { template<class Key, class Value, class KeyOfValue, class Compare, class Alloc = simpleAlloc<Value>> clas...
CrackerCat/MiniSTL
Source/Allocator/simpleAlloc/simpleAlloc.h
<gh_stars>0 #pragma once #include <climits> #include <cstddef> #include <cstdlib> #include <iostream> #include <new> namespace simpleAlloc { // just use new and delete to make a allocator template<class T> inline T *_allocate(ptrdiff_t size, T *) { std::set_new_handler(nullptr); T *tmp = static_cast<T *>(::o...
CrackerCat/MiniSTL
Source/SequenceContainers/Deque/stl_deque.h
#pragma once #include "Allocator/subAllocation/allocator.h" #include "Allocator/subAllocation/uninitialized.h" #include "deque_iterator.h" namespace MiniSTL { template<class T, class Alloc = simpleAlloc<T>> class deque { public:// alias declarations using value_type = T; using pointer = T *; using reference ...
CrackerCat/MiniSTL
Source/Allocator/subAllocation/alloc.h
#pragma once #include <cstdlib>// malloc and free #include <cstring>// memcpy #include <new> // bad_alloc namespace MiniSTL { //一级配置器 class _malloc_alloc { public: // alias declaration using malloc_handler = void (*)(); private: //以下函数指针用以处理内存不足的情况 static void *oom_malloc(size_t); static void *oom_re...
CrackerCat/MiniSTL
Source/Utils/stl_initializer_list.h
#pragma once #include <cstddef> namespace MiniSTL { template<class T> class initializer_list { public:// alias declarations using value_type = T; using reference = const T &; using const_reference = const T &; using size_type = size_t; using iterator = const T *; using const_iterator = const T *; priv...
CrackerCat/MiniSTL
Source/Iterator/typeTraits.h
<gh_stars>0 #pragma once namespace MiniSTL { namespace { template<bool, class Ta, class Tb> struct IfThenElse; template<class Ta, class Tb> struct IfThenElse<true, Ta, Tb> { using result = Ta; }; template<class Ta, class Tb> struct IfThenElse<false, Ta, Tb> { using result = Tb; }; }// namespace struct _true_type...
CrackerCat/MiniSTL
Source/SequenceContainers/Stack/stl_stack.h
#pragma once #include "SequenceContainers/Deque/stl_deque.h" namespace MiniSTL { template<class T, class Sequence = deque<T>> class stack; template<class T, class Sequence> bool operator==(const stack<T, Sequence> &, const stack<T, Sequence> &); template<class T, class Sequence> bool operator<(const stack<T, Seque...
CrackerCat/MiniSTL
Source/SequenceContainers/Deque/deque_iterator.h
<filename>Source/SequenceContainers/Deque/deque_iterator.h #pragma once #include "stl_iterator.h" #include <cstddef> namespace MiniSTL { // 缓冲区大小设定函数(在预设情况下传回可容纳的元素个数) // 若n不为0,则传回n,表示由用户自定 // 若n为0则采用预设值 预设值根据sz(元素大小)而定 inline size_t __deque_buf_size(size_t sz) { return sz < 512 ? size_t(512 / sz) : size_t(1); } ...
CrackerCat/MiniSTL
Source/AssociativeContainers/Multiset/stl_multiset.h
#pragma once #include "AssociativeContainers/RB-Tree/rb_tree.h" #include "Function/stl_function.h" namespace MiniSTL { // Forward declarations of operators == and <, needed for friend declarations. template<class Key, class Compare, class Alloc> class multiset; template<class Key, class Compare, class Alloc> inlin...
darthdie/capacitor
ios/Capacitor/Capacitor/CAPBridgedPlugin.h
<filename>ios/Capacitor/Capacitor/CAPBridgedPlugin.h<gh_stars>10-100 #import "CAPPluginMethod.h" #if defined(__cplusplus) #define CAP_EXTERN extern "C" __attribute__((visibility("default"))) #else #define CAP_EXTERN extern __attribute__((visibility("default"))) #endif #define CAPPluginReturnNone @"none" #define CAPPl...
darthdie/capacitor
ios/CapacitorCordova/CapacitorCordova/Classes/Public/CDVPluginManager.h
// // CDVPluginManager.h // CapacitorCordova // // Created by <NAME> on 26/2/18. // #import <Foundation/Foundation.h> #import "CDVPlugin.h" @interface CDVPluginManager : NSObject @property (nonatomic, strong) NSMutableDictionary * pluginsMap; @property (nonatomic, strong) NSMutableDictionary * pluginObjects; @pro...
allanragec/AMLocationBased-iOS
Example/LocationBased/CreatePointViewController.h
<filename>Example/LocationBased/CreatePointViewController.h // // CreatePointViewController.h // LocationBased // // Created by <NAME> on 8/29/15. // Copyright (c) 2015 <NAME>. All rights reserved. // #import <UIKit/UIKit.h> @interface CreatePointViewController : UIViewController @end
allanragec/AMLocationBased-iOS
Example/LocationBased/AMMapUtilsTrigonometry.h
// // UtilsTrigonometry.h // // Created by <NAME> on 1/12/15. // Copyright (c) 2015. All rights reserved. // #import <Foundation/Foundation.h> #import <CoreLocation/CoreLocation.h> @interface AMMapUtilsTrigonometry : NSObject +(double)getHypotenuseWithPointA:(CLLocation *)pointA andPointB:(CLLocation *)pointB; +...
allanragec/AMLocationBased-iOS
Example/LocationBased/AppDelegate.h
// // AppDelegate.h // LocationBased // // Created by <NAME> on 8/29/15. // Copyright (c) 2015 <NAME>. All rights reserved. // #import <UIKit/UIKit.h> @interface AppDelegate : UIResponder <UIApplicationDelegate> @property (strong, nonatomic) UIWindow *window; @end
Pro/open62541_namespaces
src/main.c
#include <stdio.h> #include <signal.h> #include <stdlib.h> #ifdef UA_NO_AMALGAMATION # include "ua_types.h" # include "ua_server.h" # include "ua_config_standard.h" # include "ua_network_tcp.h" # include "ua_log_stdout.h" #else # include "open62541.h" #endif #include "test_generated.h" UA_Logger logger = UA_Log_Std...
ESS-Group/clang-sfi
integrationtests/MFC_header/source.h
int g() { return 0; } int f() { int a = g(); int b = 5, c = 6; int e; e = a + b + c; g(); if (e) { return 0; } else { return 1; } }
ESS-Group/clang-sfi
src/utils.h
#include "clang/AST/AST.h" using namespace clang; template <class T> void deleteFromList(std::vector<T> &src, std::vector<T> &toDelete) { bool deleted = false; for (std::vector<const BinaryOperator *>::iterator i = src.begin(); i != src.end(); deleted ? i : i++) { deleted = false; for (T c : t...
ESS-Group/clang-sfi
src/SFIAction.h
<gh_stars>0 #ifndef SFIASTACTION_H #define SFIASTACTION_H #include "clang/Frontend/ASTConsumers.h" #include "clang/Frontend/FrontendActions.h" #include "FaultInjector.h" #include <string> using namespace clang; class SFIAction : public ASTFrontendAction { public: SFIAction(std::vector<std::string> pinjectorn...
ESS-Group/clang-sfi
src/FaultInjector.h
#ifndef FAULTINJECTOR_H #define FAULTINJECTOR_H #include <sstream> #include <string> #include "clang/AST/AST.h" #include "clang/ASTMatchers/ASTMatchFinder.h" #include "clang/Rewrite/Core/Rewriter.h" #include "clang/Frontend/CompilerInstance.h" #include "GenericRewriter.h" class MatchHandler; using namespace clang;...
ESS-Group/clang-sfi
src/GenericRewriter.h
#ifndef REWRITER_H #define REWRITER_H #include "clang/Rewrite/Core/Rewriter.h" #include "clang/Basic/SourceManager.h" #include "clang/Frontend/CompilerInstance.h" using namespace clang; /// GenericRewrite is actually an adapter to clang::Rewriter, but since /// multiple methods can be just passed through, we extend ...
ESS-Group/clang-sfi
src/FaultConstraints.h
<reponame>ESS-Group/clang-sfi #ifndef FAULTCONSTRAINTS_H #define FAULTCONSTRAINTS_H #include "clang/AST/AST.h" using namespace clang; constexpr int MAXSTATEMENTNUMFORCONSTRAINT = 5; constexpr bool DONOTDELETEDECLSTMTINCONSTRAINT = false; constexpr bool RETURNISAJUMP = true; constexpr bool DONTCOUNTBREAKINSWITCHCASEF...
ESS-Group/clang-sfi
integrationtests/MFC_PROJECT/library.h
int libraryfunction(int a); int removablefunctioncall(); inline int headerfunction() { int a = 5; int b = 6; int c = 7; int d = 8; removablefunctioncall(); return 0; }
ESS-Group/clang-sfi
src/FaultInjectors/_all.h
#ifndef _ALL_H #define _ALL_H #include <iostream> #include "clang/ASTMatchers/ASTMatchers.h" #include "FaultConstraints.h" #include "FaultInjector.h" #include "utils.h" #include "GenericRewriter.h" using namespace clang::ast_matchers; #include "llvm/Support/Debug.h" using namespace llvm; class MIFSInjector : publ...
ESS-Group/clang-sfi
src/SFIASTConsumer.h
<filename>src/SFIASTConsumer.h #ifndef SFIASTCONSUMER_H #define SFIASTCONSUMER_H #include "clang/AST/ASTConsumer.h" #include "clang/Frontend/CompilerInstance.h" #include "FaultInjector.h" using namespace clang; class SFIASTConsumer : public ASTConsumer { public: SFIASTConsumer(std::string name, std::vector<st...
sss85921/pd2-angrybird
mainwindow.h
#ifndef MAINWINDOW_H #define MAINWINDOW_H #include <QMainWindow> #include <QTimer> #include <QGraphicsScene> #include <QGraphicsRectItem> #include <QList> #include <QGraphicsview> #include <QDialog> #include <QGraphicsItem> #include <stdlib.h> #include <time.h> #include <QLabel> #include <QPixmap> #incl...
tomolt/tiny-library-collection
tests/all_tests.c
#include <stdlib.h> #define DH_IMPLEMENT_HERE #include "dh_cuts.h" void calm_suite(void); void hashtable_suite(void); void dh_cuts_suite(void); int main() { dh_init(stdout); dh_branch ( calm_suite(); ) dh_branch ( hashtable_suite(); ) dh_branch ( dh_cuts_suite(); ) dh_summarize(); return EXIT_SUCCESS;...
tomolt/tiny-library-collection
dh_cuts.h
/* dh_cuts.h - Dynamic Hierarchy C Unit Testing System * * ISC License * * Copyright (c) 2018, 2019, 2020 <NAME> * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice a...
tomolt/tiny-library-collection
tests/hashtable_suite.c
<reponame>tomolt/tiny-library-collection<filename>tests/hashtable_suite.c #include <stdlib.h> #include <stdio.h> #include <math.h> #include <string.h> #include "dh_cuts.h" #define HT_IMPLEMENT_HERE #include "hashtable.h" char *my_strdup(char const *string) { size_t length = strlen(string) + 1; char *copy = malloc(...
tomolt/tiny-library-collection
tests/calm_suite.c
#include <stdlib.h> #include <math.h> #include "dh_cuts.h" #define CM_IMPLEMENT_HERE #include "calm.h" const double EPSILON = 0.0001; static int cmp_v4(cm_v4 a, cm_v4 b) { float ac[4], bc[4]; cm_recv_v4(a, ac); cm_recv_v4(b, bc); for (int i = 0; i < 4; i++) { if (fabs(ac[i] - bc[i]) > EPSILON) return 0; }...
tomolt/tiny-library-collection
calm.h
<reponame>tomolt/tiny-library-collection /* calm.h - C Accelerated Linear Maths library * * MIT License * * Copyright (c) 2018 <NAME> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Softwa...
tomolt/tiny-library-collection
hashtable.h
/* hashtable.h - A Robin Hood-hashing hashtable implementation * * MIT License * * Copyright (c) 2018 <NAME> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, i...
tomolt/tiny-library-collection
tests/dh_cuts_suite.c
<reponame>tomolt/tiny-library-collection #include <signal.h> #include <sys/types.h> #include <sys/wait.h> #include <unistd.h> #include <stdlib.h> #include <stdio.h> #include "dh_cuts.h" static void test_crash_recovery(void) { dh_push("crash recovery"); pid_t pid = fork(); if (pid == 0) { freopen("/dev/null", "w"...
DonRumata710/NetCowork
include/netcoworkserver.h
<gh_stars>0 #ifndef NETCOWORKSERVER_H #define NETCOWORKSERVER_H #include "netcoworkprovider.h" #include <QTcpServer> #include <QTcpSocket> #include <set> #include <memory> class CreationFilter { public: virtual bool allow(QTcpSocket* socket, uint32_t class_id) = 0; }; class ClassFilter : public CreationFilte...
DonRumata710/NetCowork
Generator/printer.h
<filename>Generator/printer.h #ifndef PRINTER_H #define PRINTER_H #include "class.h" #include "struct.h" #include "function.h" #include "enum.h" #include <string> #include <fstream> class Printer { public: explicit Printer(const std::string& folder_path = std::string(".")); bool print_class(const Class& c)...
DonRumata710/NetCowork
Generator/struct.h
#ifndef STRUCT_H #define STRUCT_H #include "codeelement.h" #include "parameter.h" #include <string> #include <vector> class Struct : public CodeElement { public: explicit Struct(const std::string& name); Struct(const Struct& other); Struct(Struct&& other); void add_member(const Parameter& param); ...
DonRumata710/NetCowork
Examples/Example2/ball.h
#ifndef BALL_H #define BALL_H #include <QPoint> #include <QObject> #include <QGraphicsEllipseItem> #include <QDebug> class Ball : public QObject, public QGraphicsEllipseItem { Q_OBJECT public: Ball(QPointF pos = QPointF()); ~Ball() = default; void set_pos(QPointF new_pos); QPointF get_pos() con...
DonRumata710/NetCowork
Generator/dependency.h
<filename>Generator/dependency.h #ifndef DEPENDENCY_H #define DEPENDENCY_H #include <string> #include "codeelement.h" class Dependency : public CodeElement { public: Dependency(const std::string& _filename, const std::string& _type_name, Type_enum _type); virtual std::string get_module() const override; p...
DonRumata710/NetCowork
include/netcoworkclient.h
<filename>include/netcoworkclient.h<gh_stars>0 #ifndef NETCOWORKCLIENT_H #define NETCOWORKCLIENT_H #include "netcoworkprovider.h" #include <QTcpSocket> class NetCoworkClient : public QObject, public NetCoworkProvider { Q_OBJECT public: NetCoworkClient(); virtual void start(const std::string& address,...
DonRumata710/NetCowork
include/netcoworker.h
#ifndef NETCOWORKER_H #define NETCOWORKER_H #include "message.h" #include <QObject> #include <QDataStream> class NetCoworkFactory; class NetCoworker : public QObject { Q_OBJECT public: explicit NetCoworker(const NetCoworkFactory* _factory, uint32_t object_id = UINT32_MAX); virtual void handle_call(M...
DonRumata710/NetCowork
Generator/interfacemodel.h
#ifndef INTERFACEMODEL_H #define INTERFACEMODEL_H #include "dependency.h" #include "class.h" #include "struct.h" #include "enum.h" #include "simpletypeelement.h" #include "printer.h" #include <set> class InterfaceModel { public: InterfaceModel(); void print(Printer& printer); const CodeElement* get_ty...
DonRumata710/NetCowork
Generator/filehandler.h
#ifndef FILEHANDLER_H #define FILEHANDLER_H #include <fstream> #include <sstream> class FileHandler { public: FileHandler(const std::string& file); bool is_open() const; bool is_end() const; std::string next_word(); const std::string& get_filename() const; size_t get_line_num() const; pr...
DonRumata710/NetCowork
Examples/Example2/game.h
<reponame>DonRumata710/NetCowork #ifndef GAME_H #define GAME_H #include <QGraphicsView> #include <QHostAddress> #include <QPaintEvent> #include <QTimer> #include "generated/Ball_net.h" #include "generated/Platform_net.h" #include "ball.h" #include "platform.h" class Game : public QGraphicsView { Q_OBJECT pub...
DonRumata710/NetCowork
Generator/property.h
#ifndef PROPERTY_H #define PROPERTY_H #include "parameter.h" struct Property { Parameter parameter; std::string getter; std::string setter; }; #endif // PROPERTY_H
DonRumata710/NetCowork
Generator/function.h
<filename>Generator/function.h #ifndef FUNCTION_H #define FUNCTION_H #include "types.h" #include "codeelement.h" #include "parameter.h" #include <vector> class Function : public CodeElement { public: explicit Function(const std::string& name); void add_param(const Parameter& type); const Parameter* ge...
DonRumata710/NetCowork
include/netcoworkfactory.h
#ifndef NETCOWORKFACTORY_H #define NETCOWORKFACTORY_H #include "netcoworker.h" class NetCoworkFactory { friend class NetCoworkProvider; friend class NetCoworkServer; public: virtual ~NetCoworkFactory() = default; uint32_t get_class_id() const; void send_func_call(Message& msg, const NetCoworke...
DonRumata710/NetCowork
Generator/class.h
<filename>Generator/class.h #ifndef CLASS_H #define CLASS_H #include "function.h" #include "property.h" #include "dependency.h" #include <vector> #include <set> class Class : public CodeElement { public: explicit Class(const std::string& name); Class(const Class& other); Class(Class&& other); void ...
DonRumata710/NetCowork
include/netcoworkprovider.h
<filename>include/netcoworkprovider.h #ifndef NETCOWORKPROVIDER_H #define NETCOWORKPROVIDER_H #include "message.h" #include "netcoworkfactory.h" #include <functional> class NetCoworker; class NetCoworkProvider { public: virtual ~NetCoworkProvider() = default; virtual void start(const std::string& address...
DonRumata710/NetCowork
Examples/Example1/mainwindow.h
<filename>Examples/Example1/mainwindow.h<gh_stars>0 #ifndef MAINWINDOW_H #define MAINWINDOW_H #include <QPushButton> #include <QMainWindow> #include "generated/NetObject_net.h" namespace Ui { class MainWindow; } QMainWindow* getMainWindow(); class MainWindow : public QMainWindow { Q_OBJECT public: expli...
DonRumata710/NetCowork
Generator/types.h
<reponame>DonRumata710/NetCowork #ifndef TYPES_H #define TYPES_H #include "enumutil.h" #define Token(DO) \ DO(TOKEN_IMPORT, "import") \ DO(TOKEN_CLASS, "class") \ DO(TOKEN_STRUCT, "struct") \ DO(TOKEN_ENUM, "enum") \ DO(TOKEN_FUNCTION, "function") \ DO(TOKEN_GETTER, "get") \ DO(TOKEN_SETT...
DonRumata710/NetCowork
include/message.h
<reponame>DonRumata710/NetCowork<gh_stars>0 #ifndef MESSAGE_H #define MESSAGE_H #include <QDataStream> #include <QString> #include <string> class Message { public: Message(); explicit Message(const QByteArray& _data); explicit Message(QByteArray&& _data); Message(Message&& msg); Message& operat...
DonRumata710/NetCowork
Examples/Example2/mainwindow.h
#ifndef MAINWINDOW_H #define MAINWINDOW_H #include <netcoworkprovider.h> #include <QMainWindow> #include <QAbstractButton> #include <QHostAddress> namespace Ui { class MainWindow; } QMainWindow* getMainWindow(); class MainWindow : public QMainWindow { Q_OBJECT public: explicit MainWindow(QWidget *paren...
DonRumata710/NetCowork
Generator/simpletypeelement.h
#ifndef SIMPLETYPEELEMENT_H #define SIMPLETYPEELEMENT_H #include "types.h" #include "codeelement.h" class SimpleType : public CodeElement { public: explicit SimpleType(Type_enum type); private: std::string get_typename(Type_enum type) const; }; #endif // SIMPLETYPEELEMENT_H
DonRumata710/NetCowork
Generator/enumutil.h
<filename>Generator/enumutil.h #ifndef ENUMUTIL_H #define ENUMUTIL_H #include <unordered_map> #define DECLARE_ENUM(VAL) VAL, #define DECLARE_ENUM_WITH_VAL(NAME, VAL) NAME = VAL, #define DECLARE_ENUM_WITH_NAMES(VAL, STR) DECLARE_ENUM(VAL) #define DECLARE_ENUM_WITH_NAMES_VAL(NAME, STR, VAL) DECLARE_ENUM_WITH_VAL(NAME,...
DonRumata710/NetCowork
Generator/codeelement.h
<filename>Generator/codeelement.h<gh_stars>0 #ifndef CODEELEMENT_H #define CODEELEMENT_H #include "types.h" class CodeElement { friend std::hash<CodeElement>; public: CodeElement(Type_enum _type, const std::string& _name); CodeElement(const CodeElement& ce); CodeElement(CodeElement&& other); vir...
DonRumata710/NetCowork
Generator/parameter.h
<filename>Generator/parameter.h #ifndef PARAMETER_H #define PARAMETER_H #include "types.h" #include "codeelement.h" struct Parameter { const CodeElement* element; std::string value_name; }; #endif // PARAMETERS_H
DonRumata710/NetCowork
Examples/Example2/platform.h
#ifndef PLATFORM_H #define PLATFORM_H #include <QObject> #include <QGraphicsItem> #include <cstdint> class Platform : public QObject, public QGraphicsItem { Q_OBJECT public: Platform(uint16_t pos = 0); void set_field_size(int size); void set_h_pos(int p); void set_field(QWidget* f); void...
DonRumata710/NetCowork
Generator/enum.h
<gh_stars>0 #ifndef ENUM_H #define ENUM_H #include "codeelement.h" #include <map> class Enum : public CodeElement { public: explicit Enum(const std::string& name); void add_value(const std::string& name, int64_t val); void add_value(std::string&& name, int64_t val); void add_value(const std::pair<...
colfrog/cx
cxs.c
#include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include "cx.h" void cx_set_path(char *path, bool absolute, char *buf, size_t buflen) { char ibuf[buflen]; memset(ibuf, 0, buflen); memset(buf, 0, buflen); #ifdef CX_DATA_DIR const char *data_path = CX_DATA_DIR; #else const char *da...
colfrog/cx
cx.h
<gh_stars>10-100 #include <stdbool.h> #include <sys/types.h> #ifdef __GLIBC__ #define _BSD_SOURCE #include <strings.h> #include <getopt.h> #include <sys/stat.h> #endif #ifndef CX_DIR_NAME #define CX_DIR_NAME "cx" #endif #ifndef CX_DATA_DIR // #define CX_DATA_DIR "~/.local/share" #endif #define DEFAULT_SOCKET_NAME "...
colfrog/cx
cxd.c
#include <sys/param.h> #include <sys/socket.h> #include <sys/stat.h> #include <sys/un.h> #include <ctype.h> #include <err.h> #include <errno.h> #include <fcntl.h> #include <regex.h> #include <sqlite3.h> #include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include "cx.h"...
colfrog/cx
cxc.c
<reponame>colfrog/cx #include <sys/socket.h> #include <sys/param.h> #include <sys/un.h> #include <err.h> #include <errno.h> #include <unistd.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include "cx.h" static char optstr[] = "-dlurtS:i:n:s:p:"; static char usage[] = "cxc [-dlurt] [-S <prio>] [-i <id...
nevzatseferoglu/boulder-dash
src/headers/main.h
#include "common.h" enum textureAll textureType; extern void initSDL(void); extern void initGame(void); extern void initStage(void); extern void releaseTools(void); extern void doInput(void); extern void prepareWindow(void); extern void presentWindow(void); extern void loadMedia(void); SDL_Texture* scoreBoard; SDL...
nevzatseferoglu/boulder-dash
src/map.c
#include "headers/map.h" void loadMap(void); void drawExtraImage(void); char* intToString(int number); void levelUptoBorder(int i); void frameIncrement(void); void startScreen(void); void menu(void); void endSceen(void); void scoreTable(void); int x = 0 , y = 0 , i = 0; void initMap(void) { loadMap(); renderT...
nevzatseferoglu/boulder-dash
src/headers/input.h
<reponame>nevzatseferoglu/boulder-dash #include "common.h" extern struct mainTools gameTools; extern void releaseTools(void); extern SDL_bool quit;
nevzatseferoglu/boulder-dash
src/check.c
<gh_stars>1-10 #include "headers/check.h" int checkArrayFrontier(int x , int y); int checkBorder(int x, int y); int checkEarth(int x, int y); int checkDiamond(int x , int y); int checkRock(int x, int y , int direction); int checkEmpty(int x , int y); int checkBorder(int x, int y) { if(levels[current.current_leve...
nevzatseferoglu/boulder-dash
src/input.c
<reponame>nevzatseferoglu/boulder-dash #include "headers/input.h" void doKeyUp(SDL_KeyboardEvent *event) { if (event->keysym.scancode < MAX_KEYBOARD_KEYS) { gameTools.keyboard[event->keysym.scancode] = 0; } } void doKeyDown(SDL_KeyboardEvent *event) { if (event->keysym.scancode < MAX_KEYBOARD_KEYS) { gameToo...
nevzatseferoglu/boulder-dash
src/headers/check.h
#include "common.h" extern enum textureAll textureType; extern struct Stage gameStage; extern struct levelTools levels[LEVEL_NUMBER]; extern struct currentOwnershipTools current;
nevzatseferoglu/boulder-dash
src/texture.c
#include "headers/texture.h" void loadaudios(void); void load_FontFormat(void); void LoadExtraImage(void); SDL_Texture* loadTexture(char* fileName) { SDL_Texture* tempTexture = NULL; SDL_Surface* loadedSurface = IMG_Load(fileName); if(!loadedSurface) { fprintf(stderr,"Surface IMG could not b...
nevzatseferoglu/boulder-dash
src/headers/defs.h
#define TRUE 1 #define FALSE 0 #define SCREEN_WIDTH 1280 #define SCREEN_HEIGHT 720 #define MAX_KEYBOARD_KEYS 350 #define LEVEL_NUMBER 10 #define TILE_SIZE 30 #define TILE_TYPE 8 #define FILE_NAME_SIZE 50 #define BOARD_WIDTH 114 #define BOARD_HEIGHT 40 #define TEXT_NUMBER 8 #define CHUNK_VOLUME 20 #define MUSIC...
nevzatseferoglu/boulder-dash
src/init.c
<reponame>nevzatseferoglu/boulder-dash #include "headers/init.h" static int initFlag = SDL_INIT_EVERYTHING; static int rendererFlag = SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC ; static int windowFlag = SDL_WINDOW_OPENGL; static int rendererIndex = -1; /* The index of the rendering driver to initizalize...
nevzatseferoglu/boulder-dash
src/headers/move.h
#include "common.h" extern enum textureAll textureType; extern int checkArrayFrontier(int x , int y); extern int checkBorder(int x, int y); extern int checkEarth(int x, int y); extern int checkDiamond(int x , int y); extern int checkRock(int x, int y , int direction); extern int checkEmpty(int x , int y); extern int ch...
nevzatseferoglu/boulder-dash
src/headers/init.h
<reponame>nevzatseferoglu/boulder-dash #include "common.h" extern struct mainTools gameTools; extern void prepareWindow(void); extern struct soundTools sounds; struct boardTools boards[TEXT_NUMBER]; extern struct currentOwnershipTools current; extern struct levelTools levels[LEVEL_NUMBER]; extern struct gameState state...
nevzatseferoglu/boulder-dash
src/headers/texture.h
<reponame>nevzatseferoglu/boulder-dash<gh_stars>1-10 #include "common.h" extern enum textureAll textureType; extern struct mainTools gameTools; extern void blit(SDL_Texture *texture, int x, int y , int w , int h); extern struct soundTools sounds; extern struct boardTools boards[TEXT_NUMBER]; extern struct levelTools l...
nevzatseferoglu/boulder-dash
src/headers/drawIssue.h
#include "common.h" extern struct mainTools gameTools; extern struct gameState state; extern void drawInitialBackground(void); extern void loadBackground(void);
nevzatseferoglu/boulder-dash
src/headers/camera.h
<gh_stars>1-10 #include "common.h" extern struct Stage gameStage; extern struct mainTools gameTools; extern struct levelTools levels[LEVEL_NUMBER]; extern struct currentOwnershipTools current;
nevzatseferoglu/boulder-dash
src/headers/stage.h
<filename>src/headers/stage.h #include "common.h" extern struct mainTools gameTools; extern struct gameState state; extern void drawMap(void); extern void initMap(void); extern void doPlayer(void); extern void doCamera(void); extern void startScreen(void); extern void endSceen(void);
nevzatseferoglu/boulder-dash
src/camera.c
#include "headers/camera.h" void doCamera(void) { current.centerPos.x = (SCREEN_WIDTH/2); current.centerPos.y = (SCREEN_HEIGHT/2); gameTools.camera.x = ((current.minerPos.x)*TILE_SIZE + TILE_SIZE/2 - current.centerPos.x); gameTools.camera.y = ((current.minerPos.y)*TILE_SIZE + TILE_SIZE/2 - current.ce...
nevzatseferoglu/boulder-dash
src/headers/structs.h
enum textureAll{ miner,empty,border,earth,diamond,levelPort,rock, spider }; struct gameState{ int pause; int gameover; int startScreen; int boulderDash; SDL_Point cursorPos; SDL_Point startGamePos; SDL_Point howToPlayPos; SDL_Point exitGamePos; int startGame; int HowToPlay; ...
nevzatseferoglu/boulder-dash
src/headers/map.h
<filename>src/headers/map.h #include "common.h" extern struct mainTools gameTools; extern enum textureAll textureType; extern struct Stage gameStage; extern void blit(SDL_Texture *texture, int x, int y , int w , int h); extern char* readFile(char*); extern struct boardTools boards[TEXT_NUMBER]; extern SDL_Text...
nevzatseferoglu/boulder-dash
src/fileOperation.c
#include "headers/fileOperation.h" void increase(char** level); char* readFile(char* map_file_name) { int i; size_t result; int fileSize; int currentPosition; int tempNumber; int quit = TRUE; char junk1[MAX_LINE] = {'\0'}; char junk2[MAX_LINE] = {'\0'}; char analyseLine[MAX_...
nevzatseferoglu/boulder-dash
src/move.c
#include "headers/move.h" void getMinerLocation(int* x , int* y); void getSpiderLocation(int* x, int* y); void dropTilltheEmptyRock(int x , int y); void dropTilltheEmptyDiamond(int x , int y); void moveSpider(int x,int y,int* preDirection); void dropRightLeft(int x , int y); void searchAndDropRock(void); void searchAn...