diff options
Diffstat (limited to 'fpdfsdk/javascript/JS_GlobalData.h')
-rw-r--r-- | fpdfsdk/javascript/JS_GlobalData.h | 41 |
1 files changed, 2 insertions, 39 deletions
diff --git a/fpdfsdk/javascript/JS_GlobalData.h b/fpdfsdk/javascript/JS_GlobalData.h index 8273c0838c..d901ec58b3 100644 --- a/fpdfsdk/javascript/JS_GlobalData.h +++ b/fpdfsdk/javascript/JS_GlobalData.h @@ -11,49 +11,14 @@ #include <vector> #include "core/fxcrt/include/fx_basic.h" +#include "fpdfsdk/javascript/JS_KeyValue.h" -#define JS_GLOBALDATA_TYPE_NUMBER 0 -#define JS_GLOBALDATA_TYPE_BOOLEAN 1 -#define JS_GLOBALDATA_TYPE_STRING 2 -#define JS_GLOBALDATA_TYPE_OBJECT 3 -#define JS_GLOBALDATA_TYPE_NULL 4 - -class CJS_KeyValue; class CPDFDoc_Environment; -class CJS_GlobalVariableArray { - public: - CJS_GlobalVariableArray(); - virtual ~CJS_GlobalVariableArray(); - - void Add(CJS_KeyValue* p); - int Count() const; - CJS_KeyValue* GetAt(int index) const; - void Copy(const CJS_GlobalVariableArray& array); - - void Empty(); - - private: - CFX_ArrayTemplate<CJS_KeyValue*> m_Array; -}; - -class CJS_KeyValue { - public: - CJS_KeyValue(); - virtual ~CJS_KeyValue(); - - CFX_ByteString sKey; - int nType; // 0:int 1:bool 2:string 3:obj - double dData; - bool bData; - CFX_ByteString sData; - CJS_GlobalVariableArray objData; -}; - class CJS_GlobalData_Element { public: CJS_GlobalData_Element() {} - virtual ~CJS_GlobalData_Element() {} + ~CJS_GlobalData_Element() {} CJS_KeyValue data; FX_BOOL bPersistent; @@ -84,8 +49,6 @@ class CJS_GlobalData { using const_iterator = std::vector<std::unique_ptr<CJS_GlobalData_Element>>::const_iterator; - static CJS_GlobalData* g_Instance; - CJS_GlobalData(); ~CJS_GlobalData(); |