repo_name stringlengths 6 97 | path stringlengths 3 341 | text stringlengths 8 1.02M |
|---|---|---|
codenameone-akshat/D3D9_Renderer | D3D9_Renderer/D3D9_Renderer/source/enginecore/Batch.h | #pragma once
namespace renderer
{
struct BatchDesc
{
BatchDesc()
:primitiveCount(0),
vertexCount(0),
indexStart(0)
{}
uint32_t primitiveCount;
uint32_t vertexCount;
uint32_t indexStart;
};
} |
codenameone-akshat/D3D9_Renderer | D3D9_Renderer/D3D9_Renderer/source/enginecore/FileWatcher.h | #pragma once
#include <filesystem>
#include <string>
#include <vector>
namespace renderer
{
class FileWatcher
{
public:
FileWatcher();
~FileWatcher();
[[nodiscard]]size_t AddFileForWatch(std::string filePath);
bool IsFileModified(size_t fileIndex);
private:
std... |
codenameone-akshat/D3D9_Renderer | D3D9_Renderer/D3D9_Renderer/source/renderer/Mesh.h | #pragma once
#include <assimp/scene.h>
#include <vector>
#include "Material.h"
namespace renderer
{
class Mesh
{
public:
Mesh();
~Mesh();
void AppendVertices(float x, float y, float z) noexcept;
void AppendNormals(float x, float y, float z) noexcept;
void AppendTexCoords(float x, float y) n... |
codenameone-akshat/D3D9_Renderer | D3D9_Renderer/D3D9_Renderer/source/enginecore/ModelManager.h | #pragma once
#include<vector>
#include "../renderer/Model.h"
#include "../renderer/d3d9/VertexDefs.h"
#include "Batch.h"
namespace renderer
{
class ModelManager
{
public:
ModelManager();
~ModelManager();
void AddModelToWorld(IDirect3DDevice9* deviceRef, std::string filePath);
void LoadModel();
void Set... |
codenameone-akshat/D3D9_Renderer | D3D9_Renderer/D3D9_Renderer/source/utils/ComHelpers.h | #pragma once
#include <DxErr.h>
#include<d3d9.h>
namespace renderer
{
constexpr void ComSafeRelease(IUnknown* comPtr)
{
if (comPtr)
{
comPtr->Release();
comPtr = nullptr;
}
}
constexpr void ComResult(HRESULT result)
{
if (result != S_OK)
{
DXTrace(__FILE__, __LINE__, result, L"Error"... |
codenameone-akshat/D3D9_Renderer | D3D9_Renderer/D3D9_Renderer/source/renderer/Material.h | #pragma once
#include <d3d9.h>
#include"d3d9/Shader.h"
namespace renderer
{
class Material
{
public:
Material();
~Material();
enum class TextureType
{
Diffuse,
Normal,
Specular,
Opacity
};
void SetTexture(TextureType texType, IDirect3DTexture9* texture);
IDirect3DTexture9* GetTextureOfT... |
codenameone-akshat/D3D9_Renderer | D3D9_Renderer/D3D9_Renderer/source/renderer/d3d9/VertexDefs.h | #pragma once
#include <d3d9.h>
namespace renderer
{
struct VertexDeclContainer
{
IDirect3DVertexDeclaration9* positionVertexDecl = nullptr;
};
struct PositionVertex
{
PositionVertex()
:m_vx(0.0f), m_vy(0.0f), m_vz(0.0f),
m_nx(0.0f), m_ny(0.0f), m_nz(0.0f),
... |
codenameone-akshat/D3D9_Renderer | D3D9_Renderer/D3D9_Renderer/source/utils/Logger.h | <filename>D3D9_Renderer/D3D9_Renderer/source/utils/Logger.h
#pragma once
#include <string>
#include <windows.h>
namespace renderer
{
class Logger
{
Logger();
public:
~Logger();
inline static Logger& GetInstance()
{
static Logger instance;
return instance;
}
void SetupLogger(HWND window);
vo... |
codenameone-akshat/D3D9_Renderer | D3D9_Renderer/D3D9_Renderer/source/enginecore/EngineCore.h | #pragma once
#include <memory>
#include "../window/Window.h"
#include "../renderer/d3d9/D3D9Renderer.h"
namespace renderer
{
class Time;
class EngineCore
{
public:
EngineCore();
~EngineCore();
EngineCore(EngineCore& engineCore) = delete;
EngineCore& operator=(EngineCore engineCore) = delete;
void... |
codenameone-akshat/D3D9_Renderer | D3D9_Renderer/D3D9_Renderer/source/renderer/d3d9/D3D9Renderer.h | #pragma once
#pragma comment (lib, "d3dx9")
#pragma comment (lib, "d3d9.lib")
#pragma comment (lib, "dxerr.lib")
#include <d3d9.h>
#include <memory>
#include <vector>
#include "../GfxRendererBase.h"
#include "D3D9Device.h"
#include "StaticBuffer.hpp"
#include "../Model.h"
#include "VertexDefs.h"
#include "../Camera.... |
codenameone-akshat/D3D9_Renderer | D3D9_Renderer/D3D9_Renderer/source/renderer/Camera.h | <gh_stars>0
#pragma once
#include <d3dx9.h>
namespace renderer
{
class Camera
{
public:
Camera();
~Camera();
[[maybe_unused]] inline D3DXMATRIX GetViewMatrix() const { return m_viewMatrix; }
[[maybe_unused]] inline D3DXVECTOR3 GetCamPosition() const { return m_camPos; }
[[maybe_unused]] inline D3DXVECTO... |
codenameone-akshat/D3D9_Renderer | D3D9_Renderer/D3D9_Renderer/source/utils/Time.h | <reponame>codenameone-akshat/D3D9_Renderer
#pragma once
#include <chrono>
namespace renderer
{
class Time
{
public:
Time();
~Time();
inline void BeginTimer() { m_tStart = std::chrono::high_resolution_clock::now(); };
inline void EndTimer()
{
m_tEnd = std::chron... |
codenameone-akshat/D3D9_Renderer | D3D9_Renderer/D3D9_Renderer/source/renderer/d3d9/D3D9Device.h | <reponame>codenameone-akshat/D3D9_Renderer<gh_stars>0
#pragma once
#include <d3d9.h>
#include <d3dx9.h>
#include <memory>
#include "../../utils/ComHelpers.h"
#include "StaticBuffer.hpp"
namespace renderer
{
class D3D9Device
{
public:
D3D9Device();
~D3D9Device();
D3D9Device(D3D9Device&&) = default;
inlin... |
codenameone-akshat/D3D9_Renderer | D3D9_Renderer/D3D9_Renderer/source/renderer/Model.h | <gh_stars>0
#pragma once
#include <string>
#include <assimp/Importer.hpp>
#include <vector>
#include <memory>
#include <cassert>
#include "Mesh.h"
namespace renderer
{
using Scene = aiScene;
using Importer = Assimp::Importer;
struct MaterialDesc
{
uint32_t textureCount;
std::vector<std::st... |
codenameone-akshat/D3D9_Renderer | D3D9_Renderer/D3D9_Renderer/source/window/Window.h | #pragma once
#include <windows.h>
#include <windowsx.h>
#include <stdint.h>
namespace renderer
{
class Window
{
public:
Window();
~Window();
void CreateD3DWindow(const LPCWSTR lpClassName, const LPCWSTR lpWindowName, const DWORD dwStyle,
const int32_t X, const int32_t Y, const int32_t nWidth, c... |
codenameone-akshat/D3D9_Renderer | D3D9_Renderer/D3D9_Renderer/source/renderer/GfxRendererBase.h | <reponame>codenameone-akshat/D3D9_Renderer
#pragma once
#include <windows.h>
namespace renderer
{
class GfxRendererBase
{
public:
GfxRendererBase();
virtual ~GfxRendererBase();
//prevent copies of the renderer
GfxRendererBase(const GfxRendererBase&) = delete;
GfxRendererBase& operator=(const GfxRenderer... |
codenameone-akshat/D3D9_Renderer | D3D9_Renderer/D3D9_Renderer/source/renderer/d3d9/Shader.h | <reponame>codenameone-akshat/D3D9_Renderer<filename>D3D9_Renderer/D3D9_Renderer/source/renderer/d3d9/Shader.h<gh_stars>0
#pragma once
#include <d3dx9.h>
#include <string>
#include <map>
namespace renderer
{
class Shader
{
public:
Shader();
~Shader();
void CreateShader(IDir... |
kiyolee/libxml2-win-build | win32/rcVersion.h | <reponame>kiyolee/libxml2-win-build<filename>win32/rcVersion.h<gh_stars>10-100
#define LIBXML_MAJOR_VERSION 2
#define LIBXML_MINOR_VERSION 9
#define LIBXML_MICRO_VERSION 12
#define LIBXML_DOTTED_VERSION "2.9.12"
|
Juicyexe/RAGE-Source | RAGE DLL/Bridge.h | <filename>RAGE DLL/Bridge.h
#pragma once
#include <string>
#include <vector>
#include "r_lua.h"
extern "C" {
#include "Lua\lua.h"
#include "Lua\lua.hpp"
#include "Lua\lualib.h"
#include "Lua\lauxlib.h"
#include "Lua\luaconf.h"
#include "Lua\llimits.h"
}
#include <unordered_map>
#define AXONDEBUG false
struct Userda... |
Juicyexe/RAGE-Source | RAGE DLL/r_lua.h |
#pragma once
#include <Windows.h>
#include "retcheck.h"
#include "Bridge.h"
//Auto Lua Type: https://github.com/Mellonyt/Roblox-Lua-Type-Scanner
// Scanning Time: 4 Secs
// For version-5a2a97e1d9794df1
namespace Adresses {
/*
* addinfo_Decompiled_Args: int a1
* addinfo_TypeDef: int
* addinfo_Aob: 5... |
Juicyexe/RAGE-Source | RAGE DLL/ImGui/imgui_impl_dx11.h | // dear imgui: Renderer for DirectX11
// This needs to be used along with a Platform Binding (e.g. Win32)
// Implemented features:
// [X] Renderer: User texture binding. Use 'ID3D11ShaderResourceView*' as
// ImTextureID. Read the FAQ about ImTextureID in imgui.cpp.
// You can copy and use unmodified imgui_impl_* fi... |
svddevelop/esp8288-AT | user/at_cmd.c | /*
* File : at_cmd.c
* This file is part of Espressif's AT+ command set program.
* Copyright (C) 2013 - 2016, Espressif Systems
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of version 3 of the GNU General Public License as
* published by the Free Software Foundati... |
svddevelop/esp8288-AT | user/at_wifiCmd.c | /*
* File : at_wifiCmd.c
* This file is part of Espressif's AT+ command set program.
* Copyright (C) 2013 - 2016, Espressif Systems
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of version 3 of the GNU General Public License as
* published by the Free Software Foun... |
svddevelop/esp8288-AT | user/at_port.c | <reponame>svddevelop/esp8288-AT
/*
* File : at_port.c
* This file is part of Espressif's AT+ command set program.
* Copyright (C) 2013 - 2016, Espressif Systems
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of version 3 of the GNU General Public License as
* publis... |
svddevelop/esp8288-AT | include/at_version.h | /*
* File : at_version.h
* This file is part of Espressif's AT+ command set program.
* Copyright (C) 2013 - 2016, Espressif Systems
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of version 3 of the GNU General Public License as
* published by the Free Software Foun... |
svddevelop/esp8288-AT | user/at_baseCmd.c | <reponame>svddevelop/esp8288-AT
/*
* File : at_baseCmd.c
* This file is part of Espressif's AT+ command set program.
* Copyright (C) 2013 - 2016, Espressif Systems
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of version 3 of the GNU General Public License as
* pub... |
svddevelop/esp8288-AT | user/at_svdCmd.h | <reponame>svddevelop/esp8288-AT
#ifndef _AT_SVDCMD_H_
#define _AT_SVDCMD_H_
#include "at.h"
//#include "at_wifiCmd.h"
//#include "at_ipCmd.h"
//#include "at_baseCmd.h"
void at_setupCmdrest(uint8_t id);
void at_getCmdCrsip(uint8_t id);
void at_setCmdCrsip(uint8_t id, char *pPara);
void at_getCmdCrsget(uint8_t id);
v... |
svddevelop/esp8288-AT | user/at_cmd.h | <reponame>svddevelop/esp8288-AT
/*
* File : at_cmd.h
* This file is part of Espressif's AT+ command set program.
* Copyright (C) 2013 - 2016, Espressif Systems
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of version 3 of the GNU General Public License as
* publish... |
svddevelop/esp8288-AT | user/user_main.c | <filename>user/user_main.c
/*
* File : user_main.c
* This file is part of Espressif's AT+ command set program.
* Copyright (C) 2013 - 2016, Espressif Systems
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of version 3 of the GNU General Public License as
* published... |
svddevelop/esp8288-AT | user/at_ipCmd.c | /*
* File : at_ipCmd.c
* This file is part of Espressif's AT+ command set program.
* Copyright (C) 2013 - 2016, Espressif Systems
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of version 3 of the GNU General Public License as
* published by the Free Software Founda... |
svddevelop/esp8288-AT | user/at_baseCmd.h | <filename>user/at_baseCmd.h<gh_stars>1-10
/*
* File : at_baseCmd.h
* This file is part of Espressif's AT+ command set program.
* Copyright (C) 2013 - 2016, Espressif Systems
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of version 3 of the GNU General Public License... |
svddevelop/esp8288-AT | user/at_svdCmd.c | #include "at_svdCmd.h"
#include <stdlib.h>
#include "osapi.h"
#include "c_types.h"
#include "at.h"
#include "at_baseCmd.h"
#include "user_interface.h"
#include "at_version.h"
#include "version.h"
#include "driver/uart_register.h"
//#include "at_cmd.h"
#define _CRLN "\r\n"
extern void user_esp_platform_load_param(voi... |
SBcodework/Battleship-in-Cpp | common.h | <reponame>SBcodework/Battleship-in-Cpp<gh_stars>0
/**
BSD 2-Clause License
Copyright (c) 2019, SBcodework
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... |
SBcodework/Battleship-in-Cpp | player.h | /**
BSD 2-Clause License
Copyright (c) 2019, SBcodework
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, this
list ... |
Lucarda/pd-pulqui | pulqui.c | <reponame>Lucarda/pd-pulqui
/* pulqui external for Pure-Data
// Written by <NAME> 2019 v0.1.0
// No warranties
// See License.txt
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include "m_pd.h"
// infoweneed
struct infoweneed
{
uint32_t samplebytes;
uint8_t bitdepht;
ui... |
Lucarda/pd-pulqui | pq-cli-app/pq.c | /* pq command line interface
// Written by <NAME> 2019 v0.1.0
// No warranties
// See License.txt
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
// infoweneed
struct infoweneed
{
uint32_t samplebytes;
uint8_t bitdepht;
uint8_t channels;
uint8_t bytespersample;
ui... |
seeplusplus/mongo | src/mongo/db/storage/mobile/mobile_record_store.h | /**
* Copyright (C) 2017 MongoDB Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be usef... |
seeplusplus/mongo | src/mongo/db/s/metadata_manager.h | <filename>src/mongo/db/s/metadata_manager.h
/**
* Copyright (C) 2016 MongoDB Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation.
*
* This program is ... |
seeplusplus/mongo | src/mongo/db/s/migration_destination_manager.h | /**
* Copyright (C) 2015 MongoDB Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be usef... |
SebastianBoe/open-amp | apps/examples/load_fw/common.h | /*
* Copyright(c) 2019 Xilinx Ltd.
* All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef COMMON_H_
#define COMMON_H_
#include <metal/alloc.h>
#include <metal/io.h>
#include <metal/sys.h>
#include <metal/utilities.h>
#include <openamp/remoteproc.h>
#include <openamp/remoteproc_loader.h>
#inc... |
SebastianBoe/open-amp | apps/machine/zynqmp/platform_info.c | <gh_stars>1-10
/*
* Copyright (c) 2014, Mentor Graphics Corporation
* All rights reserved.
* Copyright (c) 2017 Xilinx, Inc.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
/**************************************************************************
* FILE NAME
*
* platform_info.c
*
* DESCRIPTION
*
* ... |
goel42/z16 | include/z16.h | // Copyright (c) 2020, <NAME>. All rights reserved.
/**
* Z16 :: 16-bit Monochrome Image Compressor
*
* Our goals are to provide real-time (fast) compression for 16-bit RAW images
* with a faster codec and higher compression than existing formats like TIFF.
*/
#ifndef Z16_H
#define Z16_H
#include <stdint.h>
#i... |
rozum-dev/ResonanceSDK | ResonanceSDK.framework/Headers/ServerManager.h | <reponame>rozum-dev/ResonanceSDK
//
// ServerManager.h
// KPITest
//
// Created by Nik on 09.12.15.
// Copyright © 2015 Nik. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface ServerManager : NSObject
@property (strong,nonatomic) NSURLComponents* urlComponents;
+ (ServerManager*) sharedMana... |
rozum-dev/ResonanceSDK | ResonanceSDK.framework/Headers/CResonanceRecommendationScheme.h | //
// CResonanceRecommendationScheme.h
//
// Copyright (c) 2014 Certona. All rights reserved.
//
@import Foundation;
@interface CResonanceRecommendationScheme : NSObject <NSCoding, NSCopying>
+(instancetype) schemeWithName:(NSString *) name;
+(instancetype) schemeWithName:(NSString *) name
cou... |
rozum-dev/ResonanceSDK | ResonanceSDK.framework/Headers/CResonanceTransaction.h | //
// CResonanceTransaction.h
//
// Copyright (c) 2014 Certona. All rights reserved.
//
@import Foundation;
@interface CResonanceTransaction : NSObject <NSCoding, NSCopying>
@property (nonatomic, copy) NSString* transactionId;
@property (nonatomic, copy) NSNumber* total;
@end
|
rozum-dev/ResonanceSDK | ResonanceSDK.framework/Headers/CResonanceUtils.h | <reponame>rozum-dev/ResonanceSDK
//
// CResonanceUtils.h
//
// Copyright (c) 2015 Certona. All rights reserved.
//
@import Foundation;
NSString* CPercentEscapedQueryStringKeyFromStringWithEncoding(NSString* string, NSStringEncoding encoding);
NSString* CPercentEscapedQueryStringValueFromStringWithEncoding(... |
rozum-dev/ResonanceSDK | ResonanceSDK.framework/Headers/ResonanceSDK.h | //
// ResonanceSDK.h
// ResonanceSDK
//
// Created by Nik on 12/6/17.
// Copyright © 2017 <NAME>. All rights reserved.
//
#import <UIKit/UIKit.h>
//! Project version number for Resonance_SDK.
FOUNDATION_EXPORT double Resonance_SDKVersionNumber;
//! Project version string for Resonance_SDK.
FOUNDATION_EXPORT cons... |
rozum-dev/ResonanceSDK | ResonanceSDK.framework/Headers/CResonance.h | //
// CResonance.h
//
// Copyright (c) 2014 Certona. All rights reserved.
//
@import Foundation;
@import AdSupport;
#import "CResonanceItem.h"
#import "CResonanceRecommendationScheme.h"
#import "ServerManager.h"
#import "ResonanceBaseSettings.h"
/** Certona Resonance Client SDK for iOS
*/
@interface ... |
rozum-dev/ResonanceSDK | ResonanceSDK.framework/Headers/CQueryStringPair.h | <reponame>rozum-dev/ResonanceSDK<gh_stars>0
//
// CQueryStringPair.h
//
// Copyright (c) 2015 Certona. All rights reserved.
//
@import Foundation;
@interface CQueryStringPair : NSObject <NSCoding, NSCopying>
+(NSArray *) queryStringPairsFromKey:(NSString *) key
andValue:(id) value;
+(NSString ... |
rozum-dev/ResonanceSDK | ResonanceSDK.framework/Headers/CResonanceSchemeResponse.h | <reponame>rozum-dev/ResonanceSDK<gh_stars>0
//
// CResonanceSchemeResponse.h
//
// Copyright (c) 2014 Certona. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface CResonanceSchemeResponse : NSObject
@property (nonatomic, strong) NSString* name;
@property (nonatomic, strong) NSString* ex... |
rozum-dev/ResonanceSDK | ResonanceSDK.framework/Headers/ResonanceBaseSettings.h | <reponame>rozum-dev/ResonanceSDK
//
// ResonanceBaseSettings.h
// Resonance
//
// Created by Nik on 11/29/17.
// Copyright © 2017 Nik. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <CoreTelephony/CTTelephonyNetworkInfo.h>
#import <CoreTelephony/CTCarrier.h>
#import <UIKit/UIKit.h>
@interface R... |
rozum-dev/ResonanceSDK | ResonanceSDK.framework/Headers/CResonanceItem.h | <filename>ResonanceSDK.framework/Headers/CResonanceItem.h
//
// CResonanceItem.h
//
// Copyright (c) 2014 Certona. All rights reserved.
//
@import Foundation;
@interface CResonanceItem : NSObject <NSCoding, NSCopying>
+(instancetype) itemWithItemId:(NSString *) itemId;
+(instancetype) itemWithItemId:(NS... |
wimrijnders/morpho_cpp | common/AnyObject.h | <reponame>wimrijnders/morpho_cpp<filename>common/AnyObject.h
#ifndef ANYOBJECT_H
#define ANYOBJECT_H
#include <typeinfo> // typeid(obj).name()
#include <cxxabi.h> // abi::__cxa_demangle
#include <cassert>
#include <string>
#include <vector>
#include <memory>
#include <sstream>
/**
* Proxy for later handling.
*/
clas... |
wimrijnders/morpho_cpp | old_code/ARHandler.h | #ifndef ARHANDLER_H
#define ARHANDLER_H
#include "ActivationRecord.h"
class ARHandler {
private:
ActivationRecord *m_activation_record{nullptr};
/**
* @brief Ready activation record in variable for use as current.
*/
ActivationRecord *init_ar(int index) {
AnyObject *obj = m_activation_record->get(index);
a... |
wimrijnders/morpho_cpp | Stack.h | #ifndef STACKLINK_H
#define STACKLINK_H
#include <vector>
#include <algorithm>
#include "common/AnyObject.h"
/**
* @brief TODO
*
* In the java version, the StackLink is a linked list
* of objects.
*
* The list is operated as an inverted stack, for reasons
* of efficiency. It's better to push/pop at the end.
*/... |
wimrijnders/morpho_cpp | old_code/ActivationRecord.h | <reponame>wimrijnders/morpho_cpp
#ifndef ACTIVATIONRECORD_H
#define ACTIVATIONRECORD_H
#include <cassert>
#include <string>
#include "../common/AnyObject.h"
#include "Environment.h"
/**
* Currently, instances form linked lists.
*/
class ActivationRecord: public AnyObject {
private:
int m_return_address{-1};
// ... |
wimrijnders/morpho_cpp | FiberState.h | #ifndef FIBERSTATE_H
#define FIBERSTATE_H
#include "Continuation.h"
class FiberState : public Continuation {
private:
// NOTE: the accumulator is the first argument (index 0) when making a call.
// Acc value is pushed as last on the variables stack when nargs >= 1.
ObjectRef m_accumulator;
protected:
sta... |
wimrijnders/morpho_cpp | old_code/Task.h | #ifndef OLD_TASK_H
#define OLD_TASK_H
#include <iostream>
#include "../common/Runnable.h"
class Fiber: public Runnable, public Interpreter {
private:
void suspend() {
assert(m_state == RUNNING); // Might be too strict; eg. already suspended?
m_state = PAUSED;
}
void resume() {
assert(m_state == PAUSED || m... |
wimrijnders/morpho_cpp | builtins.h | /**
* Library definitions.
*
* These are called directly, not bothering with the morpho assembly code syntax here
*/
#ifndef LIBRARY_FUNCTIONS_H
#define LIBRARY_FUNCTIONS_H
#include <map>
#include <string>
extern std::map<int, std::string> builtins;
//////////////////////////////////////////////////////////////... |
wimrijnders/morpho_cpp | RunContext.h | <reponame>wimrijnders/morpho_cpp<filename>RunContext.h
#ifndef RUNCONTEXT_H
#define RUNCONTEXT_H
#include <cassert>
#include <memory> // swap()
#include "Stack.h"
#include "common/Operation.h"
class RunContext {
private:
Stack m_stack;
protected:
OperationArray *m_code{nullptr};
int m_pc{-1};
static void swap... |
wimrijnders/morpho_cpp | common/Runnable.h | #ifndef RUNNABLE_H
#define RUNNABLE_H
/**
* @brief Remove first item in list without returning its value
*
* Following is deemed inefficient by stackoverflow
* Apparently, deque is better for popping, or use pop_back() instead.
*
* TODO: Find more efficient method later on.
*/
template <typename V>
void pop(std... |
wimrijnders/morpho_cpp | Closure.h | <reponame>wimrijnders/morpho_cpp<filename>Closure.h<gh_stars>0
#ifndef CLOSURE_H
#define CLOSURE_H
#include "CallContext.h"
#include "common/AnyObject.h"
#include "RunContext.h"
/**
* @brief Direct translation of java version.
*
* Not sure if nargs, nenv needed, keeping them in for now.
*/
class Closure : public C... |
wimrijnders/morpho_cpp | operation/MakeClosure.h | <reponame>wimrijnders/morpho_cpp<filename>operation/MakeClosure.h
#ifndef MAKECLOSURE_H
#define MAKECLOSURE_H
#include <cassert>
#include "../Stack.h"
#include "../Closure.h"
#include "../common/Operation.h"
namespace operation {
/**
* @brief Perform a call to either a built-in function or
* a position in th... |
wimrijnders/morpho_cpp | old_code/Environment.h | <reponame>wimrijnders/morpho_cpp<gh_stars>0
#ifndef ENVIRONMENT_H
#define ENVIRONMENT_H
#include "Variables.h"
class Environment {
private:
Variables m_variables;
// Environment are chained, from direct enclosing to top-level global.
Environment *m_enclosing_environment{nullptr};
public:
Environment() {
// De... |
wimrijnders/morpho_cpp | operation/MakeVal.h | <reponame>wimrijnders/morpho_cpp
#ifndef MAKEVAL_H
#define MAKEVAL_H
#include "../common/AnyObject.h"
namespace operation {
class MakeVal: public Operation {
private:
ObjectRef m_val;
public:
explicit MakeVal(int val) {
m_val.reset(new IntObject(val));
}
explicit MakeVal(bool val) {
m_val.reset(new BoolObje... |
wimrijnders/morpho_cpp | CallContext.h | #ifndef CALLCONTEXT_H
#define CALLCONTEXT_H
class Interpreter;
class Task;
using lib_func = void (Interpreter &);
using task_func = void (Task &);
/**
* @brief Call in-memory or built-in method.
*
* This class is becoming increasingly ugly; now with two
* different types of in-built method pointers.
*
* TODO: ... |
wimrijnders/morpho_cpp | Loader.h | #ifndef LOADER_H
#define LOADER_H
#include <fstream>
#include <string>
#include <vector>
/**
* @brief Loader::Loader
*
* The compiled program coming from morpho(2) is a zlib-encoded format.
* This is the same as gzip, but without the magic number in front.
*
* For now, we use the following command line to uncomp... |
wimrijnders/morpho_cpp | operation/Operations.h | <reponame>wimrijnders/morpho_cpp
#ifndef OPERATIONS_H
#define OPERATIONS_H
#include "../common/Operation.h"
#include "../Interpreter.h"
template<typename Parent>
class OperationP: public Parent {
public:
using Parent::Parent;
void execute(Interpreter &interpreter) override {
interpreter.push();
Parent::execute(... |
wimrijnders/morpho_cpp | Channel.h | #ifndef CHANNEL_H
#define CHANNEL_H
#include <deque>
#include "mutex"
#include "common/AnyObject.h"
#include "FiberState.h"
#include "Machine.h"
class Channel : public AnyObject {
using lock = std::lock_guard<std::mutex>;
private:
std::mutex m_mutex;
ObjectRef m_val;
bool hasChangedSinceLastNotify{false};
... |
wimrijnders/morpho_cpp | operation/Call.h | <reponame>wimrijnders/morpho_cpp<filename>operation/Call.h
#ifndef CALL_H
#define CALL_H
#include "../CallContext.h"
namespace operation {
/**
* @brief Perform a call to either a built-in function or
* a position in the current operations array.
*
*/
class Call: public CallContext, public Operation {
pu... |
wimrijnders/morpho_cpp | old_code/Variables.h | #ifndef VARIABLES_H
#define VARIABLES_H
#include <vector>
#include "../common/AnyObject.h"
class Variables {
private:
// Convention in VM: temp have negative indexes, local >= 0
std::vector<AnyObject *> m_temp_variables;
std::vector<AnyObject *> m_local_variables;
public:
~Variables() {
for (auto &ptr: m_temp_... |
wimrijnders/morpho_cpp | common/Operation.h | #ifndef INSTRUCTION_H
#define INSTRUCTION_H
#include <vector>
class Interpreter;
class Operation {
public:
virtual ~Operation() {}
virtual void execute(Interpreter &interpreter) = 0;
};
class OperationArray : public std::vector<Operation *> {
public:
OperationArray(Operation *data[]) {
Operation **ptr = data;
... |
wimrijnders/morpho_cpp | Error.h | <filename>Error.h
#ifndef ERROR_H
#define ERROR_H
#include <exception>
#include <string>
class Error : public std::exception {
private:
std::string s;
public:
Error() {}
Error(std::string ss) : s(ss) {}
~Error() throw () {}
void msg(std::string ss) { s = ss; }
const char* what() const throw() { ret... |
wimrijnders/morpho_cpp | Continuation.h | #ifndef CONTINUATION_H
#define CONTINUATION_H
#include "RunContext.h"
class Continuation : public RunContext {
private:
// Used for debugging and/or interactive environment StackLink[] m_display;
Continuation *m_ret{nullptr};
Continuation *m_ex{nullptr};
protected:
static void swap(Continuation &first, Contin... |
wimrijnders/morpho_cpp | old_code/library_functions.h | /**
* Library definitions.
*
* These are called directly, not bothering with the morpho assembly code syntax here
*/
#ifndef LIBRARY_FUNCTIONS_H
#define LIBRARY_FUNCTIONS_H
#include <cassert>
#include "../common/AnyObject.h"
#include "support.h"
/////////////////////////////////////////////////////////////////////... |
wimrijnders/morpho_cpp | old_code/Operations.h | <gh_stars>0
#ifndef OLD_OPERATIONS_H
#define OLD_OPERATIONS_H
#include "../common/Operation.h"
#include "Interpreter.h"
#include "support.h"
namespace operation {
//////////////////////////////
// Morpho2 operations
//////////////////////////////
using lib_func = void (Interpreter &);
/**
* @brief Perform a c... |
wimrijnders/morpho_cpp | old_code/Interpreter.h | #ifndef OLD_INTERPRETER_H
#define OLD_INTERPRETER_H
#include <memory>
#include "ARHandler.h"
#include "../common/Operation.h"
class Interpreter : private ARHandler {
public:
using ARHandler::set_ar;
using ARHandler::cur_ar;
using ARHandler::control_link;
OperationArray *m_code{nullptr};
int m_pc{-1};
private:
... |
wimrijnders/morpho_cpp | Interpreter.h | #ifndef INTERPRETER_H
#define INTERPRETER_H
#include <sstream>
#include <memory>
//#include <string>
#include "FiberState.h"
#include "Closure.h"
#include "common/Operation.h"
class Interpreter : public FiberState {
private:
bool m_dead{true};
void swap(Interpreter &first, Interpreter &second) /* nothrow */ ... |
wimrijnders/morpho_cpp | Task.h | <gh_stars>0
#ifndef TASK_H
#define TASK_H
#include <iostream>
#include "common/Runnable.h"
#include "Interpreter.h"
class Fiber: public Runnable, public Interpreter {
private:
void suspend() {
assert(m_state == RUNNING); // Might be too strict; eg. already suspended?
m_state = PAUSED;
}
void resume() {
ass... |
wimrijnders/morpho_cpp | operation/Fetch.h | <filename>operation/Fetch.h
#ifndef FETCH_H
#define FETCH_H
namespace operation {
class Fetch: public Operation {
private:
int m_pos{0};
public:
Fetch(int pos) :
m_pos(pos)
{}
void execute(Interpreter &interpreter) override {
interpreter.doFetch(m_pos);
}
};
using FetchP = OperationP<Fetch>;
using Fetch... |
wimrijnders/morpho_cpp | old_code/Machine.h | #ifndef MACHINE_H
#define MACHINE_H
#include <thread>
#include <cassert>
#include <vector>
#include <atomic>
const int NUM_WORKER_THREADS = 0;
class Thread {
private:
std::thread m_thread;
std::atomic<bool> m_running{false};
public:
bool available() { return m_running == false; }
void execute(Task &process) {... |
wimrijnders/morpho_cpp | old_code/support.h | <gh_stars>0
#ifndef OLD_SUPPORT_H
#define OLD_SUPPORT_H
#include <vector>
class ActivationRecord;
class Interpreter;
class AnyObject;
void get_integers(Interpreter &interpreter, int &out_int1, int &out_int2);
void return_acc(Interpreter &interpreter, AnyObject *obj);
#endif // OLD_SUPPORT_H
|
onelesd/ipremote | node_modules/arpjs/node_modules/pcap/pcap_session.h | #ifndef PCAP_SESSION_H
#define PCAP_SESSION_H
#include <node.h>
#include <pcap/pcap.h>
class PcapSession : public node::ObjectWrap {
public:
static void Init(v8::Handle<v8::Object> exports);
private:
PcapSession();
~PcapSession();
static v8::Handle<v8::Value> New(const v8::Arguments& args);
stat... |
abhigoudar/x_vio_ros | include/x_vio_ros/node.h | <reponame>abhigoudar/x_vio_ros<gh_stars>0
/*
* Copyright 2020 California Institute of Technology (“Caltech”)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apach... |
abhigoudar/x_vio_ros | include/x_vio_ros/rviz_publisher.h | <filename>include/x_vio_ros/rviz_publisher.h
/*
* Copyright 2020 California Institute of Technology (“Caltech”)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.ap... |
emperorlu/YCSB-C | db/wiredtiger_db.h | //
//
//
#ifndef YCSB_C_WIREDTIGER_DB_H
#define YCSB_C_WIREDTIGER_DB_H
#include "core/db.h"
#include <iostream>
#include <string>
#include "core/properties.h"
#include "core/core_workload.h"
#include <wiredtiger/wiredtiger_ext.h>
using std::cout;
using std::endl;
namespace ycsbc {
class WiredTiger : public DB{... |
emperorlu/YCSB-C | lib/histogram.h | // Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
// This source code is licensed under both the GPLv2 (found in the
// COPYING file in the root directory) and Apache 2.0 License
// (found in the LICENSE.Apache file in the root directory).
//
// Copyright (c) 2011 The LevelDB Authors. All rights r... |
dmitry-radzevich/CUTE | cute/cute_throws.h | <gh_stars>0
/*********************************************************************************
* This file is part of CUTE.
*
* Copyright (c) 2007-2018 <NAME>, IFS
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"... |
dmitry-radzevich/CUTE | cute/cute_indexed.h | /*********************************************************************************
* This file is part of CUTE.
*
* Copyright (c) 2013-2018 <NAME>, IFS
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
... |
NEEC-FCT/-FCT-NOVA-iOS | RAMAnimatedTabBarDemo/RAMAnimatedTabBarDemo/IntroController.h | <reponame>NEEC-FCT/-FCT-NOVA-iOS<filename>RAMAnimatedTabBarDemo/RAMAnimatedTabBarDemo/IntroController.h
//
// ViewController.h
//
// Copyright (c) 2013-2017 <NAME>. License: MIT.
#import <UIKit/UIKit.h>
@interface ViewController : UITableViewController
@end
|
NEEC-FCT/-FCT-NOVA-iOS | RAMAnimatedTabBarDemo/Pods/Target Support Files/SMPageControl/SMPageControl-umbrella.h | #ifdef __OBJC__
#import <UIKit/UIKit.h>
#else
#ifndef FOUNDATION_EXPORT
#if defined(__cplusplus)
#define FOUNDATION_EXPORT extern "C"
#else
#define FOUNDATION_EXPORT extern
#endif
#endif
#endif
#import "SMPageControl.h"
FOUNDATION_EXPORT double SMPageControlVersionNumber;
FOUNDATION_EXPORT const unsigned char SMPageC... |
stefanschielke/WebWorks-Community-APIs | BB10/upnp/NDK_project/public/miniwget.h | /* $Id: miniwget.h,v 1.8 2012/09/27 15:42:10 nanard Exp $ */
/* Project : miniupnp
* Author : <NAME>
* Copyright (c) 2005-2012 <NAME>
* This software is subject to the conditions detailed in the
* LICENCE file provided in this distribution.
* */
#ifndef MINIWGET_H_INCLUDED
#define MINIWGET_H_INCLUDED
#include "de... |
stefanschielke/WebWorks-Community-APIs | BB10-Cordova/SystemDialog/plugin/src/blackberry10/native/precompiled.h | <reponame>stefanschielke/WebWorks-Community-APIs
// This file is used to store precompiled headers.
#include <QObject>
#include <QString>
|
stefanschielke/WebWorks-Community-APIs | BB10/mongoose/NDK_project/public/mongooseintf.c | // Copyright (c) 2004-2013 <NAME>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, d... |
stefanschielke/WebWorks-Community-APIs | BB10-Cordova/ExtractZipFile/plugin/src/blackberry10/native/src/state2json.h | #include <json/reader.h>
#include <json/writer.h>
// About --------------------------------------------------
// state2json is a helper and header only library created
// for exposing state to unit tests.
//
// Compilation --------------------------------------------
// When compiling the macro S2J_ENABLED must be set... |
stefanschielke/WebWorks-Community-APIs | BB10/mongoose/NDK_project/public/mongooseintf.h | <filename>BB10/mongoose/NDK_project/public/mongooseintf.h
#ifndef MONGOOSEINTF_HEADER_INCLUDED
#define MONGOOSEINTF_HEADER_INCLUDED
// #define USE_LUA // Optional - delete to miss out LUA
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
int start_mongoose(char *argv[]);
int stop_mongoose();
const char *mongoos... |
franktank/Flicks | Flicks-BridgingHeader.h | <filename>Flicks-BridgingHeader.h
//
// Flicks-BridgingHeader.h
// MovieViewer
//
// Created by <NAME> on 1/13/16.
// Copyright © 2016 <NAME>. All rights reserved.
//
#ifndef MovieViewer_BridgingHeader_h
#define MovieViewer_BridgingHeader_h
#import <MBProgressHUD.h>
#endif /* Flicks_BridgingHeader_h */
|
Akhilsudh/Hacker-Rank-Solutions | kangaroo.c | #include <stdio.h>
int main()
{
int x1, x2, v1, v2, flag = 1;
scanf("%d%d%d%d", &x1, &v1, &x2, &v2);
if((x1 < x2) && (v1 < v2))
{
printf("NO");
flag = 0;
}
while(flag)
{
if(x1 == x2)
{
printf("YES");
break;
}
else if(x1 > x2)
{
printf("NO");
break;
}
if(x1 < x2)
{
x1 += v1;
... |
Akhilsudh/Hacker-Rank-Solutions | MiniMaxSum.c | #include <stdio.h>
int main()
{
long minSum = 0, maxSum = 0, Sum = 0;
long temp;
int count = 0;
long arr[5];
for(int i = 0; i < 5; i++)
{
scanf("%ld", &arr[i]);
}
while(count != 5)
{
if(minSum != 0 && maxSum != 0)
{
for(int i = 0; i < 5; i++)
{
if(i != count)
{
Sum += arr[i];
}
... |
Akhilsudh/Hacker-Rank-Solutions | TimeConversion.c | #include <stdio.h>
#include <string.h>
int main()
{
int h, m, s ;
char ampm[3];
scanf("%d:%d:%d%s", &h, &m, &s, ampm) ;
if (strcmp(ampm,"AM") == 0 && h == 12)
{
h = 0 ;
}
if (strcmp(ampm,"PM")==0 && h != 12)
{
h += 12 ;
}
printf("%02d:%02d:... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.