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
#ifndef COMMON_H | |
#define COMMON_H | |
#include <QDebug> | |
#include <QDateTime> | |
#include <QThread> | |
inline void log(QString const& iMessage) | |
{ | |
qDebug().noquote() << QDateTime::currentDateTime().toString("HH:mm:ss.zzz") << QThread::currentThreadId() << iMessage; |
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 <QCoreApplication> | |
#include "MainWindow.h" | |
// *************************************************************************** | |
// コンストラクタ | |
// *************************************************************************** | |
MainWindow::MainWindow() : | |
WindowBase("qrc:/MainWindow.qml") |
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
cmake_minimum_required(VERSION 3.5.1) | |
project(sample) | |
find_package(Boost) | |
include_directories("${Boost_INCLUDE_DIR}") | |
if(MSVC) | |
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4 /EHsc") | |
else() | |
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++11") |
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
#[[########################################################################### | |
Theolizer紹介用サンプルCMakeLists.txt | |
]]############################################################################ | |
if("${CMAKE_VERSION}" STREQUAL "") | |
set(CMAKE_VERSION, 3.5.0) | |
endif() | |
cmake_minimum_required(VERSION ${CMAKE_VERSION}) | |
message(STATUS "BOOST_ROOT=${BOOST_ROOT}") |
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
cmake_minimum_required(VERSION 3.5.0) | |
# MSVCの通常使わないビルド・モードとZERO_CHECKプロジェクトの削除 | |
set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "Configs" FORCE) | |
set(CMAKE_SUPPRESS_REGENERATION TRUE) | |
# プロジェクト設定 | |
project(Test) | |
if(WIN32) |
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
project(Test) | |
add_library(sub SHARED sub.cpp dll.h) | |
add_executable(main main.cpp dll.h) | |
target_link_libraries(main sub) |
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 <iostream> | |
template<int tInt> | |
struct Class0 | |
{ | |
int mInt0; | |
int mInt1; | |
int mInt2; | |
int mInt3; | |
Class0() : mInt0(tInt+0), mInt1(tInt+1), mInt2(tInt+2), mInt3(tInt+3) { } |