Skip to content

Commit

Permalink
Move things from csptypesimpl export to cspimpl
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Glustein <[email protected]>
  • Loading branch information
AdamGlustein committed Nov 8, 2024
1 parent 512a6fd commit a7db4af
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 26 deletions.
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 CSPTYPESIMPL_EXPORT Enum : public EnumTraits
struct CSPIMPL_EXPORT Enum : public EnumTraits
{
using EnumV = typename EnumTraits::_enum;
using Mapping = std::vector<std::string>;
Expand Down
10 changes: 5 additions & 5 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 CSPTYPESIMPL_EXPORT TimeDelta
class CSPIMPL_EXPORT 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 CSPTYPESIMPL_EXPORT Date
class CSPIMPL_EXPORT 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 CSPTYPESIMPL_EXPORT Time
class CSPIMPL_EXPORT Time
{
public:
Time() : Time( -1 ) {} //NONE
Expand Down Expand Up @@ -446,7 +446,7 @@ inline std::ostream & operator <<( std::ostream &os, const Time & t )

// Time is internally stored as an int64_t nanoseconds since 1970.
// All DateTime objects are stored as UTC and should be treated as such
class CSPTYPESIMPL_EXPORT DateTime
class CSPIMPL_EXPORT DateTime
{
public:
DateTime() : DateTime( DateTime::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 CSPTYPESIMPL_EXPORT DateTimeEx : public DateTime
class CSPIMPL_EXPORT DateTimeEx : public DateTime
{
public:
DateTimeEx( const DateTime & dt );
Expand Down
6 changes: 3 additions & 3 deletions cpp/csp/engine/CspEnum.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace csp

class CspEnumMeta;

class CSPTYPESIMPL_EXPORT CspEnumInstance
class CSPIMPL_EXPORT CspEnumInstance
{
public:
CspEnumInstance( std::string name, int64_t value, csp::CspEnumMeta * meta ) : m_name( name ), m_value( value ), m_meta( meta ) {}
Expand All @@ -35,7 +35,7 @@ class CSPTYPESIMPL_EXPORT CspEnumInstance

//As an optimization we do NOT attach meta or value to every instance of an enum. Instead, the enum
//holds only a pointer to a singleton CspEnumInstance, which holds the value, name, and meta pointer.
class CSPTYPESIMPL_EXPORT CspEnum
class CSPIMPL_EXPORT CspEnum
{
public:
CspEnum();
Expand All @@ -59,7 +59,7 @@ class CSPTYPESIMPL_EXPORT CspEnum

std::ostream &operator<<( std::ostream &os, const CspEnum & rhs );

class CSPTYPESIMPL_EXPORT CspEnumMeta
class CSPIMPL_EXPORT CspEnumMeta
{
public:
using ValueDef = std::unordered_map<std::string,int64_t>;
Expand Down
10 changes: 5 additions & 5 deletions cpp/csp/engine/CspType.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace csp

class CspStringType;

class CSPTYPESIMPL_EXPORT CspType
class CSPIMPL_EXPORT CspType
{
public:

Expand Down Expand Up @@ -116,7 +116,7 @@ class CSPTYPESIMPL_EXPORT CspType
Type m_type;
};

class CSPTYPESIMPL_EXPORT CspStringType : public CspType
class CSPIMPL_EXPORT CspStringType : public CspType
{
public:
CspStringType(bool isBytes)
Expand All @@ -135,7 +135,7 @@ class CspEnum;

class CspEnumMeta;

class CSPTYPESIMPL_EXPORT CspEnumType : public CspType
class CSPIMPL_EXPORT CspEnumType : public CspType
{
public:
CspEnumType( std::shared_ptr<CspEnumMeta> & meta ) : CspType( CspType::Type::ENUM ),
Expand All @@ -155,7 +155,7 @@ using StructPtr = TypedStructPtr<Struct>;

class StructMeta;

class CSPTYPESIMPL_EXPORT CspStructType : public CspType
class CSPIMPL_EXPORT CspStructType : public CspType
{
public:
CspStructType( const std::shared_ptr<StructMeta> & meta ) : CspType( CspType::Type::STRUCT ),
Expand All @@ -168,7 +168,7 @@ class CSPTYPESIMPL_EXPORT CspStructType : public CspType
std::shared_ptr<StructMeta> m_meta;
};

class CSPTYPESIMPL_EXPORT CspArrayType : public CspType
class CSPIMPL_EXPORT CspArrayType : public CspType
{
public:
CspArrayType( CspTypePtr elemType, bool isPyStructFastList = false ) :
Expand Down
24 changes: 12 additions & 12 deletions cpp/csp/engine/Struct.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class TypedStructPtr;

using StructPtr = TypedStructPtr<Struct>;

class CSPTYPESIMPL_EXPORT StructField
class CSPIMPL_EXPORT StructField
{
public:

Expand Down Expand Up @@ -114,7 +114,7 @@ class CSPTYPESIMPL_EXPORT StructField
using StructFieldPtr = std::shared_ptr<StructField>;

template<typename T>
class CSPTYPESIMPL_EXPORT NativeStructField : public StructField
class CSPIMPL_EXPORT 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 CSPTYPESIMPL_EXPORT CspEnumStructField final : public NativeStructField<CspEnum>
class CSPIMPL_EXPORT CspEnumStructField final : public NativeStructField<CspEnum>
{
public:
CspEnumStructField( CspTypePtr type, const std::string & fieldname ) : NativeStructField( type, fieldname )
{}
};

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


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

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

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

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

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

template<typename T>
class CSPTYPESIMPL_EXPORT TypedStructPtr
class CSPIMPL_EXPORT TypedStructPtr
{
public:
TypedStructPtr() : m_obj( nullptr ) {}
Expand Down Expand Up @@ -581,7 +581,7 @@ TypedStructPtr<T> structptr_cast( const TypedStructPtr<U> & r )
return out;
}

class CSPTYPESIMPL_EXPORT StructMeta : public std::enable_shared_from_this<StructMeta>
class CSPIMPL_EXPORT StructMeta : public std::enable_shared_from_this<StructMeta>
{
public:
using Fields = std::vector<StructFieldPtr>;
Expand Down Expand Up @@ -685,7 +685,7 @@ std::shared_ptr<typename StructField::upcast<T>::type> StructMeta::getMetaField(

using StructMetaPtr = std::shared_ptr<StructMeta>;

class CSPTYPESIMPL_EXPORT Struct
class CSPIMPL_EXPORT Struct
{
public:

Expand Down Expand Up @@ -817,7 +817,7 @@ bool TypedStructPtr<T>::operator==( const TypedStructPtr<T> & rhs ) const
}

//field that is another struct
class CSPTYPESIMPL_EXPORT StructStructField final : public NonNativeStructField
class CSPIMPL_EXPORT StructStructField final : public NonNativeStructField
{
public:
StructStructField( CspTypePtr cspType, const std::string &fieldname ) :
Expand Down

0 comments on commit a7db4af

Please sign in to comment.