New utility library

This commit is contained in:
Paul Licameli 2021-02-17 12:49:31 -05:00
parent 094675bd42
commit 64d7ca7403
12 changed files with 37 additions and 8 deletions

View File

@ -5,6 +5,7 @@
set( LIBRARIES
"lib-string-utils"
lib-strings
lib-utility
)
if ( ${_OPT}has_networking )

View File

@ -0,0 +1,25 @@
#[[
A small library defining various constants and utilities
No dependencies on wxWidgets. Very few if any symbols with linkage.
One very important utility is finally() as defined in The C++ Programming
Language, fourth edition, for describing ad-hoc RAII actions.
Historically, MemoryX.h began as a wrapper of C++11 <memory>, which by itself
did not yet provide std::make_unique. That explains the name.
Audacity now uses C++14, and yet, need arose for other anticipations of
future standards, such as with optional. It also provides other pervasively
used utilities that don't correspond to things in the standard.
]]#
set( SOURCES
MemoryX.cpp
MemoryX.h
ModuleConstants.h
)
audacity_library( lib-utility "${SOURCES}" ""
"" ""
)

View File

@ -0,0 +1,5 @@
#include "MemoryX.h"
// Make the symbol table non-empty
UTILITY_API void lib_utility_dummy_symbol()
{}

View File

@ -180,14 +180,12 @@ list( APPEND SOURCES
MacroMagic.h
Matrix.cpp
Matrix.h
MemoryX.h
Menus.cpp
Menus.h
Mix.cpp
Mix.h
MixerBoard.cpp
MixerBoard.h
ModuleConstants.h
ModuleManager.cpp
ModuleManager.h
ModuleSettings.cpp

View File

@ -45,7 +45,7 @@ a certain criterion. This is a base validator which allows anything.
class wxArrayString;
#include "../MemoryX.h"
#include "MemoryX.h"
#include <wx/variant.h> // member variable

View File

@ -31,7 +31,7 @@
#include <AudioUnit/AudioUnitCarbonView.h>
#endif
#include "../../MemoryX.h"
#include "MemoryX.h"
@interface AUView : NSView
{

View File

@ -14,7 +14,7 @@
#if USE_AUDIO_UNITS
#include "../../MemoryX.h"
#include "MemoryX.h"
#include <vector>
#include <AudioToolbox/AudioUnitUtilities.h>

View File

@ -17,7 +17,7 @@
#include <wx/defs.h>
#include "ToolBar.h"
#include "../MemoryX.h"
#include "MemoryX.h"
class wxCommandEvent;
class wxEraseEvent;

View File

@ -27,7 +27,7 @@
#include <wx/settings.h>
#include <wx/toplevel.h>
#include "../MemoryX.h"
#include "MemoryX.h"
#include "../SelectedRegion.h"
#if wxUSE_ACCESSIBILITY

View File

@ -10,7 +10,7 @@
#include "OverlayPanel.h"
#include "Overlay.h"
#include "../MemoryX.h"
#include "MemoryX.h"
#include <algorithm>
#include <wx/dcclient.h>