Skip to content

Commit

Permalink
Don't export header-only classes
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Glustein <[email protected]>
  • Loading branch information
AdamGlustein committed Nov 11, 2024
1 parent eb659d8 commit 9168324
Show file tree
Hide file tree
Showing 19 changed files with 32 additions and 32 deletions.
2 changes: 1 addition & 1 deletion cpp/csp/core/BasicAllocator.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace csp
{

// Extremely basic non-thread safe fixed-size allocator
class CSPCORE_EXPORT BasicAllocator
class BasicAllocator
{
public:
//elemsize is size of a single alloc, blockSize is number of elements to
Expand Down
2 changes: 1 addition & 1 deletion cpp/csp/core/DynamicBitSet.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace csp
{

template<typename NodeT = uint64_t, typename IndexT = int32_t>
class CSPCORE_EXPORT DynamicBitSet
class DynamicBitSet
{

public:
Expand Down
2 changes: 1 addition & 1 deletion cpp/csp/core/Enum.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ bool UnknownOnInvalidValue(long) { return false; }

START_PACKED
template<typename EnumTraits>
struct CSPCORE_EXPORT Enum : public EnumTraits
struct CSP_PUBLIC Enum : public EnumTraits // need to export for autogen build
{
using EnumV = typename EnumTraits::_enum;
using Mapping = std::vector<std::string>;
Expand Down
2 changes: 1 addition & 1 deletion cpp/csp/core/EnumBitSet.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace csp
//Utility class to hold enums as a bitmask ( where enum values are incremental from 0 )
//enum must have a NUM_TYPES entry for number of entries
template< typename EnumT >
class CSPCORE_EXPORT EnumBitSet
class EnumBitSet
{
using value_type = uint64_t;

Expand Down
2 changes: 1 addition & 1 deletion cpp/csp/core/Exception.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
namespace csp
{

class CSP_PUBLIC Exception : public std::exception
class CSPCORE_EXPORT Exception : public std::exception
{
public:
Exception( const char * exType, const std::string & description, const char * file, const char * func, int line ) :
Expand Down
2 changes: 1 addition & 1 deletion cpp/csp/core/Generator.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
namespace csp
{
template< typename V, typename ...Args >
class CSPCORE_EXPORT Generator
class Generator
{
public:
using Ptr = std::shared_ptr<Generator<V, Args...>>;
Expand Down
2 changes: 1 addition & 1 deletion cpp/csp/core/QueueWaiter.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace csp

class TimeDelta;

class CSPCORE_EXPORT QueueWaiter
class QueueWaiter
{
public:
QueueWaiter() : m_eventsPending( false )
Expand Down
2 changes: 1 addition & 1 deletion cpp/csp/core/TaggedPointerUnion.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ struct IndexOf<T, TypeList<TOther, Ts...> >


template<typename... Ts>
class CSPCORE_EXPORT TaggedPointerUnion
class TaggedPointerUnion
{
public:
static inline constexpr size_t NUM_TAGS = sizeof...(Ts);
Expand Down
8 changes: 4 additions & 4 deletions cpp/csp/core/Time.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const int64_t NANOS_PER_SECOND = 1000000000;
const int64_t SECONDS_PER_DAY = 86400;
const int64_t NANOS_PER_DAY = NANOS_PER_SECOND * SECONDS_PER_DAY;

class CSPCORE_EXPORT TimeDelta
class TimeDelta
{
public:
constexpr TimeDelta() : TimeDelta( TimeDelta::NONE() ) {}
Expand Down Expand Up @@ -165,7 +165,7 @@ inline std::ostream & operator <<( std::ostream &os, const TimeDelta & d )
return os;
}

class CSPCORE_EXPORT Date
class Date
{
public:
Date() : Date( NONE() ) {}
Expand Down Expand Up @@ -316,7 +316,7 @@ inline std::ostream & operator <<( std::ostream &os, const Date & d )
return os;
}

class CSPCORE_EXPORT Time
class Time
{
public:
Time() : Time( -1 ) {} //NONE
Expand Down Expand Up @@ -597,7 +597,7 @@ inline std::ostream & operator <<( std::ostream &os, const DateTime & dt )
//Helper class to extract day/month/year/etc info from raw timestamp
//ie DateTimeEx dte( existingDt )
//dte.day, etc etc
class CSPCORE_EXPORT DateTimeEx : public DateTime
class DateTimeEx : public DateTime
{
public:
DateTimeEx( const DateTime & dt );
Expand Down
2 changes: 1 addition & 1 deletion cpp/csp/engine/AlarmInputAdapter.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace csp
{

template<typename T>
class CSPENGINE_EXPORT AlarmInputAdapter final : public InputAdapter
class AlarmInputAdapter final : public InputAdapter
{
public:
AlarmInputAdapter( Engine * engine, CspTypePtr & type ) : InputAdapter( engine, type, PushMode::NON_COLLAPSING )
Expand Down
2 changes: 1 addition & 1 deletion cpp/csp/engine/CppNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace csp

//CppNode is used specifically for C++ defined Nodes, and should only be used
//for definig c++ nodes using the macros defined at the end
class CSPENGINE_EXPORT CppNode : public csp::Node
class CppNode : public csp::Node
{
public:
using Shape = std::variant<std::uint64_t,std::vector<std::string>>;
Expand Down
4 changes: 2 additions & 2 deletions cpp/csp/engine/Feedback.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ template<typename T>
class FeedbackInputAdapter;

template<typename T>
class CSPENGINE_EXPORT FeedbackOutputAdapter final : public OutputAdapter
class FeedbackOutputAdapter final : public OutputAdapter
{
public:
FeedbackOutputAdapter( csp::Engine * engine,
Expand All @@ -29,7 +29,7 @@ class CSPENGINE_EXPORT FeedbackOutputAdapter final : public OutputAdapter
};

template<typename T>
class CSPENGINE_EXPORT FeedbackInputAdapter final : public InputAdapter
class FeedbackInputAdapter final : public InputAdapter
{
public:
using InputAdapter::InputAdapter;
Expand Down
2 changes: 1 addition & 1 deletion cpp/csp/engine/Profiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
namespace csp
{

class CSPENGINE_EXPORT Profiler
class Profiler
{
// All times are returned as doubles representing time in seconds

Expand Down
2 changes: 1 addition & 1 deletion cpp/csp/engine/PullInputAdapter.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace csp
{

template<typename T>
class CSPENGINE_EXPORT PullInputAdapter : public InputAdapter
class PullInputAdapter : public InputAdapter
{
public:
PullInputAdapter( Engine * engine, CspTypePtr & type, PushMode pushMode ) : InputAdapter( engine, type, pushMode )
Expand Down
4 changes: 2 additions & 2 deletions cpp/csp/engine/PushEvent.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace csp

class PushInputAdapter;

struct CSPENGINE_EXPORT PushEvent
struct PushEvent
{
PushEvent( PushInputAdapter *adapter ) : m_adapter( adapter ), next( nullptr )
{}
Expand All @@ -26,7 +26,7 @@ struct CSPENGINE_EXPORT PushEvent
};

template<typename T>
struct CSPENGINE_EXPORT TypedPushEvent : public PushEvent
struct TypedPushEvent : public PushEvent
{
TypedPushEvent( PushInputAdapter *adapter,
T &&d ) : PushEvent( adapter ),
Expand Down
2 changes: 1 addition & 1 deletion cpp/csp/engine/PushInputAdapter.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class PushBatch : public SRMWLockFreeQueue<PushEvent>::Batch
PushGroup * m_group; //used for assertion check
};

class CSPENGINE_EXPORT PushInputAdapter : public InputAdapter
class PushInputAdapter : public InputAdapter
{
public:
PushInputAdapter( Engine * engine, CspTypePtr & type, PushMode pushMode,
Expand Down
18 changes: 9 additions & 9 deletions cpp/csp/engine/Struct.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class CSPTYPES_EXPORT StructField
using StructFieldPtr = std::shared_ptr<StructField>;

template<typename T>
class CSPTYPES_EXPORT NativeStructField : public StructField
class NativeStructField : public StructField
{
static_assert( CspType::Type::fromCType<T>::type <= CspType::Type::MAX_NATIVE_TYPE );
static_assert( sizeof(T) == alignof(T) );
Expand Down Expand Up @@ -177,15 +177,15 @@ using TimeDeltaStructField = NativeStructField<TimeDelta>;
using DateStructField = NativeStructField<Date>;
using TimeStructField = NativeStructField<Time>;

class CSPTYPES_EXPORT CspEnumStructField final : public NativeStructField<CspEnum>
class CspEnumStructField final : public NativeStructField<CspEnum>
{
public:
CspEnumStructField( CspTypePtr type, const std::string & fieldname ) : NativeStructField( type, fieldname )
{}
};

template<typename T>
class CSPTYPES_EXPORT NotImplementedStructField : public StructField
class NotImplementedStructField : public StructField
{
public:
const T & value( const Struct * s ) const
Expand Down Expand Up @@ -216,7 +216,7 @@ class CSPTYPES_EXPORT NotImplementedStructField : public StructField


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

class CSPTYPES_EXPORT StringStructField final : public NonNativeStructField
class StringStructField final : public NonNativeStructField
{
public:
using CType = csp::CspType::StringCType;
Expand Down Expand Up @@ -310,7 +310,7 @@ class CSPTYPES_EXPORT StringStructField final : public NonNativeStructField
};

template<typename CType>
class CSPTYPES_EXPORT ArrayStructField : public NonNativeStructField
class ArrayStructField : public NonNativeStructField
{
using ElemT = typename CType::value_type;

Expand Down Expand Up @@ -419,7 +419,7 @@ class CSPTYPES_EXPORT ArrayStructField : public NonNativeStructField
}
};

class CSPTYPES_EXPORT DialectGenericStructField : public NonNativeStructField
class DialectGenericStructField : public NonNativeStructField
{
public:
DialectGenericStructField( const std::string & fieldname, size_t size, size_t alignment ) :
Expand Down Expand Up @@ -479,7 +479,7 @@ class CSPTYPES_EXPORT DialectGenericStructField : public NonNativeStructField
};

template<typename T>
class CSPTYPES_EXPORT TypedStructPtr
class TypedStructPtr
{
public:
TypedStructPtr() : m_obj( nullptr ) {}
Expand Down Expand Up @@ -817,7 +817,7 @@ bool TypedStructPtr<T>::operator==( const TypedStructPtr<T> & rhs ) const
}

//field that is another struct
class CSPTYPES_EXPORT StructStructField final : public NonNativeStructField
class StructStructField final : public NonNativeStructField
{
public:
StructStructField( CspTypePtr cspType, const std::string &fieldname ) :
Expand Down
2 changes: 1 addition & 1 deletion cpp/csp/engine/TickBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace csp
{

template< typename T >
class CSPTYPESIMPL_EXPORT TickBuffer
class TickBuffer
{
public:
TickBuffer( uint32_t capacity = 1 );
Expand Down
2 changes: 1 addition & 1 deletion cpp/csp/engine/WindowBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace csp
// Class declarations

template<typename T>
class CSPENGINE_EXPORT WindowBuffer
class WindowBuffer
{
public:
WindowBuffer();
Expand Down

0 comments on commit 9168324

Please sign in to comment.