Skip to content

Commit

Permalink
Introduce vcpkg
Browse files Browse the repository at this point in the history
  • Loading branch information
Molnár Csaba committed Aug 27, 2024
1 parent dc5450b commit 253b17d
Show file tree
Hide file tree
Showing 14 changed files with 1,407 additions and 4 deletions.
270 changes: 270 additions & 0 deletions include/WASimCommander_SDK-v1.2.0.0/WASimCommander.h

Large diffs are not rendered by default.

633 changes: 633 additions & 0 deletions include/WASimCommander_SDK-v1.2.0.0/client/WASimClient.h

Large diffs are not rendered by default.

30 changes: 30 additions & 0 deletions include/WASimCommander_SDK-v1.2.0.0/client/enums.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
This file is part of the WASimCommander project.
https://github.com/mpaperno/WASimCommander
COPYRIGHT: (c) Maxim Paperno; All Rights Reserved.
This file may be used under the terms of either the GNU General Public License (GPL)
or the GNU Lesser General Public License (LGPL), as published by the Free Software
Foundation, either version 3 of the Licenses, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
Copies of the GNU GPL and LGPL are included with this project
and are available at <http://www.gnu.org/licenses/>.
*/

#pragma once

#ifdef WSMCMND_ENUM_EXPORT
#undef WSMCMND_ENUM_EXPORT
#undef WSMCMND_ENUM_NAMESPACE
#endif

#define WSMCMND_ENUM_EXPORT
#define WSMCMND_ENUM_NAMESPACE WASimCommander::Client

#include "./enums_impl.h"
83 changes: 83 additions & 0 deletions include/WASimCommander_SDK-v1.2.0.0/client/enums_impl.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
/*
This file is part of the WASimCommander project.
https://github.com/mpaperno/WASimCommander
COPYRIGHT: (c) Maxim Paperno; All Rights Reserved.
This file may be used under the terms of either the GNU General Public License (GPL)
or the GNU Lesser General Public License (LGPL), as published by the Free Software
Foundation, either version 3 of the Licenses, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
Copies of the GNU GPL and LGPL are included with this project
and are available at <http://www.gnu.org/licenses/>.
*/

// DO NOT USE THIS FILE DIRECTLY -- NO INCLUDE GUARD
// Use client/enums.h

#include <cstdint>
#include <vector>

#ifndef WSMCMND_ENUM_EXPORT
#define WSMCMND_ENUM_EXPORT
#define WSMCMND_ENUM_NAMESPACE WASimCommander::Client
#endif

namespace WSMCMND_ENUM_NAMESPACE
{

/// Client status flags. \sa WASimClient::status()
WSMCMND_ENUM_EXPORT enum class ClientStatus : uint8_t
{
Idle = 0x00, ///< no active SimConnect or WASim server connection
Initializing = 0x01, ///< trying to connect to SimConnect
SimConnected = 0x02, ///< have SimConnect link
Connecting = 0x04, ///< attempting connection to WASim server
Connected = 0x08, ///< connected to WASim server
ShuttingDown = 0x10, ///< closing SimConnect link, before being back in Idle status mode
AllConnected = SimConnected | Connected,
};
#if defined(DEFINE_ENUM_FLAG_OPERATORS) && !defined(_MANAGED)
DEFINE_ENUM_FLAG_OPERATORS(ClientStatus)
#endif
/// \name Enumeration name strings
/// \{
static const std::vector<const char *> ClientStatusNames = { "Idle", "Initializing", "SimConnected", "Connecting", "Connected", "ShuttingDown" }; ///< \refwcc{ClientStatus} enum names.
/// \}

/// Client event type enumeration. \sa ClientEvent, ClientStatus, WASimClient::setClientEventCallback()
WSMCMND_ENUM_EXPORT enum class ClientEventType : uint8_t
{
None = 0,
SimConnecting, ///< Initializing status
SimConnected, ///< SimConnected status
SimDisconnecting, ///< ShuttingDown status
SimDisconnected, ///< From SimConnected to Initializing status change
ServerConnecting, ///< Connecting status
ServerConnected, ///< Connected status
ServerDisconnected, ///< From Connected to SimConnected status change
};
/// \name Enumeration name strings
/// \{
static const std::vector<const char *> ClientEventTypeNames = { "None",
"SimConnecting", "SimConnected", "SimDisconnecting", "SimDisconnected",
"ServerConnecting", "ServerConnected", "ServerDisconnected" }; ///< \refwcc{ClientEventType} enum names.
/// \}

/// Log entry source, Client or Server. \sa WASimClient::logCallback_t
WSMCMND_ENUM_EXPORT enum class LogSource : uint8_t
{
Client, ///< Log record from WASimClient
Server ///< Log record from WASimModule (Server)
};
/// \name Enumeration name strings
/// \{
static const std::vector<const char *> LogSourceNames = { "Client", "Server" }; ///< \refwcc{LogSource} enum names.
/// \}

};
51 changes: 51 additions & 0 deletions include/WASimCommander_SDK-v1.2.0.0/client/exports.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/*
This file is part of the WASimCommander project.
https://github.com/mpaperno/WASimCommander
COPYRIGHT: (c) Maxim Paperno; All Rights Reserved.
This file may be used under the terms of either the GNU General Public License (GPL)
or the GNU Lesser General Public License (LGPL), as published by the Free Software
Foundation, either version 3 of the Licenses, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
Copies of the GNU GPL and LGPL are included with this project
and are available at <http://www.gnu.org/licenses/>.
*/

