OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #ifndef _UTIL_H_ | 7 #ifndef _UTIL_H_ |
8 #define _UTIL_H_ | 8 #define _UTIL_H_ |
9 | 9 |
10 class util : public CJS_EmbedObj | 10 class util : public CJS_EmbedObj |
11 { | 11 { |
12 public: | 12 public: |
13 util(CJS_Object * pJSObject); | 13 util(CJS_Object * pJSObject); |
14 virtual ~util(void); | 14 virtual ~util(void); |
15 | 15 |
16 public: | 16 public: |
17 » FX_BOOL printd(OBJ_METHOD_PARAMS); | 17 » FX_BOOL printd(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Valu
e& vRet, JS_ErrorString& sError); |
18 » FX_BOOL printf(OBJ_METHOD_PARAMS); | 18 » FX_BOOL printf(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Valu
e& vRet, JS_ErrorString& sError); |
19 » FX_BOOL printx(OBJ_METHOD_PARAMS); | 19 » FX_BOOL printx(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Valu
e& vRet, JS_ErrorString& sError); |
20 » FX_BOOL scand(OBJ_METHOD_PARAMS); | 20 » FX_BOOL scand(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value
& vRet, JS_ErrorString& sError); |
21 » FX_BOOL byteToChar(OBJ_METHOD_PARAMS); | 21 » FX_BOOL byteToChar(IFXJS_Context* cc, const CJS_Parameters& params, CJS_
Value& vRet, JS_ErrorString& sError); |
22 | 22 |
23 public: | 23 public: |
24 static void printd(const std::wstring &cFormat,CJS_Date Date
,bool bXFAPicture, std::wstring &cPurpose); | 24 static void printd(const std::wstring &cFormat,CJS_Date Date
,bool bXFAPicture, std::wstring &cPurpose); |
25 static void printx(const std::string &cFormat,const std::str
ing &cSource, std::string &cPurpose); | 25 static void printx(const std::string &cFormat,const std::str
ing &cSource, std::string &cPurpose); |
26 static int ParstDataType(std::wstring* sFormat); | 26 static int ParstDataType(std::wstring* sFormat); |
27 }; | 27 }; |
28 | 28 |
29 class CJS_Util : public CJS_Object | 29 class CJS_Util : public CJS_Object |
30 { | 30 { |
31 public: | 31 public: |
32 CJS_Util(JSFXObject pObject) : CJS_Object(pObject) {}; | 32 CJS_Util(JSFXObject pObject) : CJS_Object(pObject) {}; |
33 virtual ~CJS_Util(void){}; | 33 virtual ~CJS_Util(void){}; |
34 | 34 |
35 DECLARE_JS_CLASS(CJS_Util); | 35 DECLARE_JS_CLASS(CJS_Util); |
36 | 36 |
37 JS_STATIC_METHOD(printd, util); | 37 JS_STATIC_METHOD(printd, util); |
38 JS_STATIC_METHOD(printf, util); | 38 JS_STATIC_METHOD(printf, util); |
39 JS_STATIC_METHOD(printx, util); | 39 JS_STATIC_METHOD(printx, util); |
40 JS_STATIC_METHOD(scand, util); | 40 JS_STATIC_METHOD(scand, util); |
41 JS_STATIC_METHOD(byteToChar, util); | 41 JS_STATIC_METHOD(byteToChar, util); |
42 }; | 42 }; |
43 | 43 |
44 FX_INT64 FX_atoi64(const char *nptr); | 44 FX_INT64 FX_atoi64(const char *nptr); |
45 #endif //_UTIL_H_ | 45 #endif //_UTIL_H_ |
OLD | NEW |