KIID kicommon

This commit is contained in:
Marek Roszko 2023-09-14 19:21:43 -04:00
parent cb7d7b09e3
commit 285f8c0b88
3 changed files with 12 additions and 8 deletions

View File

@ -205,6 +205,8 @@ if( MSVC )
# set( WARN_FLAGS_C "/external:W0 /external:env:INCLUDE /external:I${CMAKE_SOURCE_DIR}/thirdparty /Wall" )
set( WARN_FLAGS_CXX "/external:W0 /external:env:INCLUDE /external:I${CMAKE_SOURCE_DIR}/thirdparty /Wall" )
# disable 'type' : class 'type1' needs to have dll-interface to be used by clients of class 'type2'
string( APPEND WARN_FLAGS_CXX " /wd4251" )
# disable "function not inlined"
string( APPEND WARN_FLAGS_CXX " /wd4710" )
# disable "function selected for inline expansion"

View File

@ -48,6 +48,7 @@ set( KICOMMON_SRCS
array_options.cpp
bitmap_info.cpp
exceptions.cpp
kiid.cpp
lib_id.cpp
locale_io.cpp
markup_parser.cpp
@ -64,6 +65,7 @@ target_link_libraries( kicommon
core
kimath
kiplatform
nlohmann_json
fmt::fmt
${wxWidgets_LIBRARIES}
)
@ -403,7 +405,6 @@ set( COMMON_SRCS
hotkey_store.cpp
hotkeys_basic.cpp
kiface_base.cpp
kiid.cpp
kiway.cpp
kiway_express.cpp
kiway_holder.cpp

View File

@ -26,6 +26,7 @@
#ifndef KIID_H
#define KIID_H
#include <kicommon.h>
#include <boost/uuid/uuid.hpp>
#include <macros_swig.h>
#include <nlohmann/json_fwd.hpp>
@ -44,7 +45,7 @@ class wxString;
*/
typedef uint32_t timestamp_t;
class KIID
class KICOMMON_API KIID
{
public:
KIID();
@ -129,14 +130,14 @@ private:
};
extern KIID niluuid;
extern KICOMMON_API KIID niluuid;
KIID& NilUuid();
KICOMMON_API KIID& NilUuid();
// declare KIID_VECT_LIST as std::vector<KIID> both for c++ and swig:
DECL_VEC_FOR_SWIG( KIID_VECT_LIST, KIID )
class KIID_PATH : public KIID_VECT_LIST
class KICOMMON_API KIID_PATH : public KIID_VECT_LIST
{
public:
KIID_PATH()
@ -195,7 +196,7 @@ public:
/**
* RAII class to safely set/reset nil KIIDs for use in footprint/symbol loading
*/
class KIID_NIL_SET_RESET
class KICOMMON_API KIID_NIL_SET_RESET
{
public:
KIID_NIL_SET_RESET()
@ -209,8 +210,8 @@ public:
}
};
void to_json( nlohmann::json& aJson, const KIID& aKIID );
KICOMMON_API void to_json( nlohmann::json& aJson, const KIID& aKIID );
void from_json( const nlohmann::json& aJson, KIID& aKIID );
KICOMMON_API void from_json( const nlohmann::json& aJson, KIID& aKIID );
#endif // KIID_H