repo_name
stringlengths
5
122
path
stringlengths
3
232
text
stringlengths
6
1.05M
kylegmaxwell/training
src/board.h
<gh_stars>0 #pragma once #include <iostream> #include <vector> #include <sstream> #include <unordered_set> #include <unordered_map> #include "unittest.h" /*! * \brief The Board class respresents an N x N chess board * to solve the problem of placing N Queens such that * the Queens do not attack each other. */ cla...
kylegmaxwell/training
src/powerset.h
#pragma once #include "unittest.h" #include <queue> #include <vector> #include <unordered_set> #include <algorithm> #include <iostream> #include <sstream> class PowerSet : public UnitTest { public: typedef std::vector<std::string> StringList; void makePowerSetRecursive(StringList startSet, std::string elemen...
kylegmaxwell/training
src/listcycle.h
#pragma once #include "unittest.h" #include <iostream> #include <unordered_map> /*! * \brief The ListNode class represents a node in a linked list */ class ListNode { public: ListNode(char iData); ListNode(char iData, ListNode *iNext); // print my data void print(); // recursive print my dat...
kylegmaxwell/training
src/computeparity.h
#pragma once #include "unittest.h" class ComputeParity : public UnitTest { public: int computeParity(int value); virtual TestResult test() override; };
kylegmaxwell/training
src/unittest.h
<reponame>kylegmaxwell/training #pragma once #include <iostream> #include <string> /*! * Unit test base class. * Tests can implement the test() function to be run as part of a test suite. */ class UnitTest { public: // Allow child classes to override destructor if needed virtual ~UnitTest() = default; ...
kylegmaxwell/training
src/move.h
#pragma once #include <vector> #include "unittest.h" class Move : public UnitTest { public: Move(); Move(size_t size); ~Move(); Move(const Move & move); Move(Move && move); Move& operator=(const Move& move); Move& operator=(Move && move); std::vector<int> values; virtual UnitTes...
kylegmaxwell/training
src/narytree.h
<filename>src/narytree.h #pragma once #include "unittest.h" #include <iostream> #include <vector> #include <queue> #include <stack> #include <sstream> class TreeNode { public: TreeNode(char iData); // recursive print void print(std::iostream &stream); // just print data void printData(std::io...
kylegmaxwell/training
src/testsuite.h
#pragma once #include <vector> #include <memory> #include "unittest.h" /*! * Container for a list of unit tests. */ class TestSuite { public: /*! * Run all the tests that have been added * @returns status code */ static int test(const std::vector<std::unique_ptr<UnitTest>> &tests); };
kylegmaxwell/training
src/binarysearch.h
<filename>src/binarysearch.h #pragma once #include <vector> #include <algorithm> #include "unittest.h" class BinarySearch : public UnitTest { public: virtual TestResult test() override; /*! * \brief Search for the index of the given value. * \param value The value to look for in the array * \...
kylegmaxwell/training
src/hashletter.h
#pragma once #include <unordered_map> #include <algorithm> #include "unittest.h" class HashLetter : public UnitTest { public: typedef std::unordered_map<char, int> CharIntMap; const static std::string Book; const static std::string Letter; virtual TestResult test() override; /*! * \brief...
kylegmaxwell/training
src/pairsum.h
<gh_stars>0 #pragma once #include "unittest.h" #include <iostream> #include <vector> class PairSum : public UnitTest { public: typedef std::vector<int> IntVec; /*! * \brief hasPairSum Checks to see if there are any two integers that sum to the given value. * Assumes input vector is sorted. * ...
kylegmaxwell/training
src/sorting.h
#pragma once #include "unittest.h" #include <vector> #include <cstdlib> // rand #include <functional> class Sorting : public UnitTest { public: using IntVec = std::vector<int>; Sorting(); virtual TestResult test() override; private: /*! * \brief testSort Test a sorting algorithm that operates...
kylegmaxwell/training
src/maxstack.h
<filename>src/maxstack.h #pragma once #include "unittest.h" #include <vector> class MaxStack : public UnitTest { public: using IntVec = std::vector<int>; /*! * \brief push Add a new value to the top of the stack, and compute the max */ void push(int value); /*! * \brief push Remove a...
kylegmaxwell/training
src/dynamicprogramming.h
#pragma once #include <vector> #include "unittest.h" /*! * \brief The Array class stores n x m array of data */ template <class T> class Array2D { public: Array2D(size_t rows, size_t cols); //! Set the value at row, col in the array void setState(size_t row, size_t col, T state); //! Get the val...
kylegmaxwell/training
src/logger.h
#pragma once #include <iostream> #include <sstream> #ifdef _MSC_VER #include <windows.h> #endif class Logger { public: template <typename T> static void DEBUG_WORD(const T &in) { std::stringstream ss; ss << in; #ifdef _MSC_VER OutputDebugString(ss.str().c_str()); #else std::co...
kylegmaxwell/training
src/queens.h
<filename>src/queens.h #pragma once #include <iostream> #include <vector> #include <sstream> #include <unordered_set> #include <unordered_map> #include "unittest.h" #include "board.h" /*! * \brief The Queens class uses the queens board to solve the N Queens problem * http://en.wikipedia.org/wiki/Eight_queens_puzzl...
kylegmaxwell/training
src/binarytree.h
#pragma once #include <iostream> #include <memory> #include "unittest.h" class BinaryNode { public: typedef std::shared_ptr<BinaryNode> Ptr; BinaryNode(int iData); BinaryNode(int iData, BinaryNode *iLeft, BinaryNode *iRight); int mData; Ptr mLeft; Ptr mRight; }; typedef BinaryNode::Ptr B...
kylegmaxwell/training
src/convertbase.h
#pragma once #include "unittest.h" #include <iostream> #include <string> class ConvertBase : public UnitTest { public: virtual TestResult test() override; private: /*! * \brief Convert a number from one base to another. * \param baseIn The base that number is represented in * \param number The...
Sdaddy11/openpilotsg
selfdrive/common/version.h
<filename>selfdrive/common/version.h #define COMMA_VERSION "0.8.5-3_clean"
HeylelOS/Heaven
src/hvn-man/main.c
/* SPDX-License-Identifier: BSD-3-Clause */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <libgen.h> #include <limits.h> #include <fcntl.h> #include <err.h> #include <cmark.h> #define SECTION_MAX 8 struct hvn_man_args { char *input, *output; char *pagename; int section; ...
HeylelOS/Heaven
src/hvn-web/main.c
<reponame>HeylelOS/Heaven /* SPDX-License-Identifier: BSD-3-Clause */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <libgen.h> #include <limits.h> #include <fcntl.h> #include <err.h> #include <cmark.h> struct hvn_web_args { char *input, *output; char *head, *tail; }; struc...
TamarLabs/redischema
redischema.h
<gh_stars>0 #ifndef REDISCHEMA_H #define REDISCHEMA_H #define MODULE_NAME "redischema" #define SCHEMA_LOAD_ARGS_LIMIT 2 #define SCHEMA_LOAD_ARG_LIST 1 #define REDIS_HIERARCHY_DELIM ":" #define SCHEMA_KEY_SET "module:schema:order" #define SCHEMA_KEY_PREFIX "module:schema:keys:" #define OK_STR "OK" #define ZRANGE_CMD ...
TamarLabs/redischema
redischema.c
<reponame>TamarLabs/redischema #include "redismodule.h" #include <string.h> #include <stdlib.h> #include "jsmn.h" #include "redischema.h" int report_error(RedisModuleCtx *ctx, C_CHARS msg, PARSER_STATE *parser) { RedisModule_ReplyWithSimpleString(ctx, msg); return REDISMODULE_ERR; } /* walk a jason array the f...
electrickery/logicTester
arduinoCode/pinMap.h
// pin mapping from IC (adding one) to Arduino, power pins are 0 #define MAX_PINCOUNT 16 #define EXERCISE_PINCOUNT 14 #define QUERY_PINCOUNT 10 byte pins14[] = { 13, 12, 11, 10, 9, 8, 0, 2, 3, 4, 5, 6, 7, 0 }; byte power14 = A5; byte pins16[] = { A0, 13, 12, 11, 10, 9, 8, 0, 2, 3, 4, 5, 6, 7, A1, 0 }; // not imp...
electrickery/logicTester
arduinoMegaCode/pinMap.h
// pin mapping from IC (adding one) to Arduino, power pins are 0 #define MAX_PINCOUNT 16 #define EXERCISE_PINCOUNT 14 #define QUERY_PINCOUNT 10 // Uno config //byte pins14[] = { 13, 12, 11, 10, 9, 8, 0, 2, 3, 4, 5, 6, 7, 0 }; //byte power14 = A5; //byte pins16[] = { A0, 13, 12, 11, 10, 9, 8, 0, 2, 3, 4, 5, 6, 7, ...
Rodrigez01/Meridian_113
blakserv/admincons.c
// Meridian 59, Copyright 1994-2012 <NAME> and <NAME>. // All rights reserved. // // This software is distributed under a license that is described in // the LICENSE file that accompanies it. // // Meridian is a registered trademark. /* * admincons.c * Has a list of constant values for admin mode. */ #include "b...
Rodrigez01/Meridian_113
blakserv/builtin.c
// Meridian 59, Copyright 1994-2012 <NAME> and <NAME>. // All rights reserved. // // This software is distributed under a license that is described in // the LICENSE file that accompanies it. // // Meridian is a registered trademark. /* * builtin.c * This module adds certain hard coded accounts if the accounts canno...
Rodrigez01/Meridian_113
blakserv/timer.h
<reponame>Rodrigez01/Meridian_113 // Meridian 59, Copyright 1994-2012 <NAME> and <NAME>. // All rights reserved. // // This software is distributed under a license that is described in // the LICENSE file that accompanies it. // // Meridian is a registered trademark. /* * timer.h * */ #ifndef _TIMER_H #define _TIME...
Rodrigez01/Meridian_113
blakserv/sendmsg.c
// Meridian 59, Copyright 1994-2012 <NAME> and <NAME>. // All rights reserved. // // This software is distributed under a license that is described in // the LICENSE file that accompanies it. // // Meridian is a registered trademark. /* * sendmsg.c * This module interprets compiled Blakod. */ #include "blakser...
lovejavaee/apue
std/options.c
#include "apue.h" #include <errno.h> static void pr_sysconf(char *, int); static void pr_pathconf(char *, char *, int); int main(int argc, char *argv[]) { if (argc != 2) err_quit("usage: a.out <dirname>"); #ifdef _POSIX_ADVISORY_INFO printf("_POSIX_ADVISORY_INFO is defined (val is %d)\n", _POSIX_ADVISORY_INFO+0)...
hepburnalex/HBLineCharts
LineCharts/LineChartYAxisView.h
// // LineChartYAxisView.h // TestChart // // Created by Hepburn on 2020/3/9. // Copyright © 2020 Hepburn. All rights reserved. // #import <UIKit/UIKit.h> NS_ASSUME_NONNULL_BEGIN @interface LineChartYAxisView : UIView @property (nonatomic, strong) UIFont *axisFont; //坐标轴字体 @property (nonatomic, stro...
hepburnalex/HBLineCharts
LineCharts/LineChartView.h
<gh_stars>0 // // LineChartView.h // TestChart // // Created by Hepburn on 2020/3/9. // Copyright © 2020 Hepburn. All rights reserved. // #import <UIKit/UIKit.h> #import "LineChartHeader.h" #import "LineChartScrollView.h" #import "LineChartMarkBaseView.h" @interface LineChartView : UIView @property (nonatomic, a...
hepburnalex/HBLineCharts
LineCharts/LineChartXAxisView.h
<gh_stars>0 // // LineChartXAxisView.h // TestChart // // Created by Hepburn on 2020/3/9. // Copyright © 2020 Hepburn. All rights reserved. // #import <UIKit/UIKit.h> NS_ASSUME_NONNULL_BEGIN @interface LineChartXAxisView : UIScrollView @property (nonatomic, strong) UIFont *axisFont; //坐标轴字体 @propert...
hepburnalex/HBLineCharts
LineCharts/LineChartHeader.h
<filename>LineCharts/LineChartHeader.h // // LineChartHeader.h // UVLOOK // // Created by Hepburn on 2020/3/10. // Copyright © 2020 Hepburn. All rights reserved. // #ifndef LineChartHeader_h #define LineChartHeader_h // 线条类型 typedef NS_ENUM(NSInteger, LineType) { LineType_Straight, // 折线 LineType_Curve ...
hepburnalex/HBLineCharts
LineCharts/LineChartScrollView.h
<gh_stars>0 // // LineChartScrollView.h // TestChart // // Created by Hepburn on 2020/3/9. // Copyright © 2020 Hepburn. All rights reserved. // #import <UIKit/UIKit.h> #import "LineChartDrawView.h" NS_ASSUME_NONNULL_BEGIN @interface LineChartScrollView : UIScrollView @property (nonatomic, assign) NSInteger curr...
hepburnalex/HBLineCharts
LineCharts/LineChartDrawView.h
<reponame>hepburnalex/HBLineCharts<gh_stars>0 // // LineChartDrawView.h // TestChart // // Created by Hepburn on 2020/3/9. // Copyright © 2020 Hepburn. All rights reserved. // #import <UIKit/UIKit.h> #import "LineChartHeader.h" NS_ASSUME_NONNULL_BEGIN @interface LineChartDrawView : UIView @property (nonatomic, ...
hepburnalex/HBLineCharts
LineCharts/LineChartMarkBaseView.h
<gh_stars>0 // // LineChartMarkBaseView.h // UVLOOK // // Created by Hepburn on 2020/3/24. // Copyright © 2020 Hepburn. All rights reserved. // #import <UIKit/UIKit.h> #import "LineChartHeader.h" NS_ASSUME_NONNULL_BEGIN @interface LineChartMarkBaseView : UIImageView - (void)refreshMark:(LineChartMarkAlign)markA...
MatthewDupraz/Graphics-Engine
inc/matrix.h
<reponame>MatthewDupraz/Graphics-Engine #pragma once #include "math.h" #include <ostream> #include <array> #include "vect.h" template <unsigned int N, unsigned int M> class matrix { public: matrix():data_{{0}} {} matrix(float (&&data)[N][M]): matrix(data) {} matrix(float (&data)[N][M]) { for (unsigned int ...
MatthewDupraz/Graphics-Engine
inc/sfml_raster.h
<reponame>MatthewDupraz/Graphics-Engine #pragma once #include <SFML/Graphics.hpp> #include "raster.h" class SFMLRaster : public Raster { public: SFMLRaster(unsigned int w, unsigned int h); ~SFMLRaster() override; void draw_pixel(unsigned int x, unsigned int y, uint8_t r, uint8_t g, uint8_t b, uint8_t a...
MatthewDupraz/Graphics-Engine
inc/raster.h
<gh_stars>0 #pragma once class Raster { public: virtual ~Raster() {} virtual void draw_pixel(unsigned int x, unsigned int y, uint8_t r, uint8_t g, uint8_t b, uint8_t a = 255) = 0; virtual unsigned int get_width() const = 0; virtual unsigned int get_height() const = 0; virtual void ...
MatthewDupraz/Graphics-Engine
inc/sfml_app.h
<filename>inc/sfml_app.h #pragma once #include <SFML/Graphics.hpp> #include "sfml_raster.h" #include "renderer.h" class SFMLApp { public: SFMLApp(unsigned int width, unsigned int height, sf::String const& title); int start(); void draw(); private: sf::RenderWindow window; sf::Sprite sprite; SFMLRas...
MatthewDupraz/Graphics-Engine
inc/renderer.h
<filename>inc/renderer.h #pragma once #include "matrix.h" #include "vect.h" #include "raster.h" #include "math.h" #include <vector> struct attribute { vec3f pos; vec3f color; vec3f normal; }; struct varying { vec3f pos; vec3f color; vec3f normal; }; class Renderer { public: Renderer(Raster* raster) :ra...
MatthewDupraz/Graphics-Engine
inc/vect.h
#pragma once #include <ostream> #include "math.h" template <unsigned int N> struct vec { float coords[N]; float norm2() const { float sum(0); for (float d: coords) { sum += pow(d, 2); } return sum; } float norm() const { return sqrt(norm2()); } float operator[](unsigned int i) const { return coo...
lrx0014/SeeJson
src/SeeJSON.h
<gh_stars>1-10 /* SeeJSON.h */ /* SeeJSON @Ryann */ /* Under Development */ /* 2018/3/16 Updated */ #ifndef SEEJSON_H_INCLUDED #define SEEJSON_H_INCLUDED #include <stddef.h> /* size_t */ #ifdef __cplusplus #ifdef _WIN32 #define EXPORT extern "C" __declspec (dllexport) #else #define...
lrx0014/SeeJson
src/Test_SeeJSON.c
<gh_stars>1-10 /* Test_SeeJSON.c */ /* SeeJSON @Ryann */ /* Under Development */ /* 2018/3/16 Updated */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include "SeeJSON.h" #include "SeeJSON.c" static int cases_total = 0; /* Sum of Test Cases */ static int cases_passed = 0; /* Sum of Cases pass...
lrx0014/SeeJson
src/SeeJSON.c
<filename>src/SeeJSON.c /* SeeJSON.c */ /* SeeJSON @Ryann */ /* Under Development */ /* 2018/3/16 Updated */ #include "SeeJSON.h" #include <stdio.h> #include <assert.h> #include <stdlib.h> #include <errno.h> /* errno, ERANGE */ #include <math.h> /* HUGE_VAL */ #include <string.h> #ifndef JSON_PARSE_ST...
TextZip/Dino-Game-Arduino-Edition
dino_FPS/sprite.c
<reponame>TextZip/Dino-Game-Arduino-Edition<gh_stars>0 #include <avr/pgmspace.h> const unsigned char body [] PROGMEM = { 0x00, 0x00, 0xff, 0xf0, 0x00, 0x03, 0xff, 0xf8, 0x00, 0x03, 0xff, 0xf8, 0x00, 0x03, 0xff, 0xf8, 0x00, 0x03, 0xff, 0xf8, 0x00, 0x03, 0xff, 0xf8, 0x00, 0x03, 0xff, 0xf8, 0x00, 0x03, 0xff, 0xf8, ...
Kepler-Br/DukeNukem_map_converter
mapconverter.h
<filename>mapconverter.h #ifndef MAPCONVERTER_H #define MAPCONVERTER_H #include <string> #include <iostream> #include <fstream> #include <vector> #include <glm/glm.hpp> class MapConverter { struct sector { int16_t startWall; int16_t wallNum; int32_t ceilingHeight; int32_t fl...
t0mg/wordclock
software/wordclock/src/BrightnessController.h
<gh_stars>10-100 #pragma once #include <NeoPixelAnimator.h> #include <NeoPixelBus.h> #include "LDRReader.h" /* An 8-bit gamma-correction table from the Adafruit NeoPixel lib. Copy & paste this snippet into a Python REPL to regenerate: import math gamma=2.6 for x in range(256): print("{:3},".format...
t0mg/wordclock
software/wordclock/src/Timer.h
<reponame>t0mg/wordclock #include <functional> #include <Arduino.h> /* * Basic ESP32 interrupt timer helper. */ class Timer { public: Timer(); // Must be called from the ino setup and loop. void setup(std::function<void()> callback, uint32_t delay_seconds); void loop(); void start(); void...
t0mg/wordclock
software/wordclock/src/LDRReader.h
<reponame>t0mg/wordclock #pragma once /* * Light sensor. Reads the ambient light and build a representative value * between 0.0 and 1.0. Smooth the reading by doing a moving average. */ class LDRReader { public: // Reaction speed must be greater than 0 and at most 1.0. This controls the // input smoot...
t0mg/wordclock
software/wordclock/src/Display.h
#pragma once #include <NeoPixelAnimator.h> #include <NeoPixelBrightnessBus.h> #include "BrightnessController.h" #include "ClockFace.h" // The pin to control the matrix #define NEOPIXEL_PIN 32 // #define TIME_CHANGE_ANIMATION_SPEED 400 class Display { public: Display(ClockFace &clockFace, uint8_t...
t0mg/wordclock
software/wordclock/src/logging.h
#pragma once // Define debug to turn on debug logging. // #define DEBUG 1 // DLOG and DLOGLN are equivalent of Serial.print and println, but turned off by // the DEBUG macro absence. // DCHECK only log if the first parameter is false. // setupLogin() must be called from setup() for everything to work. #if defined(DE...
t0mg/wordclock
software/wordclock/src/Iot.h
#ifndef _IOT_H_ #define _IOT_H_ #include "Display.h" #include "Timer.h" #include <IotWebConf.h> #include <RTClib.h> // Maximum length of a single IoT configuration value. #define IOT_CONFIG_VALUE_LENGTH 16 class Iot { public: Iot(Display *display, RTC_DS3231 *rtc); ~Iot(); Iot(const Iot &) = delete; Iot &o...
donnywdavis/NOC-List
NOC List/MasterViewController.h
// // MasterViewController.h // NOC List // // Created by <NAME> on 1/28/15. // Copyright (c) 2015 The Iron Yard. All rights reserved. // #import <UIKit/UIKit.h> @interface MasterViewController : UITableViewController - (void)loadNocList; @end
CrushedPixel/Polyline2DPathRenderer
Source/MainComponent.h
#pragma once #include <JuceHeader.h> #include <Polyline2D/Polyline2D.h> class MainComponent : public OpenGLAppComponent { public: MainComponent(); ~MainComponent(); void initialise() override; void shutdown() override; void render() override; void paint(Graphics &g) override; void resi...
ibelem/wasm
code/fibonacci2/fib2.c
#include <stdio.h> #include <stdlib.h> #include <time.h> #include <sys/timeb.h> #if defined(WIN32) # define TIMEB _timeb # define ftime _ftime typedef __int64 TIME_T; #else #define TIMEB timeb typedef long long TIME_T; #endif double fibonacci(int n) { double a = 0; double b = 1; while (n > 1) {...
ibelem/wasm
code/add/add.c
<reponame>ibelem/wasm #include<stdio.h> int add(int a, int b){ return a + b; } int main() { printf("%d",add(1, 2)); }
ibelem/wasm
code/fibonacci1/fib1.c
<gh_stars>0 #include <stdio.h> #include <stdlib.h> #include <time.h> #include <sys/timeb.h> #if defined(WIN32) #define TIMEB _timeb #define ftime _ftime typedef __int64 TIME_T; #else #define TIMEB timeb typedef long long TIME_T; #endif double fibonacci(int n) { if (n <= 2) { return 1; } else return fib...
oahul14/SPH-Simulations
includes/SPH_2D.h
<filename>includes/SPH_2D.h #pragma once #include <vector> #include <utility> #include <iterator> #include <cmath> #include <iostream> #include <string> #include <list> using namespace std; class SPH_main; struct pre_calc_values { double dist, dWdr, e_ij_1, e_ij_2, v_ij_1, v_ij_2; }; struct offset { double dx0 ...
oahul14/SPH-Simulations
includes/file_writer.h
#pragma once #include <list> #include <string> #include "SPH_2D.h" int write_file(const string filename, const std::list<SPH_particle>& particle_list);
Ritchielambda/ECS
kylanliecs.h
<gh_stars>1-10 #pragma once #pragma once #include<unordered_map> #include <functional> #include<vector> #include<algorithm> #include<stdint.h> #include<type_traits> ///////////////////////////////////////////////// //masco about tick type #ifndef ECS_TICK_TYPE #define ECS_TICK_TYPE ECS::DefaultTickData #endif #ifnde...
yiwangxin/react-native-ywx-sign
ios/BjcaRNTools.h
<reponame>yiwangxin/react-native-ywx-sign // // BjcaTools.h // RNReactNativeYwxSign // // Created by 吴兴 on 2018/12/21. // Copyright © 2018 Facebook. All rights reserved. // 工具类 #import <Foundation/Foundation.h> NS_ASSUME_NONNULL_BEGIN @interface BjcaRNTools : NSObject /** 获取顶层ctrl @return */ + (UIViewCont...
MasterZean/z2c-compiler-cpp
zide/zide.h
<filename>zide/zide.h #ifndef _zide_zide_h #define _zide_zide_h #include <CtrlLib/CtrlLib.h> #include <CodeEditorFork/CodeEditor.h> #include <TabBar/TabBar.h> using namespace Upp; #include "ItemDisplay.hpp" #include "AssemblyBrowser.hpp" #include "EditorManager.hpp" #define LAYOUTFILE <zide/zide.lay> #include <Ctr...
MasterZean/z2c-compiler-cpp
z2clib/Node.h
<reponame>MasterZean/z2c-compiler-cpp #ifndef _z2clib_Node_h_ #define _z2clib_Node_h_ #include "entities.h" class NodeType { public: enum Type { Invalid, Const, BinaryOp, UnaryOp, Memory, Cast, Temporary, Def, List, Construct, Ptr, Index, SizeOf, Destruct, Property...
MasterZean/z2c-compiler-cpp
z2clib/BaseCompiler.h
<filename>z2clib/BaseCompiler.h #ifndef _z2clib_BaseCompiler_h_ #define _z2clib_BaseCompiler_h_ #include "Assembly.h" #include "Source.h" class BaseCompiler { public: enum PlatformType { WINDOWS32, POSIX, }; BaseCompiler(Assembly& aAss): ass(aAss) { #ifdef PLATFORM_WIN32 Platform = WINDOWS32; #endif #ifde...
MasterZean/z2c-compiler-cpp
z2clib/objecttype.h
<reponame>MasterZean/z2c-compiler-cpp<filename>z2clib/objecttype.h #ifndef _z2clib_ObjectType_h_ #define _z2clib_ObjectType_h_ #include <Core/Core.h> using namespace Upp; class ZClass; class Assembly; class Node; class ObjectType { public: ZClass* Class = nullptr; ObjectType* Next = nullptr; int P...
MasterZean/z2c-compiler-cpp
z2c/CommandLine.h
<filename>z2c/CommandLine.h #ifndef __COMMAND_LINE_HPP__ #define __COMMAND_LINE_HPP__ #include <Core/Core.h> namespace Z2 { using namespace Upp; class CommandLine { public: Index<String> Packages; String Path; String OutPath; String O; String BMName; String ARCH = "x86"; String BE = "c++"; bool CC = f...
MasterZean/z2c-compiler-cpp
z2clib/Scanner.h
#ifndef _z2c_ScannerP1_h_ #define _z2c_ScannerP1_h_ #include <Core/Core.h> using namespace Upp; #include "Source.h" #include <z2clib/Assembly.h> class Def; class Scanner { public: Scanner(ZSource& aSrc, bool windows): source(aSrc), win(windows) { parser = ZParser(aSrc.Data); //parser.SkipNewLi...
MasterZean/z2c-compiler-cpp
z2c/Node.h
#ifndef _z2c2_Node_h_ #define _z2c2_Node_h_ #include <Core/Core.h> #include "ZParser.h" namespace Z2 { using namespace Upp; class ZClass; class Variable; class Assembly; class Overload; class NodeType { public: enum Type { Invalid, Const, BinaryOp, UnaryOp, Memory, Assign, Cast, //Temporary, C...
MasterZean/z2c-compiler-cpp
z2clib/StopWatch.h
#ifndef __TIMESTOP_HPP__ #define __TIMESTOP_HPP__ #include <Core/Core.h> using namespace Upp; #ifdef PLATFORM_WIN32 class StopWatch : Moveable<StopWatch> { LARGE_INTEGER start; LARGE_INTEGER stop; LARGE_INTEGER freq; public: double Elapsed() { QueryPerformanceCounter(&stop); return (stop....
MasterZean/z2c-compiler-cpp
z2c/CppNodeWalker.h
<filename>z2c/CppNodeWalker.h<gh_stars>0 #ifndef _z2c2_CppNodeWalker_h_ #define _z2c2_CppNodeWalker_h_ #include <Core/Core.h> #include "Node.h" #include "Assembly.h" #include "IRGenerator.h" namespace Z2 { using namespace Upp; class CppNodeWalker { public: CppNodeWalker(Assembly& aAss, Stream& ss): ass(aAss), st...
MasterZean/z2c-compiler-cpp
z2c/BuildMethod.h
<reponame>MasterZean/z2c-compiler-cpp #ifndef __BUILD_METHOD_HPP__ #define __BUILD_METHOD_HPP__ #include <Core/Core.h> namespace Z2 { using namespace Upp; class BuildMethod: public Moveable<BuildMethod> { public: enum Type { btMSC, btGCC, btUnknown, }; BuildMethod::Type Type; String Name; String Arch...
MasterZean/z2c-compiler-cpp
z2clib/Assembly.h
<reponame>MasterZean/z2c-compiler-cpp #ifndef _z2c_Assembly_h_ #define _z2c_Assembly_h_ #include <Core/Core.h> using namespace Upp; #include "ZParser.h" #include "entities.h" #include "Source.h" class Compiler; class Assembly { public: ZClass* CCls = nullptr; ZClass* CDef = nullptr; ZClass* CVo...
MasterZean/z2c-compiler-cpp
z2c/OverloadResolver.h
#ifndef _z2c_OverloadResolver_h_ #define _z2c_OverloadResolver_h_ #include "Assembly.h" namespace Z2 { using namespace Upp; class GatherInfo { public: Overload* Rez = nullptr; int Count = 0; }; class OverloadResolver { public: OverloadResolver(Assembly& a): ass(a) { } Overload* Resolve(Method& def, Vector<...
MasterZean/z2c-compiler-cpp
z2clib/entities.h
#ifndef _z2clib_enitites_h_ #define _z2clib_enitites_h_ #include "objecttype.h" #include "Source.h" class Constant: public Entity, public Moveable<Constant> { public: bool IsEvaluated = false; bool InUse = false; ZClass* Parent = nullptr; CParser::Pos Skip; int Base = 10; String StringValue(const...
MasterZean/z2c-compiler-cpp
z2clib/CppNodeWalker.h
#ifndef _z2clib_CppNodeWalker_h_ #define _z2clib_CppNodeWalker_h_ #include "NodeWalker.h" class BaseCppNodeWalker: public NodeWalker { public: bool WriteCtQual = false; bool EqOperator = true; bool OptimizeSlice = false; BaseCppNodeWalker(Assembly& ass, Stream& s): NodeWalker(ass, s) { } void ...
MasterZean/z2c-compiler-cpp
z2clib/NodeWalker.h
#ifndef _z2c_NodeWalker_h_ #define _z2c_NodeWalker_h_ #include "Node.h" #include "Assembly.h" class Compiler; class NodeWalker { public: int indent = 0; Stream* cs; bool ClassConsts = false; Overload* Over = nullptr; Compiler* Comp = nullptr; String ForEachName = "_forIndex"; NodeWalker(Asse...
MasterZean/z2c-compiler-cpp
z2c/ErrorReporter.h
#ifndef _z2c2_ErrorReporter_h_ #define _z2c2_ErrorReporter_h_ #include <Core/Core.h> namespace Z2 { using namespace Upp; class Assembly; class ZClass; class Method; class Node; class Overload; class ZSyntaxError: Moveable<ZSyntaxError> { public: String Path; String Error; Point ErrorPoint; Overload* Context ...
MasterZean/z2c-compiler-cpp
z2c/Assembly.h
<filename>z2c/Assembly.h #ifndef _z2c2_Assembly_h_ #define _z2c2_Assembly_h_ #include <Core/Core.h> #include "ZParser.h" namespace Z2 { using namespace Upp; class Overload; class ZClass; class Node; class Method; class Entity: Moveable<Entity> { public: enum AccessType { atPublic, atPrivate, atProtected ...
MasterZean/z2c-compiler-cpp
z2c/Builder.h
<filename>z2c/Builder.h #ifndef __BUILDER_HPP__ #define __BUILDER_HPP__ #include <Core/Core.h> #include "BuildMethod.h" namespace Z2 { using namespace Upp; class Builder { public: Builder(const BuildMethod& abm): bm(abm) { } void ZCompilerPath(const String& azPath) { zPath = azPath; } void TargetRoot(c...
MasterZean/z2c-compiler-cpp
z2clib/IR.h
<reponame>MasterZean/z2c-compiler-cpp #ifndef _z2clib_IR_h_ #define _z2clib_IR_h_ #include "Node.h" template<class Tt> class NodePool { private: Vector<Tt*> nodes; int count; public: NodePool() { count = 0; } ~NodePool() { for (int i = 0; i < nodes.GetCount(); i++) delete nodes[i]; } inline Tt* Get()...
MasterZean/z2c-compiler-cpp
z2c/IRGenerator.h
#ifndef _z2c2_IRGenerator_h_ #define _z2c2_IRGenerator_h_ #include <Core/Core.h> #include "Node.h" namespace Z2 { using namespace Upp; class Assembly; template<class Tt> class NodePool { private: Vector<Tt*> nodes; int count; public: NodePool() { count = 0; } ~NodePool() { for (int i = 0; i < nodes....
MasterZean/z2c-compiler-cpp
z2clib/ErrorReporter.h
#ifndef _z2clibex_ErrorReporter_h_ #define _z2clibex_ErrorReporter_h_ #include <z2clib/Source.h> class Overload; class Constant; class Def; class Node; class ObjectType; class Assembly; class ErrorReporter { public: static void CantAccess(const ZSource& src, const Point& p, Overload& over, const Strin...
MasterZean/z2c-compiler-cpp
zide/build_info.h
#define bmYEAR 2015 #define bmMONTH 3 #define bmDAY 4 #define bmHOUR 17 #define bmMINUTE 34 #define bmSECOND 11 #define bmTIME Time(2015, 3, 4, 17, 34, 11) #define bmMACHINE "RAUL-THINK" #define bmUSER "Raul"
MasterZean/z2c-compiler-cpp
z2c/NodeRunner.h
<filename>z2c/NodeRunner.h #ifndef _z2c_NodeRunner_h_ #define _z2c_NodeRunner_h_ #include <Core/Core.h> #include "Node.h" #include "Assembly.h" #include "IRGenerator.h" namespace Z2 { using namespace Upp; class NodeRunner { public: NodeRunner(Assembly& aAss, Stream& ss): ass(aAss), stream(ss), irg(aAss) { irg....
MasterZean/z2c-compiler-cpp
z2c/tables.h
<reponame>MasterZean/z2c-compiler-cpp<gh_stars>0 #ifndef _z2c_tables_h_ #define _z2c_tables_h_ #include <Core/Core.h> namespace Z2 { using namespace Upp; extern int TabCanAssign[][14]; extern int TabArithmetic[][14]; extern int TabShift[][14]; extern int TabRel[][14]; extern char tab1[]; extern char tab2[]; exter...
MasterZean/z2c-compiler-cpp
z2c/StopWatch.h
<reponame>MasterZean/z2c-compiler-cpp #ifndef __TIMESTOP_HPP__ #define __TIMESTOP_HPP__ #include <Core/Core.h> namespace Z2 { using namespace Upp; #ifdef PLATFORM_WIN32 class StopWatch : Moveable<StopWatch> { LARGE_INTEGER start; LARGE_INTEGER stop; LARGE_INTEGER freq; public: double Elapsed() { QueryPerfo...
MasterZean/z2c-compiler-cpp
z2clib/source.h
<gh_stars>0 #ifndef _z2clib_ZFile_h_ #define _z2clib_ZFile_h_ #include <Core/Core.h> using namespace Upp; class ZSource; class ZParser; class ZClass; class ZClassAlias: Moveable<ZClassAlias> { public: CParser::Pos Context; ZClass* Class = nullptr; String Name; String Namespace; Point Location;...
MasterZean/z2c-compiler-cpp
z2c/ZParser.h
#ifndef _z2c2_ZParser_h_ #define _z2c2_ZParser_h_ #include <Core/Core.h> namespace Z2 { using namespace Upp; class ZParser: public CParser { public: enum NumberType { ntInvalid, ntSmall, ntShort, ntInt, ntLong, ntByte, ntWord, ntDWord, ntQWord, ntFloat, ntDouble, ntPtrSize, }; String Pa...
MasterZean/z2c-compiler-cpp
z2clib/OverloadResolver.h
<gh_stars>0 #ifndef _z2clib_OverloadResolver_h_ #define _z2clib_OverloadResolver_h_ #include "Assembly.h" class GatherInfo { public: Overload* Rez = nullptr; int Count = 0; }; class OverloadResolver { public: OverloadResolver(Assembly& a): ass(a) { } Overload* Resolve(Def& def, Vector<Node*>& params, ZClass* ...
MasterZean/z2c-compiler-cpp
z2c/Compiler.h
#ifndef _z2c2_Compiler_h_ #define _z2c2_Compiler_h_ #include <Core/Core.h> #include "ZParser.h" #include "Node.h" #include "IRGenerator.h" #include "Assembly.h" #include "CppNodeWalker.h" #include "ErrorReporter.h" #include "Scanner.h" namespace Z2 { using namespace Upp; class Compiler { public: enum PlatformTyp...
MasterZean/z2c-compiler-cpp
z2clib/ZParser.h
#ifndef _z2c_ZParser_h_ #define _z2c_ZParser_h_ #include <Core/Core.h> using namespace Upp; class ZSource; class ZClass; class Overload; class Def; class Context { public: ZClass* C1 = nullptr; ZClass* C2 = nullptr; Point P; Overload* O = nullptr; Def* D = nullptr; ZSource* S = nullptr; ...
MasterZean/z2c-compiler-cpp
z2c/Scanner.h
#ifndef _z2c_Scanner_h_ #define _z2c_Scanner_h_ #include <Core/Core.h> #include "Assembly.h" #include "ErrorReporter.h" #include "tables.h" namespace Z2 { using namespace Upp; class ZPackage; class ZFile: Moveable<ZFile> { public: String Path; Time Modified; String Data; void Serialize(Stream& s) { s % P...
MasterZean/z2c-compiler-cpp
z2clib/BaseExprParser.h
#ifndef _z2clib_BaseExprParser_h_ #define _z2clib_BaseExprParser_h_ #include "ZParser.h" #include "Assembly.h" class Compiler; class AST; class BaseExprParser { public: bool ClassConsts; bool InVarMode; bool InConstMode; bool AllowArrays; BaseExprParser(Compiler& aCmp, ZParser& aSrc, AST& aIrg, Assembly& aAss...
MasterZean/z2c-compiler-cpp
z2clib/BuildMethod.h
#ifndef __BUILD_METHOD_HPP__ #define __BUILD_METHOD_HPP__ #include <Core/Core.h> using namespace Upp; struct BuildMethod: public Moveable<BuildMethod> { enum Type { btMSC, btGCC, btUnknown, }; BuildMethod::Type Type; String Name; String Compiler; String Sdk; WithDeepCopy<Vector<Stri...
notjosh/NTJBilateralCIFilter
NTJBilateralCIFilteriOS/NTJBilateralCIFilteriOS.h
<filename>NTJBilateralCIFilteriOS/NTJBilateralCIFilteriOS.h // // NTJBilateralCIFilteriOS.h // NTJBilateralCIFilter // // Created by <NAME> on 17/10/17. // Copyright © 2017 nojo inc. All rights reserved. // #ifndef NTJBilateralCIFilteriOS_h #define NTJBilateralCIFilteriOS_h #import "NTJBilateralCIFilter.h" #endi...
notjosh/NTJBilateralCIFilter
NTJBilateralCIFilter/NTJBilateralCIFilter.h
<reponame>notjosh/NTJBilateralCIFilter // // NTJBilateralCIFilter.h // NTJBilateralCIFilter // // Created by <NAME> on 6/06/2016. // Copyright © 2016 nojo inc. All rights reserved. // #import <CoreImage/CoreImage.h> @interface NTJBilateralCIFilter : CIFilter @property (strong) CIImage *inputImage; @property (str...
notjosh/NTJBilateralCIFilter
NTJBilateralCIFilterDemo/AppDelegate.h
// // AppDelegate.h // NTJBilateralCIFilterDemo // // Created by <NAME> on 6/06/2016. // Copyright © 2016 nojo inc. All rights reserved. // #import <Cocoa/Cocoa.h> @interface AppDelegate : NSObject <NSApplicationDelegate> @end
notjosh/NTJBilateralCIFilter
NTJBilateralCIFilterDemo/NTJBilateralFilterRunner.h
// // NTJBilateralFilterRunner.h // BilateralFilter // // Created by <NAME> on 1/06/2016. // Copyright © 2016 nojo inc. All rights reserved. // #import <TargetConditionals.h> #if TARGET_OS_OSX #import <Cocoa/Cocoa.h> #define IMAGE NSImage #else #import <UIKit/UIKit.h> #define IMAGE UIImage #endif @interface NTJB...