repo_name stringlengths 5 122 | path stringlengths 3 232 | text stringlengths 6 1.05M |
|---|---|---|
AndersenSemenov/UTBotCpp | server/src/exceptions/CompilationDatabaseException.h | <gh_stars>0
/*
* Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved.
*/
#ifndef UNITTESTBOT_COMPILATIONDATABASEEXCEPTION_H
#define UNITTESTBOT_COMPILATIONDATABASEEXCEPTION_H
#include "BaseException.h"
struct CompilationDatabaseException : public BaseException {
explicit CompilationDatab... |
AndersenSemenov/UTBotCpp | server/src/utils/KleeUtils.h | <reponame>AndersenSemenov/UTBotCpp<filename>server/src/utils/KleeUtils.h
/*
* Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved.
*/
#ifndef CORE_KLEEUTIL_H
#define CORE_KLEEUTIL_H
#include <grpcpp/server_context.h>
#include <string>
#include <string_view>
#include "Tests.h"
namespace Klee... |
hyqLeonardo/dsa | include/dsa/basic/stack.h | <filename>include/dsa/basic/stack.h
#pragma once
/*
* stack header, 'generic'
*/
#include <stdio.h>
#include <stdlib.h>
#define MAXSIZE 50
#define TRUE 1
#define FALSE 0
/*
* struct definition of array based stack
*/
typedef struct ArrayStack {
void *data[MAXSIZE]; /* void pointer can point to any struct type ... |
hyqLeonardo/dsa | src/dsa/basic/link_list.c | #include <stdio.h>
#include "link_list.h"
void init_l(LNode *head) {
head->data = NULL;
head->next = NULL;
}
void print_l(LNode *head) {
while (head->next != NULL) {
head = head->next;
printf("-> %d ", head->data);
}
printf("\n\n");
}
void insert_l(LNode *head, void *a) {
while (head->next != NULL)
hea... |
hyqLeonardo/dsa | src/dsa/graph/graph_algo.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "queue.h"
#include "graph_adj.h"
void graph_bfs(DirGraph *graph, int start, int *result) { /* start is the data in start vertex */
int i = 0; /* next result array index to put in */
int v_num = graph->vertex_num;
int visited[v_num]; /* indexed b... |
hyqLeonardo/dsa | src/dsa/basic/queue.c | <reponame>hyqLeonardo/dsa
#include <stdio.h>
#include "queue.h"
/* array based queue */
void init_queue(ArrayQueue *queue) {
queue->front = 0;
queue->rear = 0;
}
int queue_empty(ArrayQueue *queue) {
if (queue->front == queue->rear)
return TRUE;
else
return FALSE;
}
int enqueue(ArrayQueue *queue, void *a) {
... |
hyqLeonardo/dsa | src/dsa/tree/bst.c | #include <stdio.h>
#include <stdlib.h>
#include "bst.h"
void visit_bst(BiTree node)
{
printf("%d ", node->data);
}
int search_bst(BiTree root, bst_elem_t a, BiTNode **x)
{
while (root) {
if (root->data == a) {
*x = root;
return TRUE;
}
if (root->data >= a)
return search_bst(root->lchild, a, x);
el... |
hyqLeonardo/dsa | include/dsa/tree/bst.h | <gh_stars>0
#pragma once /* make sure this header is included once,
both stack.h and queue.h need this header */
#include <stdio.h>
#define TRUE 1
#define FALSE 0
/* element type of data in node */
typedef int bst_elem_t;
/*
* struct definition of Binary Search Tree node
*/
typedef struct BiTNode {
bst_el... |
hyqLeonardo/dsa | include/dsa/graph/graph_algo.h | <reponame>hyqLeonardo/dsa<gh_stars>0
#include <stdio.h>
#include <stdlib.h>
#include "graph_adj.h"
void graph_bfs(DirGraph *graph, int start, int *result);
void graph_dfs_recur(DirGraph *graph, int start, int *result);
void graph_dfs(DirGraph *graph, int start, int *result); |
hyqLeonardo/dsa | src/dsa/basic/stack.c | #include <stdio.h>
#include "stack.h"
void init_stack(ArrayStack *stack) {
stack->top = -1;
}
int stack_empty(ArrayStack *stack) {
return stack->top == -1 ? TRUE : FALSE;
}
int push(ArrayStack *stack, void *a) {
if (stack->top == MAXSIZE-1) /* stack is full */
return FALSE;
stack->data[++stack->top] = a;
ret... |
hyqLeonardo/dsa | src/dsa/graph/graph_adj.c | <reponame>hyqLeonardo/dsa
#include <stdio.h>
#include "graph_adj.h"
void init_graph(DirGraph *graph) {
graph->vertex_num = 0;
graph->edge_num = 0;
}
void visit_vertex(VertexNode *v, int print) {
if (print) printf("%d ", v->data);
}
void visit_edge(VertexNode *v, EdgeNode *e, int print) {
if (print) printf("(%... |
hyqLeonardo/dsa | src/dsa/test/test_graph_algo.c | #include <stdio.h>
#include <stdlib.h>
#include <CUnit/CUnit.h>
#include <CUnit/Basic.h>
#include "queue.h"
#include "graph_adj.h"
#include "graph_algo.h"
/* helper functions */
static int int_cmp(int *a, int *b, int a_len, int b_len);
static void graph_example1(DirGraph *graph);
static void graph_example2(DirGraph *... |
hyqLeonardo/dsa | include/dsa/graph/graph_adj.h | /*
* graph header, not 'generic'
*/
#pragma once
#include <stdio.h>
#include <stdlib.h>
#define TRUE 1
#define FALSE 0
#define MAX_VERTICES 100 /* max number of vertices graph can hold */
// #define INFOTYPE int
/* there 2 typedef have circular dependency, declare them first before define */
typedef struct Vertex... |
hyqLeonardo/dsa | include/dsa/basic/link_list.h | <reponame>hyqLeonardo/dsa<gh_stars>0
#pragma once
/*
* linked list implementation
*/
#include <stdio.h>
#include <stdlib.h>
/* structure of single linked list with head node */
typedef struct LNode {
void *data;
struct LNode *next;
} LNode;
void init_l(LNode *head);
void print_l(LNode *head);
void insert_l(LNod... |
hyqLeonardo/dsa | src/dsa/tree/tree_algo.c | <reponame>hyqLeonardo/dsa
/*
* traverse algorithms
*/
#include <stdio.h>
#include <stdlib.h>
/** "bst.h" already included from stack.h, so don't include again.
If included, error message : bst.h:6:16: error: redefinition of ‘struct BiTNode’
To make it easier, just add "#pragma once" in front of every header file... |
hyqLeonardo/dsa | src/dsa/test/test_graph_adj.c | #include <stdio.h>
#include <stdlib.h>
#include <CUnit/CUnit.h>
#include <CUnit/Basic.h>
#include "graph_adj.h"
static void graph_init_test(void);
static void graph_build_test(void);
static void graph_init_test(void) {
DirGraph *graph = (DirGraph *)malloc(sizeof(DirGraph));
init_graph(graph);
CU_ASSERT(graph->ve... |
hyqLeonardo/dsa | src/dsa/tree/tbt.c | #include <stdio.h>
#include <stdlib.h>
#include "tbt.h"
void visit_thread(ThreadTree node)
{
printf("%d ", node->data);
}
/* use in-order traverse to construct threads */
void in_thread(ThreadTree p, ThreadTree *prev)
// careful, prev must be a pointer to struct pointer, cause it will be
// modified inside functio... |
hyqLeonardo/dsa | include/dsa/tree/tbt.h | <filename>include/dsa/tree/tbt.h
#pragma once
#include <stdio.h>
/*
* struct definition of Threaded Binary Tree node
*/
typedef struct ThreadNode {
int data; /* data */
struct ThreadNode *lchild; /* left child pointer */
struct ThreadNode *rchild; /* right child pointer */
int ltag, rtag;
} ThreadNode, *Thr... |
hyqLeonardo/dsa | include/dsa/basic/queue.h | <reponame>hyqLeonardo/dsa<gh_stars>0
#pragma once
/*
* queue implementation
*/
#include <stdio.h>
#include <stdlib.h>
#define MAXSIZE 50
#define TRUE 1
#define FALSE 0
/*
* struct definition of array based queue
*/
typedef struct ArrayQueue {
void *data[MAXSIZE];
int front; /* position of head element */
int... |
Pulgit555/Modified_xv-6 | ps.c | #include "types.h"
#include "stat.h"
#include "user.h"
#include "fs.h"
int main(int argc, char *argv[])
{
if(argc!=1)
{
printf(1,"Please enter a valid command\n");
}
else
{
getps();
}
exit();
} |
Pulgit555/Modified_xv-6 | time.c | #include "types.h"
#include "stat.h"
#include "user.h"
#include "fs.h"
int main(int argc, char *argv[])
{
int wtime=0, rtime=0;
int pid = fork();
if(pid<0)
{
printf(1,"Failed to fork {time}\n");
exit();
}
else
{
if(pid==0)
{
if(argc==1)
{
printf(1,"Please enter valid command\n");
exit();
... |
Pulgit555/Modified_xv-6 | setPriority.c | <gh_stars>1-10
#include "types.h"
#include "stat.h"
#include "user.h"
#include "fcntl.h"
#include "param.h"
#include "memlayout.h"
#include "mmu.h"
#include "x86.h"
#include "proc.h"
#include "spinlock.h"
int main(int argc, char *argv[])
{
if(argc!=3)
{
printf(1,"Please enter a valid command\n");
}
else
{
int ... |
Pulgit555/Modified_xv-6 | 1.c | <filename>1.c
#include <stdio.h>
int main()
{
sleep(2);
return 0;
} |
xiujiekeman/LJTCamera | LJTCamera/Classes/LJTCamera.h | //
// LJTCamera.h
// LJTCamera
//
// Created by 休杰克曼 on 2019/8/20.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface LJTCamera : NSObject
- (NSString *)ljttest;
@end
NS_ASSUME_NONNULL_END
|
michaelpantazoglou/cpp_plugin_architecture | src/plugin_addition/addition_plugin.h | #ifndef ADDITION_PLUGIN_H
#define ADDITION_PLUGIN_H
#include "operation.h"
#include <string>
/**
* Implements the addition operation plugin.
*/
class AdditionPlugin : public Operation
{
public:
/**
* Constructor.
*/
AdditionPlugin();
/**
* Destructor.
*/
~AdditionPlugin();
/**
* Execu... |
michaelpantazoglou/cpp_plugin_architecture | src/api/operation.h | <gh_stars>1-10
#ifndef OPERATION_H
#define OPERATION_H
#include <string>
#include "abstract_plugin.h"
/**
* This abstract class defines the interface of the Operation plugin.
*/
class Operation : public AbstractPlugin {
public:
/**
* Constructor.
*/
Operation() {}
/**
* Destructor.
*/
virtu... |
ozgunkaratas/mastersthesis | StreamRecorder/Mag.h | <reponame>ozgunkaratas/mastersthesis
#pragma once
#include "researchmode\ResearchModeApi.h"
#include "Tar.h"
#include "TimeConverter.h"
#include <mutex>
#include <winrt/Windows.Perception.Spatial.h>
#include <winrt/Windows.Perception.Spatial.Preview.h>
class Mag
{
public:
Mag(IResearchModeSensor* pMagSensor, HA... |
ozgunkaratas/mastersthesis | StreamRecorder/AppMain.h | <gh_stars>1-10
#pragma once
#include "Cannon/Common/Timer.h"
#include "Cannon/DrawCall.h"
#include "Cannon/FloatingSlate.h"
#include "Cannon/FloatingText.h"
#include "Cannon/MixedReality.h"
#include "Cannon/TrackedHands.h"
#include "HeTHaTEyeStream.h"
#include "SensorScenario.h"
#include "VideoFrameProcessor.h"
enum... |
ozgunkaratas/mastersthesis | StreamRecorder/SensorScenario.h | <filename>StreamRecorder/SensorScenario.h<gh_stars>1-10
#pragma once
#include "researchmode/ResearchModeApi.h"
#include "RMCameraReader.h"
#include "Accel.h"
#include "Gyro.h"
#include "Mag.h"
class SensorScenario
{
public:
//constr
SensorScenario(const std::vector<ResearchModeSensorType>& kEnabledSensorTypes);
... |
khalladay/VkMaterialSystem | VkMaterialSystem/rendering.h | #pragma once
namespace Rendering
{
void init();
void draw(uint32_t materialId);
} |
khalladay/VkMaterialSystem | VkMaterialSystem/mesh.h | <gh_stars>10-100
#pragma once
#include "stdafx.h"
struct MeshAsset;
struct MeshRenderData;
struct VertexRenderData;
struct Vertex
{
glm::vec3 pos;
glm::vec2 uv;
glm::vec4 col;
};
namespace Mesh
{
void make(Vertex* vertices, uint32_t vertexCount, uint32_t* indices, uint32_t indexCount);
MeshRenderData getRender... |
khalladay/VkMaterialSystem | VkMaterialSystem/material_creation.h | #pragma once
#include "stdafx.h"
#include <vector>
#include <map>
//this is in it's own file so that unless you want to manually
//create a Material Definition, you don't need to know about any of
//the enums / structs required to load a material.
namespace Material
{
enum class ShaderStage : uint8_t
{
VERTEX,
... |
khalladay/VkMaterialSystem | VkMaterialSystem/texture.h | #pragma once
struct TextureRenderData;
struct TextureAsset;
namespace Texture
{
uint32_t make(const char* filepath);
TextureRenderData* getRenderData(uint32_t texId);
void destroy(uint64_t texId);
} |
khalladay/VkMaterialSystem | ShaderPipeline/shaderdata.h | <reponame>khalladay/VkMaterialSystem
#pragma once
#include <vector>
#include <string>
#include <rapidjson\prettywriter.h>
#include <rapidjson\stringbuffer.h>
struct BlockMember
{
std::string name;
uint32_t size;
uint32_t offset;
};
struct InputBlock
{
std::string name;
uint32_t size;
std::vector<BlockMember> me... |
khalladay/VkMaterialSystem | VkMaterialSystem/procedural_geo.h | #pragma once
namespace Mesh
{
void quad(float width = 2.0f, float height = 2.0f, float xOffset = 0.0f, float yOffset = 0.0f);
}; |
khalladay/VkMaterialSystem | VkMaterialSystem/hash.h | #pragma once
uint32_t hash(const char* str);
uint64_t hash64(const char* str); |
khalladay/VkMaterialSystem | ShaderPipeline/filesystem_utils.h | #pragma once
#include <vector>
#include <string>
#include <Windows.h>
#include "string_utils.h"
std::vector<std::string> getFilesInDirectory(std::string folder)
{
using std::vector;
using std::string;
vector<string> names;
string search_path = folder + "/*.*";
WIN32_FIND_DATA fd;
HANDLE hFind = FindFirstFile(s... |
khalladay/VkMaterialSystem | VkMaterialSystem/timing.h | <filename>VkMaterialSystem/timing.h<gh_stars>10-100
#pragma once
#define FPS_DATA_FRAME_HISTORY_SIZE 1000
struct TimeSpan
{
double start;
double end;
};
void startTiming(TimeSpan& span);
double endTiming(TimeSpan& span);
struct FPSData
{
TimeSpan curFrame;
double totalTime;
uint32_t numSamples;
void(*logCal... |
khalladay/VkMaterialSystem | VkMaterialSystem/vkh_stack_allocator.h | #pragma once
#include "vkh_allocator.h"
|
khalladay/VkMaterialSystem | VkMaterialSystem/asset_rdata_types.h | #pragma once
#include "vkh.h"
struct MeshRenderData
{
VkBuffer vBuffer;
VkBuffer iBuffer;
vkh::Allocation vBufferMemory;
vkh::Allocation iBufferMemory;
uint32_t vCount;
uint32_t iCount;
};
struct UniformBlockDef
{
//every odd element is a hashed member name, every even element is that member's offset
uint32_... |
khalladay/VkMaterialSystem | VkMaterialSystem/material.h | <filename>VkMaterialSystem/material.h
#pragma once
#include "stdafx.h"
struct MaterialRenderData;
struct MaterialAsset
{
MaterialRenderData* rData;
};
//right now, all the calls that take a material Id argument do a lookup into
//a map to get the material. This is obviously terrible. You probably want to
//store m... |
khalladay/VkMaterialSystem | VkMaterialSystem/os_support.h | <reponame>khalladay/VkMaterialSystem<gh_stars>10-100
#pragma once
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
struct AppInfo
{
struct HWND__* wndHdl;
struct HINSTANCE__* instance;
int curW;
int curH;
};
extern AppInfo GAppInfo;
struct HWND__* os_makeWindow(struct HINSTANCE__* Instance, const ... |
khalladay/VkMaterialSystem | VkMaterialSystem/stdafx.h | <gh_stars>10-100
#pragma once
//I would love to get rid of glm in the future so
//we don't have to worry about including this here and can
//just forward declare what we need
#define GLM_FORCE_RADIANS
#define GLM_FORECE_DEPTH_ZERO_TO_ONE
#include <glm/glm.hpp>
#include <glm/gtx/transform.hpp>
#include <glm/gtx/quatern... |
khalladay/VkMaterialSystem | ShaderPipeline/refl_info.h | <gh_stars>10-100
#pragma once
struct reflInfo
{
}; |
khalladay/VkMaterialSystem | VkMaterialSystem/vkh.h | <reponame>khalladay/VkMaterialSystem<gh_stars>10-100
#pragma once
#define VK_USE_PLATFORM_WIN32_KHR
#include <vulkan/vulkan.h>
#include <vulkan/vk_sdk_platform.h>
#include <vector>
namespace vkh
{
const uint32_t INVALID_QUEUE_FAMILY_IDX = -1;
struct VkhContext;
enum ECommandPoolType
{
Graphics,
Transfer,
P... |
khalladay/VkMaterialSystem | VkMaterialSystem/os_input.h | #pragma once
//these map to directInput keycodes
//but I didn't want to have to include directInput
//in any file that needed keycodes, so I redefined them
enum KeyCode
{
KEY_ESCAPE = 0x01,
KEY_1 = 0x02,
KEY_2 = 0x03,
KEY_3 = 0x04,
KEY_4 = 0x05,
KEY_5 = 0x06,
KEY_6 = 0x07,
KEY_7 = 0x08,
KEY_8 = 0x09,
KEY_9 =... |
khalladay/VkMaterialSystem | VkMaterialSystem/vkh_initializers.h | <filename>VkMaterialSystem/vkh_initializers.h
#pragma once
#include "vkh.h"
namespace vkh
{
inline VkPipelineShaderStageCreateInfo shaderPipelineStageCreateInfo(VkShaderStageFlagBits stage)
{
VkPipelineShaderStageCreateInfo info = {};
info.sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO;
info.stage... |
khalladay/VkMaterialSystem | VkMaterialSystem/vkh_allocator_pool.h | <filename>VkMaterialSystem/vkh_allocator_pool.h<gh_stars>10-100
#pragma once
struct VkhContext;
//perhaps the only good part of c++17: nested namespaces, woohoo!
namespace vkh::allocators::pool
{
void activate(VkhContext* context);
void deactivate(VkhContext* context);
} |
khalladay/VkMaterialSystem | VkMaterialSystem/vkh_allocator_passthrough.h | #pragma once
#include "stdafx.h"
struct VkhContext;
//perhaps the only good part of c++17: nested namespaces, woohoo!
namespace vkh::allocators::passthrough
{
void activate(VkhContext* context);
void deactivate(VkhContext* context);
} |
khalladay/VkMaterialSystem | ShaderPipeline/config.h | #pragma once
const int GLOBAL_SET = 0;
const int DYNAMIC_SET = 3; |
khalladay/VkMaterialSystem | VkMaterialSystem/array.h | #pragma once
#include <cstdint>
#if _DEBUG
#include <type_traits>
#endif
template <class T>
struct Array
{
T* data;
uint32_t num;
uint32_t capacity;
T &operator[](uint32_t i);
const T &operator[](uint32_t i) const;
//Array &operator=(const Array &other);
};
template <typename T> inline T & Array<T>::operator... |
khalladay/VkMaterialSystem | VkMaterialSystem/shader_viewer_app.h | #pragma once
namespace App
{
void init();
void tick(float deltaTime);
void kill();
} |
khalladay/VkMaterialSystem | ShaderPipeline/string_utils.h | #pragma once
#include <vector>
#include <string>
void splitString(std::string& str, std::vector<std::string>& splitTarget, std::string delim)
{
size_t last = 0;
size_t next = 0;
while ((next = str.find(delim, last)) != std::string::npos)
{
splitTarget.push_back(str.substr(last, next - last));
last = next + 1;... |
Harshana-Rathnayaka/Modified-Advanced-Calculator | Parser.h | <gh_stars>0
#ifndef PARSER_H
#define PARSER_H
#include <string>
class Parser {
public:
typedef double ValueType;
public:
Parser();
virtual ~Parser() = default;
virtual void parse(const std::string &formattedExpression) = 0;
virtual ValueType evalueate() = 0;
ValueType value() const;
void ... |
Harshana-Rathnayaka/Modified-Advanced-Calculator | TreeParser.h | <reponame>Harshana-Rathnayaka/Modified-Advanced-Calculator
#ifndef TREE_PARSER_H
#define TREE_PARSER_H
#include "Parser.h"
#include "SymbolTable.h"
#include "Operand.h"
#include "NumeralFormat.h"
#include <stack>
#include <vector>
#include <cassert>
class TreeParser : public Parser {
public:
TreeParser();
~... |
Harshana-Rathnayaka/Modified-Advanced-Calculator | CalcResult.h | #ifndef CALC_RESULT_H
#define CALC_RESULT_H
#include "CalcError.h"
#include <utility>
#include <string>
#include <deque>
class ResultHandler {
public:
typedef std::pair<std::string, std::string> ResultType;
public:
ResultHandler();
void setCurrentResult(const std::string &expr,
... |
Harshana-Rathnayaka/Modified-Advanced-Calculator | Calculator.h | #ifndef CALCULATOR_H
#define CALCULATOR_H
#include "Lexeme.h"
#include "Scanner.h"
#include "Parser.h"
#include "CalcResult.h"
#include "CalcError.h"
#include "NumeralFormat.h"
class Calculator {
public:
typedef double ValueType;
typedef ResultHandler::ResultType ResultType;
public:
Calculator(Parser *p... |
Harshana-Rathnayaka/Modified-Advanced-Calculator | Operand.h | #ifndef OPERANDS_H
#define OPERANDS_H
#include "ExprNode.h"
class Number : public Operand{
public:
Number(ValueType value);
ExprNode::ValueType evaluate() override;
ExprNode *newNode() const override;
private:
ValueType _value = 0;
};
inline Number::Number(ValueType value) : _value(value) { }
clas... |
Harshana-Rathnayaka/Modified-Advanced-Calculator | TableParser.h | <filename>TableParser.h
#ifndef TABLE_PARSER_H
#define TABLE_PARSER_H
#include "Parser.h"
#include "UnitTable.h"
#include "NumeralFormat.h"
class TableParser : public Parser {
public:
TableParser();
void setUnitTable(UnitTable *unitTable);
void parse(const std::string &expr) override;
ValueType evalu... |
Harshana-Rathnayaka/Modified-Advanced-Calculator | CalcError.h | #ifndef CALC_ERROR_H
#define CALC_ERROR_H
#include "CalcFlags.h"
#include <exception>
#include <stdexcept>
#include <string>
enum ErrorState {
ERROR_FIELD = 0xff, ERROR_NOERROR = 0x10,
ERROR_INNER = 0x02, ERROR_SYMBOL = 0x04,
ERROR_SYNTAX = 0X08,
REPAIR_FIELD = 0xff00, REPAIR_NOREPAIR = 0x0100,
... |
Harshana-Rathnayaka/Modified-Advanced-Calculator | Lexeme.h | #ifndef LEXEME_H
#define LEXEME_H
#include <string>
class Lexeme {
private:
static const std::string numReal;
static const std::string numBinary;
static const std::string numOctal;
static const std::string numDecimal;
static const std::string numHex;
static const std::string opReal;
stat... |
Harshana-Rathnayaka/Modified-Advanced-Calculator | Converter.h | <reponame>Harshana-Rathnayaka/Modified-Advanced-Calculator
#ifndef CONVERTER_H
#define CONVERTER_H
#include "Calculator.h"
#include "UnitTable.h"
#include "TableParser.h"
#include "NumeralFormat.h"
//
class Converter : public Calculator {
public:
Converter();
~Converter();
void setNumeralFormat(NumeralFo... |
Harshana-Rathnayaka/Modified-Advanced-Calculator | Scanner.h | #ifndef SCANNER_H
#define SCANNER_H
#include <string>
#include <regex>
class Scanner {
public:
void scan(const std::string &userExpression);
void setLexeme(const std::string &lexemePattern);
std::string formattedExpression() const;
private:
std::string _formattedExpression;
std::regex _lexeme;
}... |
Harshana-Rathnayaka/Modified-Advanced-Calculator | SymbolTable.h | <reponame>Harshana-Rathnayaka/Modified-Advanced-Calculator
#ifndef SYMBOL_TABLE_H
#define SYMBOL_TABLE_H
#include "ExprNode.h"
#include <unordered_map>
#include <string>
class SymbolTable {
public:
typedef std::unordered_map<std::string, ExprNode *> TableType;
public:
~SymbolTable();
void registerSymbo... |
Harshana-Rathnayaka/Modified-Advanced-Calculator | ExprNode.h | <gh_stars>0
#ifndef EXPR_NODE_H
#define EXPR_NODE_H
#include "CalcFlags.h"
#include <vector>
#include <cassert>
// The enum ExprAttr
enum ExprAttr {
ATTR_EMPTY = 0x0,
// 1~2 bits of an int type number for associativity.
ASSO_FIELD = 0x3,
ASSO_LEFT = 0x1,
ASSO_RIGHT = 0x2,
// 3~20 bits ... |
Harshana-Rathnayaka/Modified-Advanced-Calculator | BitwiseOperator.h | #ifndef BITWISE_OPERATOR_H
#define BITWISE_OPERATOR_H
#include "ExprNode.h"
class BitAnd : public LeftAssoBinaryOperator {
public:
BitAnd();
ExprNode::ValueType evaluate() override;
ExprNode *newNode() const override;
};
inline BitAnd::BitAnd() {
_attrs |= PRIO_BIT_AND;
}
class BitOr : public Left... |
Harshana-Rathnayaka/Modified-Advanced-Calculator | RealOperator.h | <gh_stars>0
#ifndef REAL_OPERATORS_H
#define REAL_OPERATORS_H
#include "ExprNode.h"
class Plus : public LeftAssoBinaryOperator {
public:
Plus();
ExprNode::ValueType evaluate() override;
ExprNode *newNode() const override;
};
inline Plus::Plus() {
_attrs |= PRIO_PLUS;
}
class BMinus : public LeftAs... |
Harshana-Rathnayaka/Modified-Advanced-Calculator | NumeralFormat.h | #ifndef NUMERAL_FORMAT_H
#define NUMERAL_FORMAT_H
#include "CalcFlags.h"
#include <string>
#include <cmath>
enum NumeralFormat {
// For science calculator
NF_ANGLE_FIELD = 0x00f,
NF_DEGREE = 0x001, NF_RADIAN = 0x002, // angle unit
NF_NOTATION_FIELD = 0x0f0,
NF_DEFAULT = 0x010, NF_FIXED = 0x020... |
Harshana-Rathnayaka/Modified-Advanced-Calculator | CalcWidget.h | <filename>CalcWidget.h
#ifndef CALCWIDGET_H
#define CALCWIDGET_H
#include "Interpreter.h"
#include <vector>
#include <string>
#include <regex>
#include <QWidget>
#include <QButtonGroup>
#include <QLabel>
#include <QFont>
namespace Ui {
class CalcWidget;
}
enum AngleUnit { DEG, RAD };
enum CountMethod { DLFLT, FIX,... |
Harshana-Rathnayaka/Modified-Advanced-Calculator | CalcFlags.h | <filename>CalcFlags.h
#ifndef CALC_FLAGS_H
#define CALC_FLAGS_H
#include <type_traits>
// Parts of QFlags' source code.
template <typename Enum>
class CalcFlags {
static_assert((sizeof(Enum) <= sizeof(int)),
"CalcFlags uses an int as storage, so an enum with underlying "
"long... |
Harshana-Rathnayaka/Modified-Advanced-Calculator | UnitTable.h | #ifndef UNIT_TABLE_H
#define UNIT_TABLE_H
#include <unordered_map>
#include <string>
class UnitTable {
public:
void registerUnit(const std::string &id, double weight);
double unitWeight(const std::string &id) const;
private:
std::unordered_map<std::string, double> _unitTable;
};
inline void UnitTable::... |
Harshana-Rathnayaka/Modified-Advanced-Calculator | ExprCalculator.h | #ifndef EXPR_CALCULATOR_H
#define EXPR_CALCULATOR_H
#include "Calculator.h"
#include "SymbolTable.h"
#include "TreeParser.h"
#include "NumeralFormat.h"
class ExprCalculator : public Calculator {
public:
ExprCalculator(std::string (*toString)(double));
~ExprCalculator();
protected:
SymbolTable *_symbolTa... |
Harshana-Rathnayaka/Modified-Advanced-Calculator | Interpreter.h | <gh_stars>0
#ifndef INTERPRETER_H
#define INTERPRETER_H
#include "Calculator.h"
#include "ExprCalculator.h"
#include "Converter.h"
#include <string>
#include <unordered_map>
#include <type_traits>
#include <functional>
enum COMMAND {
// Switch calculator type
// calculator
CMD_SCIENCE, CMD_PROGRAMMER,
... |
casanovg/nb-twi-cmd | src/nb-twi-cmd.h | <gh_stars>0
// ********************************************************
// * Nicebots TWI Command Set *
// * ======================== *
// * This file defines the comm protocol over TWI (I2C) *
// * .................................................. *
// * Au... |
casanovg/nb-twi-cmd | examples/PlatformIO/timonel-twim-ss/include/timonel-twim-ss.h | <reponame>casanovg/nb-twi-cmd<gh_stars>0
/*
timonel-twim-ss.h
==================
Timonel library test header (Single Slave) v1.5
----------------------------------------------------------------------------
2020-07-13 <NAME>
----------------------------------------------------------------------------
*/
#if... |
evrythng/evrythng-marvell-sdk | apps/tests/src/main.c | /*
* Copyright (C) 2008-2015, Marvell International Ltd.
* All Rights Reserved.
*/
/* Sample Application demonstrating the use of Evrythng Cloud
* This application communicates with Evrythng cloud once the device is
* provisioned. Device can be provisioned using the psm CLIs as mentioned below.
* After that, i... |
evrythng/evrythng-marvell-sdk | apps/tests/src/CuTest.c | #include <setjmp.h>
#include <string.h>
#include <stdio.h>
#include "CuTest.h"
/*-------------------------------------------------------------------------*
* CuStr
*-------------------------------------------------------------------------*/
char* CuStrAlloc(int size)
{
char* newStr = (char*) platform_malloc( size... |
evrythng/evrythng-marvell-sdk | lib/platform/marvell/platform_types.h | /*
* (c) Copyright 2012 EVRYTHNG Ltd London / Zurich
* www.evrythng.com
*/
#if !defined(_MQTT_MARVELL_)
#define _MQTT_MARVELL_
#include <stddef.h>
#include <wm_os.h>
#include <wm_mbedtls_helper_api.h>
#include "FreeRTOS.h"
#include "task.h"
typedef struct Timer
{
portTickType xTicksToWait;
xTimeOutType xTimeOu... |
evrythng/evrythng-marvell-sdk | lib/platform/marvell/marvell.c | /*
* (c) Copyright 2012 EVRYTHNG Ltd London / Zurich
* www.evrythng.com
*/
#include "evrythng/platform.h"
#include <stdint.h>
#include <stdarg.h>
#include <wm_net.h>
#include <mbedtls/error.h>
#include <mbedtls/net_sockets.h>
void platform_timer_init(Timer* t)
{
if (!t)
{
platform_printf("%s: in... |
evrythng/evrythng-marvell-sdk | apps/demo/src/main.c | <gh_stars>10-100
/*
* Copyright (C) 2008-2015, Marvell International Ltd.
* All Rights Reserved.
*/
/* Sample Application demonstrating the use of Evrythng Cloud
* This application communicates with Evrythng cloud once the device is
* provisioned. Device can be provisioned using the psm CLIs as mentioned below.... |
evrythng/evrythng-marvell-sdk | apps/tests/src/tests.h | /*
* (c) Copyright 2012 EVRYTHNG Ltd London / Zurich
* www.evrythng.com
*/
#ifndef _EVRYTHNG_TESTS_H
#define _EVRYTHNG_TESTS_H
void RunAllTests();
#endif
|
8bitpsp/handy | psp/psplib/psp.h | /** PSP helper library ***************************************/
/** **/
/** psp.h **/
/** **/
/** This file contains declarations for core PSP management **/
... |
8bitpsp/handy | psp/menu.h | <reponame>8bitpsp/handy
#ifndef _MENU_H
#define _MENU_H
int InitMenu();
void DisplayMenu();
void TrashMenu();
#define DISPLAY_MODE_UNSCALED 0
#define DISPLAY_MODE_FIT_HEIGHT 1
#define DISPLAY_MODE_FILL_SCREEN 2
#define JOY 0x10000
#define SPC 0x20000
#define CODE_MASK(x) (x & 0xffff)
#define SPC_MENU ... |
8bitpsp/handy | C65c02.h | <filename>C65c02.h
//
// Copyright (c) 2004 <NAME>
//
// This software is provided 'as-is', without any express or implied warranty.
// In no event will the authors be held liable for any damages arising from
// the use of this software.
//
// Permission is granted to anyone to use this software for any purpose,... |
8bitpsp/handy | psp/psplib/audio.c | /** PSP helper library ***************************************/
/** **/
/** audio.c **/
/** **/
/** This file contains the audio rendering library. It is ... |
8bitpsp/handy | Memfault.h | //
// Copyright (c) 2004 <NAME>
//
// This software is provided 'as-is', without any express or implied warranty.
// In no event will the authors be held liable for any damages arising from
// the use of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including comm... |
8bitpsp/handy | Mikie.h | //
// Copyright (c) 2004 <NAME>
//
// This software is provided 'as-is', without any express or implied warranty.
// In no event will the authors be held liable for any damages arising from
// the use of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including comm... |
8bitpsp/handy | Color.h | //
// Copyright (c) 2004 <NAME>
//
// This software is provided 'as-is', without any express or implied warranty.
// In no event will the authors be held liable for any damages arising from
// the use of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including comm... |
8bitpsp/handy | lynxrender.h | //
// Copyright (c) 2004 <NAME>
//
// This software is provided 'as-is', without any express or implied warranty.
// In no event will the authors be held liable for any damages arising from
// the use of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including comm... |
8bitpsp/handy | netobj.h | //
// Copyright (c) 2004 <NAME>
//
// This software is provided 'as-is', without any express or implied warranty.
// In no event will the authors be held liable for any damages arising from
// the use of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including comm... |
8bitpsp/handy | Ram.h | <filename>Ram.h
//
// Copyright (c) 2004 <NAME>
//
// This software is provided 'as-is', without any express or implied warranty.
// In no event will the authors be held liable for any damages arising from
// the use of this software.
//
// Permission is granted to anyone to use this software for any purpose,
/... |
8bitpsp/handy | psp/psplib/ctrl.h | <filename>psp/psplib/ctrl.h
/** PSP helper library ***************************************/
/** **/
/** ctrl.h **/
/** **/
/** This file contains declarati... |
8bitpsp/handy | psp/psplib/ui.h | /** PSP helper library ***************************************/
/** **/
/** ui.h **/
/** **/
/** This file contains declarations for a simple GUI **/
... |
8bitpsp/handy | psp/emulate.h | #ifndef _EMULATE_H
#define _EMULATE_H
int InitEmulation();
void RunEmulation();
void TrashEmulation();
#define MAPPABLE_BUTTONS 18
struct ButtonConfig
{
unsigned int ButtonMap[MAPPABLE_BUTTONS];
};
#endif
|
8bitpsp/handy | Machine.h | //
// Copyright (c) 2004 <NAME>
//
// This software is provided 'as-is', without any express or implied warranty.
// In no event will the authors be held liable for any damages arising from
// the use of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including comm... |
8bitpsp/handy | lynxdef.h | <filename>lynxdef.h
//
// Copyright (c) 2004 <NAME>
//
// This software is provided 'as-is', without any express or implied warranty.
// In no event will the authors be held liable for any damages arising from
// the use of this software.
//
// Permission is granted to anyone to use this software for any purpose... |
8bitpsp/handy | psp/psplib/psp.c | /** PSP helper library ***************************************/
/** **/
/** psp.c **/
/** **/
/** This file contains core PSP management routines, such **/
... |
8bitpsp/handy | psp/psplib/font.h | /** PSP helper library ***************************************/
/** **/
/** font.h **/
/** **/
/** This file contains declarations for font manipulation **/
... |
8bitpsp/handy | psp/psplib/fileio.c | /** PSP helper library ***************************************/
/** **/
/** fileio.c **/
/** **/
/** This file contains file management routines **/
... |
8bitpsp/handy | Cart.h | //
// Copyright (c) 2004 <NAME>
//
// This software is provided 'as-is', without any express or implied warranty.
// In no event will the authors be held liable for any damages arising from
// the use of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including comm... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.