From 2daad2d734f9b383199cb640adfbd917dd2a0655 Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Fri, 14 Mar 2014 02:02:59 +0100 Subject: [PATCH] #refs 185 , added samples for blacksim classes --- samples/blacksim/main.cpp | 4 +++- samples/blacksim/samplesfsx.cpp | 28 ++++++++++++++++++++++++++++ samples/blacksim/samplesfsx.h | 24 ++++++++++++++++++++++++ 3 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 samples/blacksim/samplesfsx.cpp create mode 100644 samples/blacksim/samplesfsx.h diff --git a/samples/blacksim/main.cpp b/samples/blacksim/main.cpp index 17c334cdb..4344c6c28 100644 --- a/samples/blacksim/main.cpp +++ b/samples/blacksim/main.cpp @@ -5,6 +5,7 @@ #include "blacksim/blacksimfreefunctions.h" #include "samplesfscommon.h" +#include "samplesfsx.h" #include /*! @@ -13,7 +14,8 @@ int main(int argc, char *argv[]) { BlackSim::registerMetadata(); - BlackSimTest::CSamplesFsCommon::samples(); + // BlackSimTest::CSamplesFsCommon::samples(); + BlackSimTest::CSamplesFsx::samples(); QCoreApplication a(argc, argv); return a.exec(); } diff --git a/samples/blacksim/samplesfsx.cpp b/samples/blacksim/samplesfsx.cpp new file mode 100644 index 000000000..67227e94b --- /dev/null +++ b/samples/blacksim/samplesfsx.cpp @@ -0,0 +1,28 @@ +/* Copyright (C) 2013 VATSIM Community / contributors + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "samplesfsx.h" +#include "blacksim/blacksimfreefunctions.h" +#include "blacksim/fsx/simconnectutilities.h" +#include + +using namespace BlackSim::Fsx; + +namespace BlackSimTest +{ + + /* + * Samples + */ + int CSamplesFsx::samples() + { + BlackSim::registerMetadata(); + qDebug() << CSimConnectUtilities::simConnectExceptionToString(CSimConnectUtilities::SIMCONNECT_EXCEPTION_ALREADY_SUBSCRIBED); + qDebug() << CSimConnectUtilities::simConnectExceptionToString(CSimConnectUtilities::SIMCONNECT_EXCEPTION_ILLEGAL_OPERATION); + qDebug() << CSimConnectUtilities::simConnectSurfaceTypeToString(CSimConnectUtilities::Bituminus); + return 0; + } + +} // namespace diff --git a/samples/blacksim/samplesfsx.h b/samples/blacksim/samplesfsx.h new file mode 100644 index 000000000..600642d7f --- /dev/null +++ b/samples/blacksim/samplesfsx.h @@ -0,0 +1,24 @@ +/* Copyright (C) 2013 VATSIM Community / contributors + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#ifndef BLACKSIMTEST_SAMPLESFSX_H +#define BLACKSIMTEST_SAMPLESFSX_H + +namespace BlackSimTest +{ + /*! + * \brief Samples for FSX classes + */ + class CSamplesFsx + { + public: + /*! + * \brief Run the samples + */ + static int samples(); + }; +} // namespace + +#endif