#pragma once

#include "global.h"

#if defined(_MSC_VER) && defined(WSMCMND_API_IMPORT)

// This exercise is mainly to silence MSVC warnings (C4251) when exporting (to DLL) some variables which use stdlib templated types.
// It does not actually make any difference since the produced DLLs are compiler-specific anyway. And we're only exporting
// very basic vector types which are simply dynamic memory allocation (std::string just being a glorified char array, after all).
// We could probably just as well disable the warning... but we'll try to do it "the right way."
//#pragma warning( disable: 4251 )

#include <string>
#include <vector>

// for string (basic_string<char>)
WSMCMND_API_IMPORT template class WSMCMND_API std::allocator<char>;
WSMCMND_API_IMPORT template union WSMCMND_API std::_String_val<std::_Simple_types<char>>::_Bxty;
WSMCMND_API_IMPORT template class WSMCMND_API std::_String_val<std::_Simple_types<char>>;
WSMCMND_API_IMPORT template class WSMCMND_API std::_Compressed_pair<std::allocator<char>,std::_String_val<std::_Simple_types<char>>,true>;
WSMCMND_API_IMPORT template class WSMCMND_API std::basic_string<char, std::char_traits<char>, std::allocator<char>>;
// for vector<uint8_t>
WSMCMND_API_IMPORT template class WSMCMND_API std::allocator<uint8_t>;
WSMCMND_API_IMPORT template class WSMCMND_API std::_Vector_val<std::_Simple_types<uint8_t>>;
WSMCMND_API_IMPORT template class WSMCMND_API std::_Compressed_pair<std::allocator<uint8_t>,std::_Vector_val<std::_Simple_types<uint8_t>>,true>;
WSMCMND_API_IMPORT template class WSMCMND_API std::vector<uint8_t, std::allocator<uint8_t>>;
// for vector< pair< int, string > >
WSMCMND_API_IMPORT template class WSMCMND_API std::_Vector_val<std::_Simple_types<std::pair<int,std::string>>>;
WSMCMND_API_IMPORT template class WSMCMND_API std::_Compressed_pair<std::allocator<std::pair<int,std::string>>,std::_Vector_val<std::_Simple_types<std::pair<int,std::string>>>,true>;
WSMCMND_API_IMPORT template class WSMCMND_API std::vector<std::pair<int,std::string>,std::allocator<std::pair<int,std::string>>>;

#endif
30 changes: 30 additions & 0 deletions include/WASimCommander_SDK-v1.2.0.0/enums.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
This file is part of the WASimCommander project.
https://github.com/mpaperno/WASimCommander
COPYRIGHT: (c) Maxim Paperno; All Rights Reserved.
This file may be used under the terms of either the GNU General Public License (GPL)
or the GNU Lesser General Public License (LGPL), as published by the Free Software
Foundation, either version 3 of the Licenses, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
Copies of the GNU GPL and LGPL are included with this project
and are available at <http://www.gnu.org/licenses/>.
*/

#pragma once

#ifdef WSMCMND_ENUM_EXPORT
#undef WSMCMND_ENUM_EXPORT
#undef WSMCMND_ENUM_NAMESPACE
#endif

#define WSMCMND_ENUM_EXPORT
#define WSMCMND_ENUM_NAMESPACE WASimCommander::Enums

#include "./enums_impl.h"
Loading

0 comments on commit 253b17d

Please sign in to comment.