Browse Source

Die neuen funktionen werden jetzt auch in die DLL Datei exportiert

kolja 5 years ago
parent
commit
edd10887a2
1 changed files with 39 additions and 39 deletions
  1. 39 39
      JSON.h

+ 39 - 39
JSON.h

@@ -26,12 +26,12 @@ namespace Framework
             JSONType type;
 
         protected:
-            JSONValue( JSONType type );
+            __declspec( dllexport ) JSONValue( JSONType type );
 
         public:
-            JSONValue();
-            JSONType getType() const;
-            virtual Text toString() const;
+            __declspec( dllexport ) JSONValue();
+            __declspec( dllexport ) JSONType getType() const;
+            __declspec( dllexport ) virtual Text toString() const;
         };
 
         class JSONBool : public JSONValue
@@ -40,10 +40,10 @@ namespace Framework
             bool b;
 
         public: 
-            JSONBool( bool b );
+            __declspec( dllexport ) JSONBool( bool b );
 
-            bool getBool() const;
-            Text toString() const override;
+            __declspec( dllexport ) bool getBool() const;
+            __declspec( dllexport ) Text toString() const override;
         };
 
         class JSONNumber : public JSONValue
@@ -52,10 +52,10 @@ namespace Framework
             double number;
 
         public:
-            JSONNumber( double num );
+            __declspec( dllexport ) JSONNumber( double num );
 
-            double getNumber() const;
-            Text toString() const override;
+            __declspec( dllexport ) double getNumber() const;
+            __declspec( dllexport ) Text toString() const override;
         };
 
         class JSONString : public JSONValue
@@ -64,10 +64,10 @@ namespace Framework
             Text string;
 
         public:
-            JSONString( Text string );
+            __declspec( dllexport ) JSONString( Text string );
 
-            Text getString() const;
-            Text toString() const override;
+            __declspec( dllexport ) Text getString() const;
+            __declspec( dllexport ) Text toString() const override;
         };
 
         class JSONArray : public JSONValue
@@ -76,18 +76,18 @@ namespace Framework
             Array< JSONValue > *array;
 
         public:
-            JSONArray();
-            JSONArray( Text string );
-            JSONArray( const JSONArray &arr );
-            ~JSONArray();
+            __declspec( dllexport ) JSONArray();
+            __declspec( dllexport ) JSONArray( Text string );
+            __declspec( dllexport ) JSONArray( const JSONArray &arr );
+            __declspec( dllexport ) ~JSONArray();
 
-            JSONArray &operator=( const JSONArray &arr );
+            __declspec( dllexport ) JSONArray &operator=( const JSONArray &arr );
 
-            void addValue( JSONValue value );
-            JSONValue getValue( int i ) const;
-            int getLength() const;
+            __declspec( dllexport ) void addValue( JSONValue value );
+            __declspec( dllexport ) JSONValue getValue( int i ) const;
+            __declspec( dllexport ) int getLength() const;
 
-            Text toString() const override;
+            __declspec( dllexport ) Text toString() const override;
         };
 
         class JSONObject : public JSONValue
@@ -97,30 +97,30 @@ namespace Framework
             Array< JSONValue > *values;
 
         public:
-            JSONObject();
-            JSONObject( Text string );
-            JSONObject( const JSONObject &obj );
-            ~JSONObject();
+            __declspec( dllexport ) JSONObject();
+            __declspec( dllexport ) JSONObject( Text string );
+            __declspec( dllexport ) JSONObject( const JSONObject &obj );
+            __declspec( dllexport ) ~JSONObject();
 
-            JSONObject &operator=( const JSONObject &obj );
+            __declspec( dllexport ) JSONObject &operator=( const JSONObject &obj );
 
-            bool addValue( Text field, JSONValue value );
-            bool removeValue( Text field );
-            bool hasValue( Text field );
-            JSONValue getValue( Text field );
-            Iterator< Text > getFields();
-            Iterator< JSONValue > getValues();
+            __declspec( dllexport ) bool addValue( Text field, JSONValue value );
+            __declspec( dllexport ) bool removeValue( Text field );
+            __declspec( dllexport ) bool hasValue( Text field );
+            __declspec( dllexport ) JSONValue getValue( Text field );
+            __declspec( dllexport ) Iterator< Text > getFields();
+            __declspec( dllexport ) Iterator< JSONValue > getValues();
 
-            Text toString() const override;
+            __declspec( dllexport ) Text toString() const override;
         };
 
         namespace Parser
         {
-            int findObjectEndInArray( const char *str );
-            Text removeWhitespace( const char *str );
-            JSONValue getValue( const char *str );
-            int findFieldEndInObject( const char *str );
-            int findValueEndInObject( const char *str );
+            __declspec( dllexport ) int findObjectEndInArray( const char *str );
+            __declspec( dllexport ) Text removeWhitespace( const char *str );
+            __declspec( dllexport ) JSONValue getValue( const char *str );
+            __declspec( dllexport ) int findFieldEndInObject( const char *str );
+            __declspec( dllexport ) int findValueEndInObject( const char *str );
         };
     }
 }