This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Assuming this your tests/CMakeLists.txt (and your libs are setup in a root config) | |
# Just make sure to include(CTest) in your *root* cmake config. | |
# 3.9 adds support for "GoogleTest" which enumerates the tests inside | |
# of the code and adds them to ctest. | |
cmake_minimum_required(VERSION 3.9) | |
# Configure google-test as a downloadable library. | |
include(External_GTest.cmake) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (C) 2018 Google Inc. All Rights Reserved. | |
# | |
# 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 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <vector> | |
#include <typeinfo> | |
#include <typeindex> | |
#include <unordered_map> | |
#include <iostream> | |
class Adaptable; | |
class AdaptableComponent { | |
Adaptable *container; | |
friend Adaptable; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <forward_list> | |
#include <functional> | |
#include <memory> | |
template <typename... FuncArgs> | |
class Signal | |
{ | |
using Function = std::function<void(FuncArgs...)>; | |
std::forward_list<std::weak_ptr<Function> > registeredListeners; |