Skip to content

Commit 9168324

Browse files
committed
Don't export header-only classes
Signed-off-by: Adam Glustein <[email protected]>
1 parent eb659d8 commit 9168324

19 files changed

+32
-32
lines changed

cpp/csp/core/BasicAllocator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ namespace csp
1515
{
1616

1717
// Extremely basic non-thread safe fixed-size allocator
18-
class CSPCORE_EXPORT BasicAllocator
18+
class BasicAllocator
1919
{
2020
public:
2121
//elemsize is size of a single alloc, blockSize is number of elements to

cpp/csp/core/DynamicBitSet.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace csp
99
{
1010

1111
template<typename NodeT = uint64_t, typename IndexT = int32_t>
12-
class CSPCORE_EXPORT DynamicBitSet
12+
class DynamicBitSet
1313
{
1414

1515
public:

cpp/csp/core/Enum.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ bool UnknownOnInvalidValue(long) { return false; }
7373

7474
START_PACKED
7575
template<typename EnumTraits>
76-
struct CSPCORE_EXPORT Enum : public EnumTraits
76+
struct CSP_PUBLIC Enum : public EnumTraits // need to export for autogen build
7777
{
7878
using EnumV = typename EnumTraits::_enum;
7979
using Mapping = std::vector<std::string>;

cpp/csp/core/EnumBitSet.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace csp
1414
//Utility class to hold enums as a bitmask ( where enum values are incremental from 0 )
1515
//enum must have a NUM_TYPES entry for number of entries
1616
template< typename EnumT >
17-
class CSPCORE_EXPORT EnumBitSet
17+
class EnumBitSet
1818
{
1919
using value_type = uint64_t;
2020

cpp/csp/core/Exception.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
namespace csp
1111
{
1212

13-
class CSP_PUBLIC Exception : public std::exception
13+
class CSPCORE_EXPORT Exception : public std::exception
1414
{
1515
public:
1616
Exception( const char * exType, const std::string & description, const char * file, const char * func, int line ) :

cpp/csp/core/Generator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
namespace csp
88
{
99
template< typename V, typename ...Args >
10-
class CSPCORE_EXPORT Generator
10+
class Generator
1111
{
1212
public:
1313
using Ptr = std::shared_ptr<Generator<V, Args...>>;

cpp/csp/core/QueueWaiter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace csp
1414

1515
class TimeDelta;
1616

17-
class CSPCORE_EXPORT QueueWaiter
17+
class QueueWaiter
1818
{
1919
public:
2020
QueueWaiter() : m_eventsPending( false )

cpp/csp/core/TaggedPointerUnion.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ struct IndexOf<T, TypeList<TOther, Ts...> >
2626

2727

2828
template<typename... Ts>
29-
class CSPCORE_EXPORT TaggedPointerUnion
29+
class TaggedPointerUnion
3030
{
3131
public:
3232
static inline constexpr size_t NUM_TAGS = sizeof...(Ts);

cpp/csp/core/Time.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const int64_t NANOS_PER_SECOND = 1000000000;
2121
const int64_t SECONDS_PER_DAY = 86400;
2222
const int64_t NANOS_PER_DAY = NANOS_PER_SECOND * SECONDS_PER_DAY;
2323

24-
class CSPCORE_EXPORT TimeDelta
24+
class TimeDelta
2525
{
2626
public:
2727
constexpr TimeDelta() : TimeDelta( TimeDelta::NONE() ) {}
@@ -165,7 +165,7 @@ inline std::ostream & operator <<( std::ostream &os, const TimeDelta & d )
165165
return os;
166166
}
167167

168-
class CSPCORE_EXPORT Date
168+
class Date
169169
{
170170
public:
171171
Date() : Date( NONE() ) {}
@@ -316,7 +316,7 @@ inline std::ostream & operator <<( std::ostream &os, const Date & d )
316316
return os;
317317
}
318318

319-
class CSPCORE_EXPORT Time
319+
class Time
320320
{
321321
public:
322322
Time() : Time( -1 ) {} //NONE
@@ -597,7 +597,7 @@ inline std::ostream & operator <<( std::ostream &os, const DateTime & dt )
597597
//Helper class to extract day/month/year/etc info from raw timestamp
598598
//ie DateTimeEx dte( existingDt )
599599
//dte.day, etc etc
600-
class CSPCORE_EXPORT DateTimeEx : public DateTime
600+
class DateTimeEx : public DateTime
601601
{
602602
public:
603603
DateTimeEx( const DateTime & dt );

cpp/csp/engine/AlarmInputAdapter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace csp
99
{
1010

1111
template<typename T>
12-
class CSPENGINE_EXPORT AlarmInputAdapter final : public InputAdapter
12+
class AlarmInputAdapter final : public InputAdapter
1313
{
1414
public:
1515
AlarmInputAdapter( Engine * engine, CspTypePtr & type ) : InputAdapter( engine, type, PushMode::NON_COLLAPSING )

cpp/csp/engine/CppNode.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ namespace csp
1313

1414
//CppNode is used specifically for C++ defined Nodes, and should only be used
1515
//for definig c++ nodes using the macros defined at the end
16-
class CSPENGINE_EXPORT CppNode : public csp::Node
16+
class CppNode : public csp::Node
1717
{
1818
public:
1919
using Shape = std::variant<std::uint64_t,std::vector<std::string>>;

cpp/csp/engine/Feedback.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ template<typename T>
1212
class FeedbackInputAdapter;
1313

1414
template<typename T>
15-
class CSPENGINE_EXPORT FeedbackOutputAdapter final : public OutputAdapter
15+
class FeedbackOutputAdapter final : public OutputAdapter
1616
{
1717
public:
1818
FeedbackOutputAdapter( csp::Engine * engine,
@@ -29,7 +29,7 @@ class CSPENGINE_EXPORT FeedbackOutputAdapter final : public OutputAdapter
2929
};
3030

3131
template<typename T>
32-
class CSPENGINE_EXPORT FeedbackInputAdapter final : public InputAdapter
32+
class FeedbackInputAdapter final : public InputAdapter
3333
{
3434
public:
3535
using InputAdapter::InputAdapter;

cpp/csp/engine/Profiler.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
namespace csp
1414
{
1515

16-
class CSPENGINE_EXPORT Profiler
16+
class Profiler
1717
{
1818
// All times are returned as doubles representing time in seconds
1919

cpp/csp/engine/PullInputAdapter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace csp
1010
{
1111

1212
template<typename T>
13-
class CSPENGINE_EXPORT PullInputAdapter : public InputAdapter
13+
class PullInputAdapter : public InputAdapter
1414
{
1515
public:
1616
PullInputAdapter( Engine * engine, CspTypePtr & type, PushMode pushMode ) : InputAdapter( engine, type, pushMode )

cpp/csp/engine/PushEvent.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace csp
99

1010
class PushInputAdapter;
1111

12-
struct CSPENGINE_EXPORT PushEvent
12+
struct PushEvent
1313
{
1414
PushEvent( PushInputAdapter *adapter ) : m_adapter( adapter ), next( nullptr )
1515
{}
@@ -26,7 +26,7 @@ struct CSPENGINE_EXPORT PushEvent
2626
};
2727

2828
template<typename T>
29-
struct CSPENGINE_EXPORT TypedPushEvent : public PushEvent
29+
struct TypedPushEvent : public PushEvent
3030
{
3131
TypedPushEvent( PushInputAdapter *adapter,
3232
T &&d ) : PushEvent( adapter ),

cpp/csp/engine/PushInputAdapter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ class PushBatch : public SRMWLockFreeQueue<PushEvent>::Batch
7676
PushGroup * m_group; //used for assertion check
7777
};
7878

79-
class CSPENGINE_EXPORT PushInputAdapter : public InputAdapter
79+
class PushInputAdapter : public InputAdapter
8080
{
8181
public:
8282
PushInputAdapter( Engine * engine, CspTypePtr & type, PushMode pushMode,

cpp/csp/engine/Struct.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ class CSPTYPES_EXPORT StructField
114114
using StructFieldPtr = std::shared_ptr<StructField>;
115115

116116
template<typename T>
117-
class CSPTYPES_EXPORT NativeStructField : public StructField
117+
class NativeStructField : public StructField
118118
{
119119
static_assert( CspType::Type::fromCType<T>::type <= CspType::Type::MAX_NATIVE_TYPE );
120120
static_assert( sizeof(T) == alignof(T) );
@@ -177,15 +177,15 @@ using TimeDeltaStructField = NativeStructField<TimeDelta>;
177177
using DateStructField = NativeStructField<Date>;
178178
using TimeStructField = NativeStructField<Time>;
179179

180-
class CSPTYPES_EXPORT CspEnumStructField final : public NativeStructField<CspEnum>
180+
class CspEnumStructField final : public NativeStructField<CspEnum>
181181
{
182182
public:
183183
CspEnumStructField( CspTypePtr type, const std::string & fieldname ) : NativeStructField( type, fieldname )
184184
{}
185185
};
186186

187187
template<typename T>
188-
class CSPTYPES_EXPORT NotImplementedStructField : public StructField
188+
class NotImplementedStructField : public StructField
189189
{
190190
public:
191191
const T & value( const Struct * s ) const
@@ -216,7 +216,7 @@ class CSPTYPES_EXPORT NotImplementedStructField : public StructField
216216

217217

218218
//Non-native fields need to have these specialized in dialect-specific code
219-
class CSPTYPES_EXPORT NonNativeStructField : public StructField
219+
class NonNativeStructField : public StructField
220220
{
221221
public:
222222
NonNativeStructField( CspTypePtr type, const std::string &fieldname, size_t size, size_t alignment ) :
@@ -240,7 +240,7 @@ class CSPTYPES_EXPORT NonNativeStructField : public StructField
240240
virtual void clearValueImpl( Struct * s ) const = 0;
241241
};
242242

243-
class CSPTYPES_EXPORT StringStructField final : public NonNativeStructField
243+
class StringStructField final : public NonNativeStructField
244244
{
245245
public:
246246
using CType = csp::CspType::StringCType;
@@ -310,7 +310,7 @@ class CSPTYPES_EXPORT StringStructField final : public NonNativeStructField
310310
};
311311

312312
template<typename CType>
313-
class CSPTYPES_EXPORT ArrayStructField : public NonNativeStructField
313+
class ArrayStructField : public NonNativeStructField
314314
{
315315
using ElemT = typename CType::value_type;
316316

@@ -419,7 +419,7 @@ class CSPTYPES_EXPORT ArrayStructField : public NonNativeStructField
419419
}
420420
};
421421

422-
class CSPTYPES_EXPORT DialectGenericStructField : public NonNativeStructField
422+
class DialectGenericStructField : public NonNativeStructField
423423
{
424424
public:
425425
DialectGenericStructField( const std::string & fieldname, size_t size, size_t alignment ) :
@@ -479,7 +479,7 @@ class CSPTYPES_EXPORT DialectGenericStructField : public NonNativeStructField
479479
};
480480

481481
template<typename T>
482-
class CSPTYPES_EXPORT TypedStructPtr
482+
class TypedStructPtr
483483
{
484484
public:
485485
TypedStructPtr() : m_obj( nullptr ) {}
@@ -817,7 +817,7 @@ bool TypedStructPtr<T>::operator==( const TypedStructPtr<T> & rhs ) const
817817
}
818818

819819
//field that is another struct
820-
class CSPTYPES_EXPORT StructStructField final : public NonNativeStructField
820+
class StructStructField final : public NonNativeStructField
821821
{
822822
public:
823823
StructStructField( CspTypePtr cspType, const std::string &fieldname ) :

cpp/csp/engine/TickBuffer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ namespace csp
1717
{
1818

1919
template< typename T >
20-
class CSPTYPESIMPL_EXPORT TickBuffer
20+
class TickBuffer
2121
{
2222
public:
2323
TickBuffer( uint32_t capacity = 1 );

cpp/csp/engine/WindowBuffer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ namespace csp
1616
// Class declarations
1717

1818
template<typename T>
19-
class CSPENGINE_EXPORT WindowBuffer
19+
class WindowBuffer
2020
{
2121
public:
2222
WindowBuffer();

0 commit comments

Comments
 (0)