repo_name stringlengths 5 122 | path stringlengths 3 232 | text stringlengths 6 1.05M |
|---|---|---|
Joursoir/umt | UefiMonitorTest/MainMenu.h | #ifndef UMT_MAIN_MENU_H
#define UMT_MAIN_MENU_H
#include "UefiMonitorTest.h"
VOID
MainMenuInit (
IN UMT_CONTEXT *Ctx
);
VOID
MainMenuDoit (
IN UMT_CONTEXT *Ctx
);
VOID
MainMenuTip (
IN UMT_CONTEXT *Ctx
);
VOID
MainMenuChangeParam (
IN UMT_CONTEXT *Ctx,
IN INT8 ParamStep
);
VOID
MainMenu... |
mmaikel/DEFFEM_Postprocessor | deffem_postprocessor/headers/ModelContext.h | <filename>deffem_postprocessor/headers/ModelContext.h
#pragma once
#ifndef MODEL_CONTEXT_H
#define MODEL_CONTEXT_H
#include <string>
#include "ModelInfo.h"
#include "CustomObject.h"
namespace deffem
{
class ModelContext
{
public:
CustomObject* model;
ModelInfo info;
std::string fil... |
mmaikel/DEFFEM_Postprocessor | deffem_postprocessor/headers/Camera.h | <reponame>mmaikel/DEFFEM_Postprocessor
#pragma once
#ifndef CEMERA_H
#define CAMERA_H
#include <glad/glad.h>
#include <glm/glm/glm.hpp>
namespace deffem
{
class Camera
{
public:
GLfloat theta;
GLfloat phi;
GLfloat radius;
GLfloat fov;
glm::fvec2 offset;
g... |
mmaikel/DEFFEM_Postprocessor | deffem_postprocessor/headers/Shader.h | #ifndef SHADER_H
#define SHADER_H
#include <glad/glad.h> // include glad to get all the required OpenGL headers
#include <string>
#include <fstream>
#include <sstream>
#include <iostream>
#include <glm/glm/mat4x4.hpp>
namespace deffem
{
class Shader
{
public:
// the program ID
unsigned in... |
mmaikel/DEFFEM_Postprocessor | deffem_postprocessor/headers/Line.h | #ifndef LINE_H
#define LINE_H
#include "Object.h"
#include "Color.h"
namespace deffem
{
class Line : Object
{
public:
Line(glm::vec3 p1, glm::vec3 p2, Color color);
void draw() override;
void draw(Shader* shader) override;
void draw(Shader* shader) const;
... |
mmaikel/DEFFEM_Postprocessor | deffem_postprocessor/headers/ModelInfo.h | <reponame>mmaikel/DEFFEM_Postprocessor<filename>deffem_postprocessor/headers/ModelInfo.h
#pragma once
#ifndef MODELINFO_H
#define MODELINFO_H
#include "MinMax.h"
namespace deffem
{
class ModelInfo
{
public:
unsigned long nodeCount;
unsigned long elementCount;
MinMax minMaxValue;
... |
mmaikel/DEFFEM_Postprocessor | deffem_postprocessor/headers/Color.h | #pragma once
#ifndef COLOR_H
#define COLOR_H
#include <glad/glad.h>
#include <string>
#include <map>
namespace deffem
{
class Color
{
public:
Color();
Color(GLfloat red, GLfloat green, GLfloat blue);
Color(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
Color(... |
mmaikel/DEFFEM_Postprocessor | deffem_postprocessor/resources/ApplicationSettings.h | <reponame>mmaikel/DEFFEM_Postprocessor
#pragma once
#ifndef APPLICATION_SETTINGS_H
#define APPLICATION_SETTINGS_H
#include "../headers/Color.h"
#include <map>
#include <glm/glm/detail/type_vec2.hpp>
class
enum ThemeVariant
{
light = 0,
dark = 1
};
class ApplicationSettings
{
public:
glm::vec2 screenRes... |
mmaikel/DEFFEM_Postprocessor | deffem_postprocessor/headers/Letter.h | #pragma once
#ifndef LETTER_H
#define LETTER_H
#include <glad/glad.h>
#include <glm/glm/vec2.hpp>
namespace deffem
{
struct Letter
{
GLuint TextureID; // ID handle of the glyph texture
glm::ivec2 Size; // Size of glyph
glm::ivec2 Bearing; // Offset from baseline to left/top of glyph
... |
mmaikel/DEFFEM_Postprocessor | deffem_postprocessor/headers/MinMax.h | <filename>deffem_postprocessor/headers/MinMax.h
#pragma once
#ifndef MIN_MAX_H
#define MIN_MAX_H
namespace deffem
{
class MinMax
{
public:
float min;
float max;
MinMax(float min, float max)
{
this->min = min;
this->max = max;
}
Min... |
mmaikel/DEFFEM_Postprocessor | deffem_postprocessor/headers/GridPlane.h | #pragma once
#ifndef MESH_PLANE_H
#define MESH_PLANE_H
#include "Color.h"
#include "Shader.h"
#include <glm/glm/glm.hpp>
#include "Line.h"
#include <list>
namespace deffem
{
class GridPlane
{
public:
bool showGrid;
GridPlane();
GridPlane(glm::fvec2 size, int grids, const Color& ... |
mmaikel/DEFFEM_Postprocessor | deffem_postprocessor/headers/ApplicationSettings.h | #pragma once
#ifndef APPLICATION_SETTINGS_H
#define APPLICATION_SETTINGS_H
#include "../headers/Color.h"
#include <map>
#include <glm/glm/glm.hpp>
namespace deffem
{
class ThemeVariant
{
public:
enum ThemeVariants
{
light = 0,
dark = 1
};
static Th... |
mmaikel/DEFFEM_Postprocessor | deffem_postprocessor/headers/Object.h | #ifndef OBJECT_H
#define OBJECT_H
#include "Shader.h"
#include <GL/GL.h>
namespace deffem
{
class Object
{
public:
virtual ~Object() = default;
virtual void draw() = 0;
virtual void draw(Shader* shader) = 0;
virtual void destroy() = 0;
protected:
GLuint VAO... |
mmaikel/DEFFEM_Postprocessor | deffem_postprocessor/headers/FileParser.h | #pragma once
#ifndef FILE_PARSER_H
#define FILE_PARSER_H
#include <vector>
#include "ModelInfo.h"
#include <map>
#include <list>
#include <glad/glad.h>
namespace deffem
{
class FileParser
{
public:
static ModelInfo readSections(const std::string& filename, std::vector<GLfloat>& verticesAndColors,
... |
mmaikel/DEFFEM_Postprocessor | deffem_postprocessor/headers/State.h | #pragma once
#ifndef STATE_H
#define STATE_H
#include <glad/glad.h>
#include <glm/glm/glm.hpp>
#include "Camera.h"
#include "Typer.h"
#include "Heatmap.h"
#include "ModelContext.h"
#include "ApplicationSettings.h"
#include "AnimationState.h"
#include "MouseState.h"
namespace deffem {
class State
{
publi... |
mmaikel/DEFFEM_Postprocessor | deffem_postprocessor/headers/MouseState.h | <filename>deffem_postprocessor/headers/MouseState.h
#pragma once
#ifndef MOUSE_STATE_H
#define MOUSE_STATE_H
#include <glm/glm/glm.hpp>
namespace deffem
{
class MouseState
{
public:
glm::fvec2 position;
bool isPressed;
bool isPressedWithShift;
bool isPressedWithControl;
... |
mmaikel/DEFFEM_Postprocessor | deffem_postprocessor/headers/Heatmap.h | <filename>deffem_postprocessor/headers/Heatmap.h
#pragma once
#ifndef HEATMAP_H
#define HEATMAP_H
#include <glm/glm/detail/type_vec3.hpp>
#include "Typer.h"
#include "ModelInfo.h"
#include <list>
#include "CustomObject.h"
#include "Rectangle.h"
namespace deffem
{
class Heatmap
{
public:
Heatmap(gl... |
mmaikel/DEFFEM_Postprocessor | deffem_postprocessor/headers/Typer.h | #pragma once
#ifndef TYPER_H
#define TYPER_H
#include <glad/glad.h>
#include "Shader.h"
#include <string>
#include "Color.h"
#include <map>
#include "Letter.h"
namespace deffem
{
class Typer
{
public:
Typer();
~Typer();
void renderText(Shader* s, std::string text, glm::fvec2 po... |
mmaikel/DEFFEM_Postprocessor | deffem_postprocessor/deffem.h | <reponame>mmaikel/DEFFEM_Postprocessor<gh_stars>0
#pragma once
#ifndef
#include ""
#endif
|
mmaikel/DEFFEM_Postprocessor | deffem_postprocessor/headers/CustomObject.h | <filename>deffem_postprocessor/headers/CustomObject.h
#pragma once
#ifndef CUSTOM_OBJECT_H
#define CUSTOM_OBJECT_H
#include "Object.h"
#include <vector>
namespace deffem
{
class CustomObject final : protected Object
{
public:
CustomObject(std::vector<GLfloat> vertices, std::vector<GLuint> indices... |
mmaikel/DEFFEM_Postprocessor | deffem_postprocessor/headers/Rectangle.h | #pragma once
#ifndef RECTANGLE_H
#define RECTANGLE_H
#include "Object.h"
#include "Color.h"
namespace deffem
{
class Rectangle : protected Object
{
public:
Rectangle(GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height);
Rectangle(GLfloat x, GLfloat y, GLfloat z, GLfloat width,... |
mmaikel/DEFFEM_Postprocessor | deffem_postprocessor/headers/Button.h | <gh_stars>0
#pragma once
#ifndef BUTTON_H
#define BUTTON_H
#include "Rectangle.h"
#include "Shader.h"
namespace deffem {
class Button : protected Rectangle
{
public:
Button(glm::fvec2 pos, glm::fvec2 size, std::string texturePath);
void draw(Shader *shader) override;
void draw()... |
mmaikel/DEFFEM_Postprocessor | deffem_postprocessor/headers/AnimationState.h | <reponame>mmaikel/DEFFEM_Postprocessor
#pragma once
#ifndef ANIMATION_STATE_H
#define ANIMATION_STATE_H
#include <chrono>
namespace deffem
{
class AnimationState
{
public:
bool play;
bool isFinished;
bool repeat;
std::chrono::milliseconds nextDeadline;
std::chrono::... |
gaozm0509/ZMBadge | ZMBadge/UIView+ZMBadge.h | <reponame>gaozm0509/ZMBadge
//
// UIView+ZMBadge.h
// ZMBadge
//
// Created by gzm on 17/1/3.
// Copyright © 2017年 gzm. All rights reserved.
//
#import <UIKit/UIKit.h>
typedef NS_ENUM(NSInteger,ZMBadgeStyle) {
ZMBadgeStyleDot = 0,//很小的小红点
ZMBadgeStyleNumber,//包含数字的小红点
};
@interface UIView (ZMBadge)
/**... |
gaozm0509/ZMBadge | ZMBadge/ViewController.h | //
// ViewController.h
// ZMBadge
//
// Created by gzm on 17/1/3.
// Copyright © 2017年 gzm. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController
@end
|
gaozm0509/ZMBadge | ZMBadge/AppDelegate.h | <reponame>gaozm0509/ZMBadge<gh_stars>0
//
// AppDelegate.h
// ZMBadge
//
// Created by gzm on 17/1/3.
// Copyright © 2017年 gzm. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@end
|
pascal-brand-st-dev/optee_client | libteec/src/tee_client_api.c | /*
* Copyright (c) 2014, STMicroelectronics International N.V.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
... |
tobykurien/DroidOrb | Arduino/droid_orb/droid_orb.h | /*
* DroidOrb Android accessory
*
* This is free software. You can redistribute it and/or modify it under
* the terms of Creative Commons Attribution 3.0 United States License.
* To view a copy of this license, visit http://creativecommons.org/licenses/by/3.0/us/
* or send a letter to Creative Commons, 17... |
FKasy/cgv | cgv/render/placeable.h | <reponame>FKasy/cgv
#pragma once
#include <cgv/render/render_types_namespace.h>
using namespace cgv::render::render_types_ns;
#include "lib_begin.h"
namespace cgv {
namespace render {
class CGV_API placeable {
private:
vec3 position;
vec3 pitch_yaw_roll;
vec3 scale;
mat4 model_matrix;
void calculate... |
FKasy/cgv | cgv/type/info/type_access.h | #pragma once
#include <string>
#include <cgv/type/info/type_id.h>
#include <cgv/type/standard_types.h>
namespace cgv {
namespace type {
namespace info {
/// access value whos type is given by a TypeId
template <typename T>
struct type_access
{
/// return stored value converted into type T
static ... |
FKasy/cgv | plugins/openvr_driver/openvr_kit.h | #pragma once
#include <vr/gl_vr_display.h>
#include "openvr.h"
#include "openvr_camera.h"
#include <vector>
#include "lib_begin.h"
namespace vr {
/**@name vr device management */
//@{
/// information provided per vr device
class CGV_API openvr_kit : public gl_vr_display
{
protected:
vr::IVRSystem* get_hmd()... |
FKasy/cgv | cgv/render/drawable_and_placeable.h | #pragma once
#include <cgv/render/drawable.h>
#include <cgv/render/placeable.h>
#include "lib_begin.h"
namespace cgv {
namespace render {
// simple wrapper for drawable and placable in one
class CGV_API drawable_and_placeable : public drawable, public placeable {};
} // namespace render
} // namespace cgv
#include... |
FKasy/cgv | plugins/openvr_driver/openvr_camera.h | #pragma once
#include <memory>
#include <vector>
#include <chrono>
#include <vr/vr_camera.h>
#include "openvr.h"
#include "lib_begin.h"
///@ingroup VR
///@{
/**@file
defines camera class for camera provided by openvr_kit
*/
///
namespace vr {
class CGV_API openvr_camera : public vr_camera {
public:
openvr_cam... |
FKasy/cgv | libs/vr/vr_camera.h | <reponame>FKasy/cgv
#pragma once
#include <vector>
#include <chrono>
#include "lib_begin.h"
///@ingroup VR
///@{
/**@file
defines camera class for camera provided by vr_kit
*/
///
namespace vr {
/// different status values for a camera
enum class camera_state : uint8_t {
UNINITIALIZED,
INITIALIZED,
STARTED,... |
FKasy/cgv | cgv/data/rectangle.h | <filename>cgv/data/rectangle.h
#pragma once
#include <array>
#include <cgv/math/fvec.h>
#include <cgv/render/render_types_namespace.h>
using namespace cgv::render::render_types_ns;
namespace cgv {
namespace data {
// no class for now, just typedef
// do not inherit from stl containers (no virtual destructors)
using... |
FKasy/cgv | libs/cgv_gl/rectangle_renderer.h | #pragma once
#include <memory>
#include <cgv/data/rectangle.h>
#include <cgv/render/attribute_array_binding.h>
#include <cgv/render/drawable_and_placeable.h>
#include <cgv/render/render_types_namespace.h>
#include <cgv/render/shader_program.h>
#include <cgv/render/vertex_buffer.h>
#include <cgv_gl/gl/gl.h>
using na... |
FKasy/cgv | plugins/crg_vr_view/lib_begin.h | <filename>plugins/crg_vr_view/lib_begin.h
#if defined(CRG_VR_VIEW_STATIC)
# define CGV_FORCE_STATIC_LIB
#endif
#ifdef CRG_VR_VIEW_EXPORTS
# define CGV_EXPORTS
#endif
#include <cgv/config/lib_begin.h>
|
Darksecond/libcore | include/core/containers/fixed_stack.h | #pragma once
#include <core/compiler.h>
#include <cassert>
namespace core
{
/**
* stack container (FILO) with a fixed (compile-time) size.
*/
template <typename T, size_t N>
class fixed_stack
{
//TODO Implement these as memcpy
CORE_NO_COPY(fixed_stack);
CORE_NO_MOVE(... |
Darksecond/libcore | include/core/memory/stack_area.h | #pragma once
#include <core/compiler.h>
#include <core/types.h>
namespace core
{
template <int Size>
class stack_area
{
CORE_NO_COPY(stack_area);
CORE_NO_MOVE(stack_area);
uint8_t buffer[Size];
public:
inline void* start() const { return (void*)buffer; }
inlin... |
Darksecond/libcore | include/core/hashing/fnv1a.h | #pragma once
#include <core/types.h>
#include <core/platform.h>
namespace core
{
#ifdef CORE_PLATFORM_WIN
//code from: http://seanmiddleditch.com/journal/2011/05/compile-time-string-hashing-in-c0x/
// FNV-1a constants
static const uint64_t fnv1a_basis = 14695981039346656037ULL;
static const uint64_t f... |
Darksecond/libcore | include/core/memory.h | #pragma once
#include <core/memory/new_delete.h>
#include <core/memory/arena.h>
#include <core/memory/heap_area.h>
#include <core/memory/linear_allocator.h>
//EXAMPLES:
//STL::FallbackAllocator& someArena = fallbackAllocator();
//int* a = CORE_NEW(someArena, int, 3);
//CORE_DELETE(someArena, a);
//int* b = CORE_NEW_A... |
Darksecond/libcore | include/core/time/hf_timer.h | #pragma once
#include <core/types.h>
#include <core/platform.h>
namespace core
{
/**
* High frequency timer.
* Usually has < millisecond resolution (depending on platform)
*/
class hf_timer
{
public:
/**
* (re)set the timer.
*/
void reset();
... |
Darksecond/libcore | include/core/memory/arena.h | #pragma once
#include <core/types.h>
#include <core/logging/log.h> // For source_info
namespace core
{
class arena
{
public:
virtual ~arena() {}
virtual void* allocate(const size_t size, const size_t align, const size_t alignment_offset, const source_info& info) = 0;
virtual void f... |
Darksecond/libcore | include/core/logging/console_logger.h | <reponame>Darksecond/libcore
#pragma once
#include <core/logging/log.h>
namespace core
{
class console_logger : public logger
{
public:
//replace format and args with fixed_string?
virtual void log(const core::source_info& source_info, int level, const char* channel, const char* fo... |
Darksecond/libcore | include/core/string/string_hash.h | #pragma once
#include <core/types.h>
#include <core/hashing/fnv1a.h>
namespace core
{
class string_hash
{
public:
typedef uint64_t Type;
constexpr string_hash(const char* str) : hash(hash_fnv1a(str))
{
}
explicit constexpr string_hash(Type h) : has... |
Darksecond/libcore | include/core/memory/heap_area.h | <filename>include/core/memory/heap_area.h
#pragma once
#include <core/compiler.h>
#include <core/types.h>
namespace core
{
class heap_area
{
CORE_NO_COPY(heap_area);
void* _start;
size_t _size;
public:
explicit heap_area(size_t s);
~heap_area();
heap_area(... |
Darksecond/libcore | include/core/filesystem/fs_file.h | <filename>include/core/filesystem/fs_file.h<gh_stars>0
#pragma once
#include <core/filesystem/file.h>
#include <fstream>
namespace core
{
class fs_file : public file
{
std::fstream _stream;
public:
fs_file(const char* path, int mode, archive* owner);
virtual size_t read(v... |
Darksecond/libcore | include/core/filesystem/root.h | #pragma once
#include <core/types.h>
#include <core/containers/dynamic_array.h>
namespace core
{
class archive;
class arena;
class file;
class root
{
dynamic_array<archive*> _mounts;
public:
root(arena* arena, int capacity);
void mount(archive*);
v... |
Darksecond/libcore | include/core/memory/linear_allocator.h | <reponame>Darksecond/libcore<filename>include/core/memory/linear_allocator.h
#pragma once
#include <core/types.h>
#include <core/logging/log.h>
namespace core
{
class linear_allocator
{
uint8_t* _start;
uint8_t* _end;
uint8_t* _current;
public:
linear_allocator(const void* ... |
Darksecond/libcore | include/core/filesystem/archive.h | <gh_stars>0
#pragma once
namespace core
{
class file;
class archive
{
public:
/**
* Open a file with path and mode if it exists.
* Returns nullptr if the file does not exist.
*/
virtual file* open(const char* path, int mode) = 0;
/**
... |
Darksecond/libcore | include/core/threading/condition_variable.h | #pragma once
#include <pthread.h>
namespace core
{
class mutex;
class condition_variable
{
public:
condition_variable();
~condition_variable();
/**
* Signal one waiting thread to resume.
*/
void signal_one();
/**
* Si... |
Darksecond/libcore | include/core/containers/fixed_array.h | #pragma once
#include <core/compiler.h>
namespace core
{
template <typename T, size_t N>
class fixed_array
{
CORE_NO_MOVE(fixed_array);
CORE_NO_COPY(fixed_array);
T _array[N];
public:
typedef T* iterator;
typedef const T* const_iterator;
inline... |
Darksecond/libcore | include/core/memory/simple_arena.h | #pragma once
#include <core/memory/arena.h>
#include <cassert>
namespace core
{
//TODO Rename this
template <typename Allocator>
class simple_arena : public arena
{
Allocator* allocator;
public:
simple_arena(Allocator* alloc) : allocator(alloc)
{
assert(alloc !... |
Darksecond/libcore | include/core/filesystem/file.h | <filename>include/core/filesystem/file.h<gh_stars>0
#pragma once
#include <core/types.h>
namespace core
{
class archive;
class file
{
archive* _owner;
public:
file(archive* owner) : _owner(owner)
{
}
virtual ~file()
{
}
... |
Darksecond/libcore | include/core/compiler.h | <reponame>Darksecond/libcore<gh_stars>0
#pragma once
#include <core/platform.h>
#ifdef CORE_PLATFORM_WIN
#define CORE_ALIGNOF(type) __alignof(type)
#define CORE_NO_MOVE_CONSTRUCTOR(Class) Class(Class&&)
#define CORE_NO_MOVE_ASSIGNMENT(Class) Class& operator=(Class&&)
#define CORE_NO_COPY_CONSTRUCTOR(Class) Class(co... |
Darksecond/libcore | include/core/string/fixed_string.h | #pragma once
#include <core/types.h>
#include <cassert>
#include <cstdio>
#include <string.h>
namespace core
{
//TODO add << operator stuff
template<size_t N>
class fixed_string
{
char _string[N];
size_t _length;
public:
inline fixed_string() : _length(0)
{
... |
Darksecond/libcore | include/core/core.h | #pragma once
#define CORE_VERSION_MAJOR 0
#define CORE_VERSION_MINOR 1
|
Darksecond/libcore | include/core/util/pointer_align.h | <filename>include/core/util/pointer_align.h
#pragma once
#include <core/types.h>
namespace core
{
inline void* align_up(void* p, size_t align)
{
uintptr_t pi = uintptr_t(p);
const size_t mod = pi % align;
if (mod)
pi += (align - mod);
return (void*)pi;
}
inline void* align_down(void* p, size_t align)... |
Darksecond/libcore | include/core/containers/dynamic_stack.h | <reponame>Darksecond/libcore<filename>include/core/containers/dynamic_stack.h<gh_stars>0
#pragma once
#include <core/compiler.h>
#include <core/memory/arena.h>
#include <core/memory/new_delete.h>
#include <cassert>
namespace core
{
template <typename T>
class dynamic_stack
{
//TODO Implement thes... |
Darksecond/libcore | include/core/threading/thread.h | <reponame>Darksecond/libcore
#pragma once
#include <core/compiler.h>
#include <pthread.h>
namespace core
{
/*
* This is a wrapper around native OS threads.
* The API is abstracted so it will work on multiple platforms.
*/
class thread
{
CORE_NO_MOVE(thread);
CORE_NO_COPY(thr... |
Darksecond/libcore | include/core/memory/system_allocator.h | <gh_stars>0
#pragma once
#include <core/types.h>
#include <core/logging/log.h>
namespace core
{
class system_allocator
{
public:
//address+offset should be aligned, NOT address itself
void* allocate(size_t size, size_t align, size_t offset);
void free(void* object);
};
};
|
Darksecond/libcore | include/core/logging/log.h | #pragma once
#include <cstdarg>
#define CORE_SOURCEINFO core::source_info(__FILE__, __FUNCTION__, __LINE__)
#define CORE_LOG(level, channel, format, ...) core::log::log(CORE_SOURCEINFO, level, channel, format, ##__VA_ARGS__)
#define CORE_LDEBUG(channel, format, ...) core::log::log(CORE_SOURCEINFO, 4, channel, format... |
Darksecond/libcore | include/core/filesystem/modes.h | <reponame>Darksecond/libcore
#pragma once
namespace core
{
namespace fs_modes
{
static const int in = 1;
static const int out = 2;
static const int append = 4;
};
};
|
Darksecond/libcore | include/core/types.h | #pragma once
#include <cstddef>
#include <stdint.h>
namespace core
{
template<class T>
struct type_and_count
{
typedef T Type;
};
template<class T, size_t N>
struct type_and_count<T[N]>
{
typedef T Type;
static const size_t Count = N;
};
template<b... |
Darksecond/libcore | include/core/threading/thread_local_storage.h | #pragma once
#include <core/compiler.h>
#include <pthread.h>
#include <cassert>
namespace core
{
template <typename T>
class thread_specific_ptr
{
CORE_NO_COPY(thread_specific_ptr);
CORE_NO_MOVE(thread_specific_ptr);
pthread_key_t _key;
public:
thread_specific_ptr()
... |
Darksecond/libcore | include/core/memory/stack_allocator.h | <filename>include/core/memory/stack_allocator.h
#pragma once
#include <core/types.h>
#include <core/logging/log.h>
namespace core
{
class stack_allocator
{
uint8_t* _start;
uint8_t* _end;
uint8_t* _current;
public:
stack_allocator(const void* start, const void* end);
... |
Darksecond/libcore | include/core/util/event.h | <gh_stars>0
#pragma once
#include <core/containers/dynamic_array.h>
namespace core
{
template<typename T>
class event;
template<typename R, typename... Args>
class event<R (Args...)> {
typedef R (*ptr)(void*, Args...);
struct stub
{
void* i... |
Darksecond/libcore | include/core/filesystem/fs_archive.h | <reponame>Darksecond/libcore
#pragma once
#include <core/filesystem/archive.h>
namespace core
{
class arena;
class fs_archive : public archive
{
arena* _arena;
const char* _directory;
public:
/**
* directory is the 'working directory' for this archive.
* ... |
Darksecond/libcore | include/core/threading/mutex.h | #pragma once
#include <core/compiler.h>
#include <pthread.h>
namespace core
{
class mutex
{
public:
mutex();
~mutex();
/**
* Lock the mutex, or wait until it can be locked
*/
void lock();
/**
* Returns true when the lock... |
Darksecond/libcore | include/core/platform.h | #pragma once
/**
* Defines for platform detection.
* WIN64 needs to be before WIN32 as WIN32 is also on with 64-bit windows (backwards compatibility).
*/
#ifdef __APPLE__
#define CORE_PLATFORM apple
#define CORE_PLATFORM_APPLE
#elif __linux__
#define CORE_PLATFORM linux
#define CORE_PLATFORM_LINUX
... |
Darksecond/libcore | include/core/containers/freelist.h | #pragma once
namespace core
{
class freelist
{
freelist* next;
public:
inline freelist();
inline freelist(void* start, void* end, size_t element_size);
inline void* pop();
inline void push(void* ptr);
};
inline freelist::freelist() : next(nullpt... |
Darksecond/libcore | include/core/memory/new_delete.h | <filename>include/core/memory/new_delete.h<gh_stars>0
#pragma once
#include <core/types.h>
#include <core/compiler.h>
#include <core/logging/log.h>
#include <core/util/union_cast.h>
#include <cassert>
#include <type_traits>
#include <new>
#define CORE_NEW(arena, type, ...) (new ((arena).allocate(sizeof(type), CORE_A... |
Darksecond/libcore | include/core/util/union_cast.h | <filename>include/core/util/union_cast.h
#pragma once
namespace core
{
template <typename TO, typename FROM>
inline TO union_cast(FROM from)
{
static_assert(sizeof(TO) == sizeof(FROM), "Can only cast from types of the same size.");
union
{
FROM cast_from;
T... |
Darksecond/libcore | include/core/containers/dynamic_array.h | #pragma once
#include <core/compiler.h>
#include <core/memory/arena.h>
#include <core/memory/new_delete.h>
#include <cassert>
#include <utility>
namespace core
{
/**
* Dynamic array container, like std::vector.
* This will use an allocator to allocate memory and will not grow dynamically.
*/
t... |
AlirezaKamyab/BankProjectCpp | Headers/date.h | <filename>Headers/date.h
#ifndef DATE_H
#define DATE_H
#include <iostream>
#include <stdexcept>
#include <string>
using namespace std;
class DateException : public exception {
public:
DateException() : message{""} {}
explicit DateException(const string& msg) : message{msg} {}
explicit DateException(const c... |
AlirezaKamyab/BankProjectCpp | Headers/loan.h | #ifndef LOAN_H
#define LOAN_H
#include <string>
#include "date.h"
#include "vector"
using namespace std;
class Account;
class Bank;
class LoanException : public exception {
public:
LoanException() : message{""} {}
explicit LoanException(const string& msg) : message{msg} {}
explicit LoanException(const ch... |
AlirezaKamyab/BankProjectCpp | Headers/user.h | <reponame>AlirezaKamyab/BankProjectCpp
#ifndef USER_H
#define USER_H
#include <string>
#include <vector>
using namespace std;
class UserException : public exception {
public:
UserException() : _message{""} {}
explicit UserException(const string& msg) : _message{msg} {}
explicit UserException(const char* m... |
AlirezaKamyab/BankProjectCpp | Headers/employee.h | <reponame>AlirezaKamyab/BankProjectCpp
#ifndef EMPLOYEE_H
#define EMPLOYEE_H
#include "person.h"
#include "client.h"
#include "user.h"
#include <string>
using namespace std;
class Bank;
class Account;
enum class EmployeeType {EMPLOYEE=0, FACILITIES=1, MANAGER=2};
class EmployeeException : public exception {
public:
... |
AlirezaKamyab/BankProjectCpp | Headers/manager.h | #ifndef MANAGER_H
#define MANAGER_H
#include "facilities.h"
#include "exception"
using namespace std;
class ManagerException : public std::exception {
public:
ManagerException() : message{""} {}
explicit ManagerException(const string& msg) : message{msg} {}
explicit ManagerException(const char* msg) : mes... |
AlirezaKamyab/BankProjectCpp | Headers/person.h | #ifndef PERSON_H
#define PERSON_H
#include "date.h"
#include <vector>
using namespace std;
class PersonException : public exception {
public:
PersonException() : message{""} {}
explicit PersonException(const string& msg) : message{msg} {}
explicit PersonException(const char* msg) : message{msg} {}
vir... |
AlirezaKamyab/BankProjectCpp | Headers/client.h | #ifndef CLIENT_H
#define CLIENT_H
#include "user.h"
#include "person.h"
#include "loan.h"
#include <vector>
using namespace std;
class Account;
class Facilities;
class Bank;
class ClientException : public exception {
public:
ClientException() : message{""} {}
explicit ClientException(const string& msg) : mes... |
AlirezaKamyab/BankProjectCpp | Headers/facilities.h | #ifndef FACILITIES_H
#define FACILITIES_H
#include <vector>
#include "employee.h"
#include "request.h"
using namespace std;
class FacilitiesException : public EmployeeException {
public:
FacilitiesException() : EmployeeException{""} {}
explicit FacilitiesException(const string& msg) : EmployeeException{msg} {... |
AlirezaKamyab/BankProjectCpp | Headers/bank.h | <reponame>AlirezaKamyab/BankProjectCpp
#ifndef BANK_H
#define BANK_H
#include <vector>
#include <string>
#include "date.h"
using namespace std;
const string REPORT_FILE_NAME = "Report.txt";
class User;
class Client;
class Employee;
class Facilities;
class Manager;
class Loan;
class Account;
class BankException : pu... |
AlirezaKamyab/BankProjectCpp | Headers/request.h | <reponame>AlirezaKamyab/BankProjectCpp
#ifndef REQUEST_H
#define REQUEST_H
#include "loan.h"
#include "client.h"
#include "account.h"
#include <string>
using namespace std;
class Request{
public:
Request(Client*, Account*, const LoanType& = LoanType::MONTH_24);
Request(const Request&);
Request(Request&&) ... |
AlirezaKamyab/BankProjectCpp | Headers/helperClass.h | #ifndef HELPERCLASS_H
#define HELPERCLASS_H
#include "date.h"
#include "time.h"
#include "ctime"
#include "random"
class Helper {
public:
static Time getCurrentTime();
static Date getCurrentDate();
static string generateRandom(const int&);
};
#endif // HELPERCLASS_H |
AlirezaKamyab/BankProjectCpp | Headers/time.h | <filename>Headers/time.h
#ifndef TIME_H
#define TIME_H
#include <exception>
#include <string>
using namespace std;
class TimeException : public exception {
public:
TimeException() : message{""} {}
explicit TimeException(const string& msg) : message{msg} {}
explicit TimeException(const char* msg) : message... |
AlirezaKamyab/BankProjectCpp | Headers/account.h | #ifndef ACCOUNT_H
#define ACCOUNT_H
#include <string>
#include <vector>
#include "date.h"
using namespace std;
class Loan;
class AccountException : public exception {
public:
AccountException() : message{""} {}
explicit AccountException(const string& msg) : message{msg} {}
explicit AccountException(const... |
TDHolmes/OvenTemp | STM32F446/OvenTemp/Inc/common.h | <reponame>TDHolmes/OvenTemp<filename>STM32F446/OvenTemp/Inc/common.h
/*!
* @file common.h
* @author <NAME>
* @date 2-Sept-2017
* @brief Common functions and structures for all files.
*/
#pragma once
//! Common return type for the entire project
typedef enum {
RET_OK, //!< The ... |
TDHolmes/OvenTemp | STM32F446/OvenTemp/Src/thermocouple.c | /*!
* @file thermocouple.c
* @author <NAME>
* @date 2-Sept-2017
* @brief Interface to the thermocouple temperature sensor
*/
#include <stdbool.h>
#include <stdint.h>
#include "common.h"
#include "hardware.h"
#include "stm32f4xx_hal.h"
#include "stm32f4xx_hal_adc.h"
// #include "stm32f4xx_hal_dma.h"
#d... |
TDHolmes/OvenTemp | STM32F446/OvenTemp/Src/main.c | <filename>STM32F446/OvenTemp/Src/main.c<gh_stars>0
/*!
* @file main.c
* @author <NAME>
* @date 2-Sept-2017
* @brief Main file for the OvenTemp project.
*
* Stupid STM copyright notice at end.
*/
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#include "common.h"
#includ... |
TDHolmes/OvenTemp | STM32F446/OvenTemp/Inc/hardware.h | /*!
* @file hardware.h
* @author <NAME>
* @date 2-Sept-2017
* @brief Hardware specific initialization and such.
*/
#pragma once
#include <stdbool.h>
#include <stdint.h>
#include "stm32f4xx_hal.h"
#include "common.h"
#define NUM_ADC_CHANNELS (2) //!< Thermocouple vout and voltage ref
//! Enum of the... |
TDHolmes/OvenTemp | STM32F446/OvenTemp/Src/stm32f4xx_hal_msp.c | /*!
* @file stm32f4xx_hal_msp.c
* @author <NAME> & STMicroelectronics
* @date 2-Sept-2017
* @brief This file provides code for the MSP Initialization and
de-Initialization codes.
Copyright notice at bottom.
*/
#include "stm32f4xx_hal.h"
// Extern variables and functions
... |
TDHolmes/OvenTemp | STM32F446/OvenTemp/Src/stm32f4xx_it.c | /*!
* @file stm32f4xx_it.c
* @author <NAME> & STMicroelectronics
* @date 2-Sept-2017
* @brief Location where all system & peripheral interrupts are serviced.
Copyright notice at bottom.
*/
#include "stm32f4xx_hal.h"
#include "stm32f4xx.h"
#include "stm32f4xx_it.h"
#include "thermocouple.... |
TDHolmes/OvenTemp | STM32F446/OvenTemp/Src/hardware.c | <reponame>TDHolmes/OvenTemp<filename>STM32F446/OvenTemp/Src/hardware.c
/*!
* @file hardware.c
* @author <NAME>
* @date 2-Sept-2017
* @brief Hardware specific initialization and such.
*/
#include <stdbool.h>
#include "hardware.h"
#include "common.h"
#include "stm32f4xx_hal.h"
#include "stm32f4xx_hal_iwdg.... |
TDHolmes/OvenTemp | STM32F446/OvenTemp/Inc/display.h | /*!
* @file display.h
* @author <NAME>
* @date 2-Sept-2017
* @brief C library adapted from the I2C LED Backpack adafruit code. More info at bottom.
*/
#pragma once
#include <stdint.h>
#include <stdbool.h>
#define DISP_I2C_ADDR (0x70 << 1)
#define LED_ON 1
#define LED_OFF 0
#define LED_RED 1
#define L... |
TDHolmes/OvenTemp | STM32F446/OvenTemp/Inc/thermocouple.h | /*!
* @file thermocouple.h
* @author <NAME>
* @date 2-Sept-2017
* @brief Interface to the thermocouple temperature sensor
*/
#pragma once
#include <stdbool.h>
void therm_init(void);
void therm_startReading_single(void);
void therm_startReading_continuous(void);
void therm_ADC_done(void);
float therm_get... |
TDHolmes/OvenTemp | STM32F446/OvenTemp/Src/display.c | <gh_stars>0
/*!
* @file display.c
* @author <NAME>
* @date 2-Sept-2017
* @brief C library adapted from the quad I2C LED Backpack adafruit code. More info at bottom.
*/
#include <stdint.h>
#include "display.h"
#include "common.h"
#include "stm32f4xx_hal.h"
#include "stm32f4xx_hal_i2c.h"
static const uin... |
hoani/OpenCat | WriteInstinct/InstinctNybble.h | #define NYBBLE
#define NUM_SKILLS 34
#define I2C_EEPROM
const char bd[] PROGMEM = {
30, 0, 0, 1,
39, 39, -80, -80, 20, 20, 47, 47,
30, 30, -73, -73, 24, 24, 48, 48,
26, 26, -64, -64, 25, 25, 46, 46,
23, 23, -55, -55, 24, 24, 43, 43,
21, 21, -48, -48, 20, 20, 39, 39,
21, 21, -41,... |
Siege36/LED_clock | Clock/config_sample.h | #define SSID "#######"
#define PASSWORD "#######"
#define HOSTNAME "#######" |
renaudbedard/littlebits-arduino | Sketches/LFO/Pins.h | #include "Arduino.h"
#ifndef PINS_H
#define PINS_H
class In
{
public:
class Digital
{
public:
};
class Analog
{
public:
static const byte Speed = 0;
};
};
class Out
{
public:
class Digital
{
public:
};
class Analog
{
public:
static const byte Lfo =... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.