repo_name
stringlengths
5
122
path
stringlengths
3
232
text
stringlengths
6
1.05M
Delicode/astra
src/astra/astra_image.cpp
<gh_stars>100-1000 // This file is part of the Orbbec Astra SDK [https://orbbec3d.com] // Copyright (c) 2015 <NAME> // // 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.apache...
Delicode/astra
src/plugins/device_sdk/include/astra_stream_listener.hpp
// This file is part of the Orbbec Astra SDK [https://orbbec3d.com] // Copyright (c) 2015 <NAME> // // 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.apache.org/licenses/LICEN...
Delicode/astra
src/plugins/mock_sensor/mock_frame_generator.cpp
<filename>src/plugins/mock_sensor/mock_frame_generator.cpp // This file is part of the Orbbec Astra SDK [https://orbbec3d.com] // Copyright (c) 2015 Orbbec 3D // // 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 cop...
Delicode/astra
src/astra_core/astra_streamset.hpp
<filename>src/astra_core/astra_streamset.hpp // This file is part of the Orbbec Astra SDK [https://orbbec3d.com] // Copyright (c) 2015 <NAME> // // 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 ...
Delicode/astra
src/astra_core/unix/astra_environment_unix.cpp
<filename>src/astra_core/unix/astra_environment_unix.cpp<gh_stars>100-1000 // This file is part of the Orbbec Astra SDK [https://orbbec3d.com] // Copyright (c) 2015 Or<NAME> // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You m...
Delicode/astra
src/astra_core/win32/astra_filesystem_win32.cpp
// This file is part of the Orbbec Astra SDK [https://orbbec3d.com] // Copyright (c) 2015 Or<NAME> // // 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.apache.org/licenses/LIC...
Delicode/astra
src/astra_core/astra_streamset.cpp
<gh_stars>100-1000 // This file is part of the Orbbec Astra SDK [https://orbbec3d.com] // Copyright (c) 2015 Orbbec 3D // // 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.apa...
Delicode/astra
src/plugins/device_sdk/src/astra_sensor.cpp
<gh_stars>100-1000 // This file is part of the Orbbec Astra SDK [https://orbbec3d.com] // Copyright (c) 2015 Orbbec 3D // // 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.apa...
Delicode/astra
src/astra_core/astra_context_impl.hpp
<reponame>Delicode/astra<filename>src/astra_core/astra_context_impl.hpp /* THIS FILE AUTO-GENERATED FROM astra_context_impl.hpp.lpp. DO NOT EDIT. */ // This file is part of the Orbbec Astra SDK [https://orbbec3d.com] // Copyright (c) 2015 Orbbec 3D // // Licensed under the Apache License, Version 2.0 (the "License"); /...
Delicode/astra
src/astra_core/tests/signal_tests.cpp
<reponame>Delicode/astra<gh_stars>100-1000 // This file is part of the Orbbec Astra SDK [https://orbbec3d.com] // Copyright (c) 2015 <NAME> // // 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...
Delicode/astra
src/astra_core/astra_plugin_service_impl.hpp
<reponame>Delicode/astra /* THIS FILE AUTO-GENERATED FROM astra_plugin_service_impl.hpp.lpp. DO NOT EDIT. */ // This file is part of the Orbbec Astra SDK [https://orbbec3d.com] // Copyright (c) 2015 Orbbec 3D // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in co...
Delicode/astra
src/plugins/openni_sensor/oni_device_streamset.hpp
// This file is part of the Orbbec Astra SDK [https://orbbec3d.com] // Copyright (c) 2015 Orbbec 3D // // 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.apache.org/licenses/LI...
Delicode/astra
include/astra_core/plugins/PluginServiceProxy.hpp
/* THIS FILE AUTO-GENERATED FROM PluginServiceProxy.hpp.lpp. DO NOT EDIT. */ // This file is part of the Orbbec Astra SDK [https://orbbec3d.com] // Copyright (c) 2015 Orbbec 3D // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // Yo...
Delicode/astra
src/plugins/mock_sensor/mock_color_sensor.hpp
<reponame>Delicode/astra // This file is part of the Orbbec Astra SDK [https://orbbec3d.com] // Copyright (c) 2015 Orbbec 3D // // 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://w...
Delicode/astra
src/astra_core/astra_configuration.hpp
<reponame>Delicode/astra // This file is part of the Orbbec Astra SDK [https://orbbec3d.com] // Copyright (c) 2015 <NAME> // // 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....
Delicode/astra
src/astra_core/astra_string.cpp
// This file is part of the Orbbec Astra SDK [https://orbbec3d.com] // Copyright (c) 2015 <NAME> // // 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.apache.org/licenses/LICEN...
Delicode/astra
src/plugins/orbbec_streamplayer/StreamPlayerPlugin.cpp
<reponame>Delicode/astra<filename>src/plugins/orbbec_streamplayer/StreamPlayerPlugin.cpp // This file is part of the Orbbec Astra SDK [https://orbbec3d.com] // Copyright (c) 2015 Orbbec 3D // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the Li...
Delicode/astra
src/plugins/orbbec_xs/xs_plugin.hpp
// This file is part of the Orbbec Astra SDK [https://orbbec3d.com] // Copyright (c) 2015 Orbbec 3D // // 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.apache.org/licenses/LI...
Delicode/astra
src/plugins/orbbec_hand/hnd_handstream.hpp
// This file is part of the Orbbec Astra SDK [https://orbbec3d.com] // Copyright (c) 2015 Or<NAME> // // 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.apache.org/licenses/LIC...
Delicode/astra
src/astra_core/astra_shared_library.hpp
<filename>src/astra_core/astra_shared_library.hpp<gh_stars>100-1000 // This file is part of the Orbbec Astra SDK [https://orbbec3d.com] // Copyright (c) 2015 <NAME> // // 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...
Delicode/astra
src/plugins/orbbec_hand/hnd_scaling_coordinate_mapper.hpp
// This file is part of the Orbbec Astra SDK [https://orbbec3d.com] // Copyright (c) 2015 <NAME> // // 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.apache.org/licenses/LICEN...
Delicode/astra
src/astra/astra_point.cpp
// This file is part of the Orbbec Astra SDK [https://orbbec3d.com] // Copyright (c) 2015 Or<NAME> // // 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.apache.org/licenses/LIC...
Delicode/astra
src/astra_core/astra_stream.hpp
// This file is part of the Orbbec Astra SDK [https://orbbec3d.com] // Copyright (c) 2015 <NAME> // // 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.apache.org/licenses/LICEN...
Delicode/astra
src/astra_core/astra_stream_unregistering_event_args.hpp
<filename>src/astra_core/astra_stream_unregistering_event_args.hpp // This file is part of the Orbbec Astra SDK [https://orbbec3d.com] // Copyright (c) 2015 <NAME> // // 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 ...
Delicode/astra
src/astra_core/astra_create_stream_proxy.hpp
/* THIS FILE AUTO-GENERATED FROM astra_create_stream_proxy.hpp.lpp. DO NOT EDIT. */ // This file is part of the Orbbec Astra SDK [https://orbbec3d.com] // Copyright (c) 2015 Orbbec 3D // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License...
Delicode/astra
src/astra_core/astra_logging.hpp
// This file is part of the Orbbec Astra SDK [https://orbbec3d.com] // Copyright (c) 2015 <NAME> // // 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.apache.org/licenses/LICEN...
Delicode/astra
src/plugins/orbbec_hand/hnd_plugin.cpp
<gh_stars>100-1000 // This file is part of the Orbbec Astra SDK [https://orbbec3d.com] // Copyright (c) 2015 Or<NAME> // // 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.apac...
Delicode/astra
src/plugins/orbbec_hand/hnd_segmentation.cpp
// This file is part of the Orbbec Astra SDK [https://orbbec3d.com] // Copyright (c) 2015 Or<NAME> // // 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.apache.org/licenses/LIC...
Delicode/astra
src/plugins/orbbec_xs/xs_point_processor.cpp
// This file is part of the Orbbec Astra SDK [https://orbbec3d.com] // Copyright (c) 2015 Or<NAME> // // 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.apache.org/licenses/LIC...
Delicode/astra
src/astra_core/astra_signal_listener.hpp
<filename>src/astra_core/astra_signal_listener.hpp // This file is part of the Orbbec Astra SDK [https://orbbec3d.com] // Copyright (c) 2015 <NAME> // // 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 Li...
dirkohme/Clock
src/Clock.cpp
/* The MIT License (MIT) Copyright (c) 2019-2022 <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, me...
hollance/mda-plugins-juce
TestTone/Source/PluginProcessor.cpp
#include "PluginProcessor.h" static constexpr float twopi = 6.2831853f; MDATestToneAudioProcessor::MDATestToneAudioProcessor() : AudioProcessor(BusesProperties() .withInput ("Input", juce::AudioChannelSet::stereo(), true) .withOutput("Output", juce::AudioChannelSet::ste...
hollance/mda-plugins-juce
JX10/Source/PluginProcessor.cpp
#include "PluginProcessor.h" JX10Program::JX10Program() { param[0] = 0.00f; // OSC Mix param[1] = 0.25f; // OSC Tune param[2] = 0.50f; // OSC Fine param[3] = 0.00f; // Mode param[4] = 0.35f; // Glide Rate param[5] = 0.50f; // Glide Bend param[6] = 1.00f; // VCF Freq param[7] =...
hollance/mda-plugins-juce
Stereo/Source/PluginProcessor.cpp
<gh_stars>10-100 #include "PluginProcessor.h" MDAStereoAudioProcessor::MDAStereoAudioProcessor() : AudioProcessor(BusesProperties() .withInput ("Input", juce::AudioChannelSet::stereo(), true) .withOutput("Output", juce::AudioChannelSet::stereo(), true)) { apvts.state.a...
hollance/mda-plugins-juce
Piano/Source/PluginProcessor.cpp
#include "PluginProcessor.h" #include "mdaPianoData.h" MDAPianoProgram::MDAPianoProgram() { param[0] = 0.50f; // Decay param[1] = 0.50f; // Release param[2] = 0.50f; // Hardness param[3] = 0.50f; // Vel>Hard param[4] = 1.00f; // Muffle param[5] = 0.50f; // Vel>Muff param[6] = ...
hollance/mda-plugins-juce
Overdrive/Source/PluginProcessor.cpp
#include "PluginProcessor.h" MDAOverdriveAudioProcessor::MDAOverdriveAudioProcessor() : AudioProcessor(BusesProperties() .withInput ("Input", juce::AudioChannelSet::stereo(), true) .withOutput("Output", juce::AudioChannelSet::stereo(), true)) { apvts.state.addListener(...
hollance/mda-plugins-juce
DX10/Source/PluginProcessor.cpp
<reponame>hollance/mda-plugins-juce #include "PluginProcessor.h" DX10Program::DX10Program(const char *name, float p0, float p1, float p2, float p3, float p4, float p5, float p6, float p7, float p8, float p9, float p10, float p11, ...
hollance/mda-plugins-juce
Ambience/Source/PluginProcessor.cpp
#include "PluginProcessor.h" MDAAmbienceAudioProcessor::MDAAmbienceAudioProcessor() : AudioProcessor(BusesProperties() .withInput ("Input", juce::AudioChannelSet::stereo(), true) .withOutput("Output", juce::AudioChannelSet::stereo(), true)) { apvts.state.addListener(th...
hollance/mda-plugins-juce
Limiter/Source/PluginProcessor.cpp
#include "PluginProcessor.h" MDALimiterAudioProcessor::MDALimiterAudioProcessor() : AudioProcessor(BusesProperties() .withInput ("Input", juce::AudioChannelSet::stereo(), true) .withOutput("Output", juce::AudioChannelSet::stereo(), true)) { apvts.state.addListener(this...
hollance/mda-plugins-juce
Shepard/Source/PluginProcessor.cpp
<filename>Shepard/Source/PluginProcessor.cpp<gh_stars>10-100 #include "PluginProcessor.h" MDAShepardAudioProcessor::MDAShepardAudioProcessor() : AudioProcessor(BusesProperties() .withInput ("Input", juce::AudioChannelSet::stereo(), true) .withOutput("Output", juce::AudioCh...
hollance/mda-plugins-juce
SubSynth/Source/PluginProcessor.cpp
<reponame>hollance/mda-plugins-juce #include "PluginProcessor.h" MDASubSynthAudioProcessor::MDASubSynthAudioProcessor() : AudioProcessor(BusesProperties() .withInput ("Input", juce::AudioChannelSet::stereo(), true) .withOutput("Output", juce::AudioChannelSet::stereo(), tru...
hollance/mda-plugins-juce
Delay/Source/PluginProcessor.cpp
<filename>Delay/Source/PluginProcessor.cpp #include "PluginProcessor.h" MDADelayAudioProcessor::MDADelayAudioProcessor() : AudioProcessor(BusesProperties() .withInput ("Input", juce::AudioChannelSet::stereo(), true) .withOutput("Output", juce::AudioChannelSet::stereo(), tr...
hollance/mda-plugins-juce
EPiano/Source/PluginProcessor.cpp
<reponame>hollance/mda-plugins-juce #include "PluginProcessor.h" #include "mdaEPianoData.h" MDAEPianoProgram::MDAEPianoProgram(const char *name, float p0, float p1, float p2, float p3, float p4, float p5, float p6, float p7, ...
hollance/mda-plugins-juce
Degrade/Source/PluginProcessor.cpp
#include "PluginProcessor.h" MDADegradeAudioProcessor::MDADegradeAudioProcessor() : AudioProcessor(BusesProperties() .withInput ("Input", juce::AudioChannelSet::stereo(), true) .withOutput("Output", juce::AudioChannelSet::stereo(), true)) { apvts.state.addListener(this...
hollance/mda-plugins-juce
RingMod/Source/PluginProcessor.cpp
<gh_stars>10-100 #include "PluginProcessor.h" MDARingModAudioProcessor::MDARingModAudioProcessor() : AudioProcessor(BusesProperties() .withInput ("Input", juce::AudioChannelSet::stereo(), true) .withOutput("Output", juce::AudioChannelSet::stereo(), true)) { apvts.state...
sztomi/conan-libogg
test_package/test_package.cpp
<gh_stars>0 #include <ogg/ogg.h> #include <stdio.h> int main() { ogg_sync_state state; ogg_sync_init(&state); printf("Test OK\n"); return 0; }
6br/gbwtgraph
gbwtgraph.cpp
<reponame>6br/gbwtgraph #include <gbwtgraph/gbwtgraph.h> #include <algorithm> #include <cassert> #include <queue> #include <stack> #include <arpa/inet.h> #include <omp.h> namespace gbwtgraph { //------------------------------------------------------------------------------ // Numerical class constants. constexpr...
6br/gbwtgraph
tests/test_algorithms.cpp
#include <gtest/gtest.h> #include <algorithm> #include <set> #include <unordered_set> #include <vector> #include <gbwtgraph/algorithms.h> #include <gbwtgraph/gfa.h> #include "shared.h" using namespace gbwtgraph; namespace { //------------------------------------------------------------------------------ class Co...
6br/gbwtgraph
utils.cpp
#include <gbwtgraph/utils.h> #include <sstream> #include <vector> namespace gbwtgraph { //------------------------------------------------------------------------------ // Other class variables. const std::string SequenceSource::TRANSLATION_EXTENSION = ".trans"; //-------------------------------------------------...
6br/gbwtgraph
gfa.cpp
#include <gbwtgraph/gfa.h> #include <algorithm> #include <functional> #include <map> #include <regex> #include <string> #include <unordered_set> #include <utility> #include <cctype> #include <fcntl.h> #include <unistd.h> #include <sys/mman.h> #include <sys/stat.h> namespace gbwtgraph { //--------------------------...
6br/gbwtgraph
tests/test_gfa.cpp
#include <gtest/gtest.h> #include <gbwtgraph/gbwtgraph.h> #include <gbwtgraph/gfa.h> #include "shared.h" using namespace gbwtgraph; namespace { //------------------------------------------------------------------------------ class GFAConstruction : public ::testing::Test { public: gbwt::GBWT index; SequenceSo...
6br/gbwtgraph
tests/test_minimizer.cpp
<reponame>6br/gbwtgraph #include <gtest/gtest.h> #include <algorithm> #include <fstream> #include <map> #include <random> #include <set> #include <sstream> #include <tuple> #include <unordered_set> #include <vector> #include <gbwtgraph/minimizer.h> #include "shared.h" using namespace gbwtgraph; namespace { //----...
6br/gbwtgraph
gfa2gbwt.cpp
#include <iostream> #include <fstream> #include <string> #include <getopt.h> #include <unistd.h> #include <gbwtgraph/gbwtgraph.h> #include <gbwtgraph/gfa.h> using namespace gbwtgraph; //------------------------------------------------------------------------------ const std::string tool_name = "GFA to GBWTGraph"; ...
6br/gbwtgraph
tests/test_utils.cpp
#include <gtest/gtest.h> #include <gbwtgraph/utils.h> #include "shared.h" using namespace gbwtgraph; namespace { //------------------------------------------------------------------------------ class SourceTest : public ::testing::Test { public: void check_nodes(const SequenceSource& source, const std::vector<n...
6br/gbwtgraph
path_cover.cpp
#include <gbwtgraph/path_cover.h> #include <gbwtgraph/algorithms.h> #include <algorithm> #include <cassert> #include <deque> #include <limits> #include <map> #include <string> namespace gbwtgraph { //------------------------------------------------------------------------------ // Similar to std::lower_bound(). te...
1nfern-0/Blockchain-based-loan-management-system
crypto.cpp
//Blockchain based Credit Scoring /* Name ID <NAME> - 2017A7PS1482H <NAME> - 2017A7PS0065H <NAME> - 2017A7PS0086H <NAME> - 2015A7PS0010H */ #include <iostream> #include <functional> #include <string> #include <sstream> #include <stdlib.h> #inclu...
AndrewB330/microsoft-ui-xaml
dev/RadioMenuFlyoutItem/RadioMenuFlyoutItem.cpp
<filename>dev/RadioMenuFlyoutItem/RadioMenuFlyoutItem.cpp // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. #include "pch.h" #include "common.h" #include "RadioMenuFlyoutItem.h" #include "RuntimeProfiler.h" #...
AndrewB330/microsoft-ui-xaml
dev/Generated/XRayOverlayControl.properties.cpp
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen #include "pch.h" #include "common.h" #include "ColorFilterOverlayControl.h" ...
AndrewB330/microsoft-ui-xaml
dev/AnimatedIcon/AnimatedVisuals/AnimatedGlobalNavigationButtonVisualSource.cpp
<reponame>AndrewB330/microsoft-ui-xaml //------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // // LottieGen version: // 7.0.0-build.101+g12769c43d3 // // Command: // LottieGen -Langu...
AndrewB330/microsoft-ui-xaml
dev/Generated/PipsPager.properties.cpp
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen #include "pch.h" #include "common.h" #include "PipsPager.h" namespace winrt...
AndrewB330/microsoft-ui-xaml
dev/AnimatedIcon/AnimatedVisuals/AnimatedChevronUpDownSmallVisualSource.cpp
//------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // // LottieGen version: // 7.0.0-build.101+g12769c43d3 // // Command: // LottieGen -Language Cppwinrt -WinUIVersion 2.4 -InputFi...
AndrewB330/microsoft-ui-xaml
dev/Generated/Controls_08_SideChevron_TreeView.properties.cpp
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen #include "pch.h" #include "common.h" #include "Controls_08_SideChevron_TreeView...
IslameN/c-
design_patterns_in_modern_cpp/3.Builder/15.BuilderFacets/src/Person.cpp
<reponame>IslameN/c- #include "Person.h" #include "PersonBuilder.h" PersonBuilder Person::create() { return PersonBuilder{}; }
IslameN/c-
design_patterns_in_modern_cpp/3.Builder/15.BuilderFacets/Facets.cpp
#include <iostream> #include <sstream> #include <string> #include <vector> using namespace std; #include "Person.h" #include "PersonAddressBuilder.h" #include "PersonBuilder.h" #include "PersonJobBuilder.h" int main() { Person p = Person::create() .lives() .at("...
IslameN/c-
design_patterns_in_modern_cpp/3.Builder/13.Fluent_builder/include/PersonBuilder.hpp
#pragma once #include <utility> #include "Person.hpp" class PersonBuilder { Person* person; public: PersonBuilder(std::string name) { person = new Person(name); } operator Person() const { return *person; } PersonBuilder& lives(); PersonBuilder& at(std::string street_address); PersonBuild...
IslameN/c-
design_patterns_in_modern_cpp/3.Builder/11.Life_without_builders/main.cpp
#include <iostream> #include <memory> #include <sstream> #include <string> #include <vector> using namespace std; int main() { // <p>hello</p> auto text = "hello"; string output; output += "<p>"; output += text; output += "</p>"; cout << output << endl; string words[] = {"hello", "wor...
IslameN/c-
shaharmike/return_value_optimization.cpp
#include <iostream> using namespace std; struct Snitch { // Note: All methods have side effects Snitch() { cout << "c'tor: " << this << endl; } ~Snitch() { cout << "d'tor: " << this << endl; } Snitch(const Snitch&) { cout << "copy c'tor: " << this << endl; } Snitch(Snitch&&) { cout << "move c'tor: "...
IslameN/c-
shaharmike/unique_pointer.cpp
#include <iostream> #include <memory> using namespace std; // 2 class MyClass {}; // 4 std::unique_ptr<MyClass> CreateMyObject() { return make_unique<MyClass>(); } void SomeFunction() {} void SomeOtherFunction() {} // 5 void TakeOwnership(std::unique_ptr<int> obj) {} // 6 class SomeObject { // No destructo...
IslameN/c-
design_patterns_in_modern_cpp/3.Builder/13.Fluent_builder/main.cpp
<reponame>IslameN/c-<filename>design_patterns_in_modern_cpp/3.Builder/13.Fluent_builder/main.cpp<gh_stars>1-10 #include "EmailBuilder.hpp" #include "PersonBuilder.hpp" using namespace std; int main() { Person p = Person::create("John") .lives() .at("123 London Road") ...
IslameN/c-
design_patterns_in_modern_cpp/2.SOLID_desing_principles/5.Liskov_substitution_principle/LSP.cpp
// Objects in a program should be replaceable with instances of their subtypes // w/o altering the correctness of the program #include <iostream> class Rectangle { protected: int width, height; public: Rectangle(const int width, const int height) : width{width}, height{height} { } int get_widt...
IslameN/c-
design_patterns_in_modern_cpp/3.Builder/13.Fluent_builder/include/Email.hpp
<reponame>IslameN/c-<filename>design_patterns_in_modern_cpp/3.Builder/13.Fluent_builder/include/Email.hpp #include <iostream> #include <sstream> #include <string> using namespace std; // Forward declaring the builder class EmailBuilder; class Email { public: friend class EmailBuilder; // the builder can acce...
IslameN/c-
design_patterns_in_modern_cpp/3.Builder/16.Exercise_1_Builder_Config_Exercise/NoBuilder.cpp
#include <iostream> #include <ostream> #include <string> #include <vector> using namespace std; class CodeBuilder { std::string class_name; std::vector<std::pair<std::string, std::string>> fields; public: CodeBuilder(const string& class_name) { this->class_name = class_name; } CodeBui...
IslameN/c-
shaharmike/shared_pointer.cpp
<reponame>IslameN/c- #include <iostream> #include <memory> #include <type_traits> struct Snitch { public: Snitch() { std::cout << "c'tor: " << this << std::endl; } ~Snitch() { std::cout << "d'tor: " << this << std::endl; } Snitch(Snitch const&) { std::cout << "copy c'tor: " << this << std::endl; } S...
IslameN/c-
design_patterns_in_modern_cpp/3.Builder/13.Fluent_builder/include/Person.hpp
<filename>design_patterns_in_modern_cpp/3.Builder/13.Fluent_builder/include/Person.hpp #pragma once #include <iostream> class PersonBuilder; class Person { std::string m_name, m_street_address, m_post_code, m_city; // Personal Detail std::string m_company_name, m_position, m_annual_income; // Employment D...
IslameN/c-
design_patterns_in_modern_cpp/3.Builder/13.Fluent_builder/src/Person.cpp
<reponame>IslameN/c- #include "Person.hpp" #include "PersonBuilder.hpp" PersonBuilder Person::create(std::string name) { return PersonBuilder{name}; } std::ostream& operator<<(std::ostream& os, const Person& obj) { return os << obj.m_name << std::endl << "lives : " << std::endl ...
IslameN/c-
design_patterns_in_modern_cpp/3.Builder/13.Fluent_builder/src/EmailBuilder.cpp
<reponame>IslameN/c- #include "EmailBuilder.hpp" EmailBuilder Email::make() { return EmailBuilder(); }
IslameN/c-
design_patterns_in_modern_cpp/3.Builder/16.Exercise_1_Builder_Config_Exercise/Builder.cpp
<reponame>IslameN/c-<filename>design_patterns_in_modern_cpp/3.Builder/16.Exercise_1_Builder_Config_Exercise/Builder.cpp #include <iostream> #include <ostream> #include <string> #include <vector> using namespace std; class CodeBuilder; class Code { std::string name; std::string type; public: Code(){};...
IslameN/c-
design_patterns_in_modern_cpp/3.Builder/13.Fluent_builder/src/PersonBuilder.cpp
<gh_stars>1-10 #include "PersonBuilder.hpp" PersonBuilder& PersonBuilder::lives() { return *this; } PersonBuilder& PersonBuilder::works() { return *this; } PersonBuilder& PersonBuilder::with(std::string company_name) { person->m_company_name = company_name; return *this; } PersonBuilder& PersonBuilder::as_a...
IslameN/c-
design_patterns_in_modern_cpp/2.SOLID_desing_principles/4.Open-closed_principle/OCP.cpp
// open closed principle // open for extension, closed for modification #include <string> #include <vector> #include <iostream> using namespace std; enum class Color { red, green, blue }; enum class Size { small, medium, large }; struct Product { string name; Color color; Size size; }; str...
IslameN/c-
design_patterns_in_modern_cpp/3.Builder/13.Fluent_builder/include/EmailBuilder.hpp
#include <iostream> #include <sstream> #include <string> #include "Email.hpp" class EmailBuilder { public: EmailBuilder& from(const string& from) { m_email.m_from = from; return *this; } EmailBuilder& to(const string& to) { m_email.m_to = to; return *this; } Em...
IslameN/c-
design_patterns_in_modern_cpp/2.SOLID_desing_principles/6.Interface_segregation_principle/ISP.cpp
#include <vector> struct Document; //struct IMachine //{ // virtual void print(Document& doc) = 0; // virtual void fax(Document& doc) = 0; // virtual void scan(Document& doc) = 0; //}; // //struct MFP : IMachine //{ // void print(Document& doc) override; // void fax(Document& doc) override; // void...
DLR-SC/tasking-framework
src/clock.cpp
<reponame>DLR-SC/tasking-framework /* * clock.cpp * * Copyright 2012-2019 German Aerospace Center (DLR) SC * * 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.apache.org...
DLR-SC/tasking-framework
examples/customPlatform/customPlatformExample.cpp
/* * customPlatformExample.cpp * * Created on: 22.04.2020 * Author: omai */ #include <iostream> #include <string> #include <schedulerProvider.h> #include <schedulePolicyFifo.h> #include <task.h> #include <taskChannel.h> class EchoChannel : public Tasking::Channel { public: /** * Push sentence to ...
DLR-SC/tasking-framework
examples/customPlatform/clockExecutionModel.cpp
/* * clockExecutionModel.cpp * * Copyright 2012-2019 German Aerospace Center (DLR) SC * * 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.apache.org/licenses/LICENSE-2.0...
DLR-SC/tasking-framework
test/testSchedulerUnitTest.cpp
/* * testSchedulerUnitTest.cpp * * Copyright 2012-2019 German Aerospace Center (DLR) SC * * 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.apache.org/licenses/LICENSE-2...
DLR-SC/tasking-framework
examples/multiparallelExample.cpp
/* * multiparallelExample.cpp * * Copyright 2012-2019 German Aerospace Center (DLR) SC * * 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.apache.org/licenses/LICENSE-2....
DLR-SC/tasking-framework
src/scheduler.cpp
<gh_stars>1-10 /* * scheduler.cpp * * Copyright 2012-2019 German Aerospace Center (DLR) SC * * 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.apache.org/licenses/LICENS...
DLR-SC/tasking-framework
src/taskPeriodicSchedule.cpp
<filename>src/taskPeriodicSchedule.cpp /* * taskPeriodicSchedule.cpp * * Copyright 2012-2019 German Aerospace Center (DLR) SC * * 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 * * ht...
DLR-SC/tasking-framework
test/testTaskUtils.cpp
/* * testTaskUtils.cpp * * Copyright 2012-2020 German Aerospace Center (DLR) SC * * 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.apache.org/licenses/LICENSE-2.0 * *...
dsackinger/drinking-philosophers
main.cpp
<reponame>dsackinger/drinking-philosophers ////////////////////////////////////////////////////////////////////////// // main.cpp // // Copyright (C) 2018 <NAME> - All Rights Reserved // You may use, distribute and modify this code under the // terms of the MIT license. // // This is the entry point: // * Processes c...
dsackinger/drinking-philosophers
Philosopher.cpp
////////////////////////////////////////////////////////////////////////// // Philosopher.cpp // // Copyright (C) 2018 <NAME> - All Rights Reserved // You may use, distribute and modify this code under the // terms of the MIT license. // // Implementation of the Philosopher class // This implements the specification ...
dsackinger/drinking-philosophers
Table.cpp
<reponame>dsackinger/drinking-philosophers<gh_stars>0 ////////////////////////////////////////////////////////////////////////// // Table.cpp // // Copyright (C) 2018 <NAME> - All Rights Reserved // You may use, distribute and modify this code under the // terms of the MIT license. // // Implementation of the Table cl...
dsackinger/drinking-philosophers
Logger.cpp
<reponame>dsackinger/drinking-philosophers<gh_stars>0 ////////////////////////////////////////////////////////////////////////// // Logger.cpp // // Copyright (C) 2018 <NAME> - All Rights Reserved // You may use, distribute and modify this code under the // terms of the MIT license. // // Implementation of the logger ...
seanc316/ofxNDI
example-audio-receiver/src/ofApp.cpp
<reponame>seanc316/ofxNDI #include "ofApp.h" using namespace std; //-------------------------------------------------------------- void ofApp::setup(){ auto findSource = [](const std::string &name_or_url) { auto sources = ofxNDI::listSources(); if(name_or_url == "") { return make_pair(ofxNDI::Source(), false)...
seanc316/ofxNDI
src/utils/ofxNDIVideoCaster.cpp
#include "ofxNDIVideoCaster.h" #include "ofBaseTypes.h" using namespace std; using namespace ofxNDI::Send; void VideoCaster::setSource(std::shared_ptr<ofBaseVideo> source, bool async) { source_ = source; stream_ = make_shared<ofxNDISendVideo>(); stream_->setup(*this); stream_->setAsync(async); } void VideoCaster:...
seanc316/ofxNDI
src/ofxNDIRecorder.cpp
#include "ofxNDIRecorder.h" bool ofxNDIRecorder::setup(ofxNDIReceiver &receiver) { return setup(receiver.getInstance()); } bool ofxNDIRecorder::setup(ofxNDIReceiver::Instance instance) { instance_ = instance; return NDIlib_recv_recording_is_supported(instance_); } bool ofxNDIRecorder::start(const std::string &fil...
seanc316/ofxNDI
example-audio-sender/src/ofApp.cpp
#include "ofApp.h" //-------------------------------------------------------------- void ofApp::setup(){ if(sender_.setup("ofxNDI audio sender example")) { audio_.setup(sender_); } else { ofLogError("NDI setup failed."); } ofSoundStreamSettings sss; sss.numInputChannels = 2; sss.numOutputChannels = 0; sss....
seanc316/ofxNDI
src/ofxNDISender.cpp
#include "ofxNDISender.h" #include "ofLog.h" using namespace std; const NDIlib_source_t* ofxNDISender::getSourceName() const { return NDIlib_send_get_source_name(instance_); } bool ofxNDISender::setup(const string &name, const string &group, bool clock_video, bool clock_audio) { NDIlib_send_create_t create_setting...
seanc316/ofxNDI
example-sender/src/ofApp.cpp
<reponame>seanc316/ofxNDI #include "ofApp.h" //-------------------------------------------------------------- void ofApp::setup(){ ofBackground(0); ofSetFrameRate(60); camera_.setup(1920, 1080); if(sender_.setup("ofxNDISender example")) { video_.setup(sender_); video_.setAsync(true); } } //------------------...
seanc316/ofxNDI
example-router/src/ofApp.cpp
#include "ofApp.h" //-------------------------------------------------------------- void ofApp::setup(){ router_.setup("example-router", "ofxNDI"); sources_ = ofxNDI::listSources(); } //-------------------------------------------------------------- void ofApp::update(){ } //---------------------------------------...