Index: experimental/PdfViewer/pdfparser/native/SkPdfNativeObject.h |
=================================================================== |
--- experimental/PdfViewer/pdfparser/native/SkPdfNativeObject.h (revision 11625) |
+++ experimental/PdfViewer/pdfparser/native/SkPdfNativeObject.h (working copy) |
@@ -257,63 +257,55 @@ |
return nyi; |
} |
- static void makeBoolean(bool value, SkPdfNativeObject* obj GET_TRACK_PARAMETERS) { |
- STORE_TRACK_PARAMETERS(obj); |
+ // TODO(edisonn) impl store |
+ //STORE_TRACK_PARAMETERS(obj); |
+ static void makeBoolean(bool value, SkPdfNativeObject* obj) { |
+ |
SkASSERT(obj->fObjectType == kInvalid_PdfObjectType); |
obj->fObjectType = kBoolean_PdfObjectType; |
obj->fBooleanValue = value; |
} |
- static SkPdfNativeObject makeBoolean(bool value GET_TRACK_PARAMETERS) { |
+ static SkPdfNativeObject makeBoolean(bool value) { |
SkPdfNativeObject obj; |
- STORE_TRACK_PARAMETERS(&obj); |
- |
obj.fObjectType = kBoolean_PdfObjectType; |
obj.fBooleanValue = value; |
return obj; |
} |
- static void makeInteger(int64_t value, SkPdfNativeObject* obj GET_TRACK_PARAMETERS) { |
- STORE_TRACK_PARAMETERS(obj); |
- |
+ static void makeInteger(int64_t value, SkPdfNativeObject* obj) { |
SkASSERT(obj->fObjectType == kInvalid_PdfObjectType); |
obj->fObjectType = kInteger_PdfObjectType; |
obj->fIntegerValue = value; |
} |
- static void makeReal(double value, SkPdfNativeObject* obj GET_TRACK_PARAMETERS) { |
- STORE_TRACK_PARAMETERS(obj); |
- |
+ static void makeReal(double value, SkPdfNativeObject* obj) { |
SkASSERT(obj->fObjectType == kInvalid_PdfObjectType); |
obj->fObjectType = kReal_PdfObjectType; |
obj->fRealValue = value; |
} |
- static void makeNull(SkPdfNativeObject* obj GET_TRACK_PARAMETERS) { |
- STORE_TRACK_PARAMETERS(obj); |
- |
+ static void makeNull(SkPdfNativeObject* obj) { |
SkASSERT(obj->fObjectType == kInvalid_PdfObjectType); |
obj->fObjectType = kNull_PdfObjectType; |
} |
- static SkPdfNativeObject makeNull(GET_TRACK_PARAMETERS0) { |
+ static SkPdfNativeObject makeNull() { |
SkPdfNativeObject obj; |
- STORE_TRACK_PARAMETERS(&obj); |
- |
obj.fObjectType = kNull_PdfObjectType; |
return obj; |
} |
static SkPdfNativeObject kNull; |
- static void makeNumeric(const unsigned char* start, const unsigned char* end, SkPdfNativeObject* obj GET_TRACK_PARAMETERS) { |
+ static void makeNumeric(const unsigned char* start, const unsigned char* end, SkPdfNativeObject* obj) { |
SkASSERT(obj->fObjectType == kInvalid_PdfObjectType); |
// TODO(edisonn): NYI properly |
@@ -327,15 +319,13 @@ |
// TODO(edisonn): report parse issue with numbers like "24asdasd123" |
} |
if (isInt) { |
- makeInteger(atol((const char*)start), obj PUT_TRACK_PARAMETERS); |
+ makeInteger(atol((const char*)start), obj); |
} else { |
- makeReal(atof((const char*)start), obj PUT_TRACK_PARAMETERS); |
+ makeReal(atof((const char*)start), obj); |
} |
} |
- static void makeReference(unsigned int id, unsigned int gen, SkPdfNativeObject* obj GET_TRACK_PARAMETERS) { |
- STORE_TRACK_PARAMETERS(obj); |
- |
+ static void makeReference(unsigned int id, unsigned int gen, SkPdfNativeObject* obj) { |
SkASSERT(obj->fObjectType == kInvalid_PdfObjectType); |
obj->fObjectType = kReference_PdfObjectType; |
@@ -343,69 +333,67 @@ |
obj->fRef.fGen = gen; |
} |
- static void resetAndMakeReference(unsigned int id, unsigned int gen, SkPdfNativeObject* obj GET_TRACK_PARAMETERS) { |
+ static void resetAndMakeReference(unsigned int id, unsigned int gen, SkPdfNativeObject* obj) { |
obj->reset(); |
- makeReference(id, gen, obj PUT_TRACK_PARAMETERS); |
+ makeReference(id, gen, obj); |
} |
- static void makeString(const unsigned char* start, SkPdfNativeObject* obj GET_TRACK_PARAMETERS) { |
- makeStringCore(start, strlen((const char*)start), obj, kString_PdfObjectType PUT_TRACK_PARAMETERS); |
+ static void makeString(const unsigned char* start, SkPdfNativeObject* obj) { |
+ makeStringCore(start, strlen((const char*)start), obj, kString_PdfObjectType); |
} |
- static void makeString(const unsigned char* start, const unsigned char* end, SkPdfNativeObject* obj GET_TRACK_PARAMETERS) { |
- makeStringCore(start, end - start, obj, kString_PdfObjectType PUT_TRACK_PARAMETERS); |
+ static void makeString(const unsigned char* start, const unsigned char* end, SkPdfNativeObject* obj) { |
+ makeStringCore(start, end - start, obj, kString_PdfObjectType); |
} |
- static void makeString(const unsigned char* start, size_t bytes, SkPdfNativeObject* obj GET_TRACK_PARAMETERS) { |
- makeStringCore(start, bytes, obj, kString_PdfObjectType PUT_TRACK_PARAMETERS); |
+ static void makeString(const unsigned char* start, size_t bytes, SkPdfNativeObject* obj) { |
+ makeStringCore(start, bytes, obj, kString_PdfObjectType); |
} |
- static void makeHexString(const unsigned char* start, SkPdfNativeObject* obj GET_TRACK_PARAMETERS) { |
- makeStringCore(start, strlen((const char*)start), obj, kHexString_PdfObjectType PUT_TRACK_PARAMETERS); |
+ static void makeHexString(const unsigned char* start, SkPdfNativeObject* obj) { |
+ makeStringCore(start, strlen((const char*)start), obj, kHexString_PdfObjectType); |
} |
- static void makeHexString(const unsigned char* start, const unsigned char* end, SkPdfNativeObject* obj GET_TRACK_PARAMETERS) { |
- makeStringCore(start, end - start, obj, kHexString_PdfObjectType PUT_TRACK_PARAMETERS); |
+ static void makeHexString(const unsigned char* start, const unsigned char* end, SkPdfNativeObject* obj) { |
+ makeStringCore(start, end - start, obj, kHexString_PdfObjectType); |
} |
- static void makeHexString(const unsigned char* start, size_t bytes, SkPdfNativeObject* obj GET_TRACK_PARAMETERS) { |
- makeStringCore(start, bytes, obj, kHexString_PdfObjectType PUT_TRACK_PARAMETERS); |
+ static void makeHexString(const unsigned char* start, size_t bytes, SkPdfNativeObject* obj) { |
+ makeStringCore(start, bytes, obj, kHexString_PdfObjectType); |
} |
- static void makeName(const unsigned char* start, SkPdfNativeObject* obj GET_TRACK_PARAMETERS) { |
- makeStringCore(start, strlen((const char*)start), obj, kName_PdfObjectType PUT_TRACK_PARAMETERS); |
+ static void makeName(const unsigned char* start, SkPdfNativeObject* obj) { |
+ makeStringCore(start, strlen((const char*)start), obj, kName_PdfObjectType); |
} |
- static void makeName(const unsigned char* start, const unsigned char* end, SkPdfNativeObject* obj GET_TRACK_PARAMETERS) { |
- makeStringCore(start, end - start, obj, kName_PdfObjectType PUT_TRACK_PARAMETERS); |
+ static void makeName(const unsigned char* start, const unsigned char* end, SkPdfNativeObject* obj) { |
+ makeStringCore(start, end - start, obj, kName_PdfObjectType); |
} |
- static void makeName(const unsigned char* start, size_t bytes, SkPdfNativeObject* obj GET_TRACK_PARAMETERS) { |
- makeStringCore(start, bytes, obj, kName_PdfObjectType PUT_TRACK_PARAMETERS); |
+ static void makeName(const unsigned char* start, size_t bytes, SkPdfNativeObject* obj) { |
+ makeStringCore(start, bytes, obj, kName_PdfObjectType); |
} |
- static void makeKeyword(const unsigned char* start, SkPdfNativeObject* obj GET_TRACK_PARAMETERS) { |
- makeStringCore(start, strlen((const char*)start), obj, kKeyword_PdfObjectType PUT_TRACK_PARAMETERS); |
+ static void makeKeyword(const unsigned char* start, SkPdfNativeObject* obj) { |
+ makeStringCore(start, strlen((const char*)start), obj, kKeyword_PdfObjectType); |
} |
- static void makeKeyword(const unsigned char* start, const unsigned char* end, SkPdfNativeObject* obj GET_TRACK_PARAMETERS) { |
- makeStringCore(start, end - start, obj, kKeyword_PdfObjectType PUT_TRACK_PARAMETERS); |
+ static void makeKeyword(const unsigned char* start, const unsigned char* end, SkPdfNativeObject* obj) { |
+ makeStringCore(start, end - start, obj, kKeyword_PdfObjectType); |
} |
- static void makeKeyword(const unsigned char* start, size_t bytes, SkPdfNativeObject* obj GET_TRACK_PARAMETERS) { |
- makeStringCore(start, bytes, obj, kKeyword_PdfObjectType PUT_TRACK_PARAMETERS); |
+ static void makeKeyword(const unsigned char* start, size_t bytes, SkPdfNativeObject* obj) { |
+ makeStringCore(start, bytes, obj, kKeyword_PdfObjectType); |
} |
// TODO(edisonn): make the functions to return SkPdfArray, move these functions in SkPdfArray |
- static void makeEmptyArray(SkPdfNativeObject* obj GET_TRACK_PARAMETERS) { |
- STORE_TRACK_PARAMETERS(obj); |
- |
+ static void makeEmptyArray(SkPdfNativeObject* obj) { |
SkASSERT(obj->fObjectType == kInvalid_PdfObjectType); |
obj->fObjectType = kArray_PdfObjectType; |
@@ -476,9 +464,7 @@ |
// TODO(edisonn): make the functions to return SkPdfDictionary, move these functions in SkPdfDictionary |
- static void makeEmptyDictionary(SkPdfNativeObject* obj GET_TRACK_PARAMETERS) { |
- STORE_TRACK_PARAMETERS(obj); |
- |
+ static void makeEmptyDictionary(SkPdfNativeObject* obj) { |
SkASSERT(obj->fObjectType == kInvalid_PdfObjectType); |
obj->fObjectType = kDictionary_PdfObjectType; |
@@ -1195,16 +1181,15 @@ |
} |
private: |
- static void makeStringCore(const unsigned char* start, SkPdfNativeObject* obj, ObjectType type GET_TRACK_PARAMETERS) { |
- makeStringCore(start, strlen((const char*)start), obj, type PUT_TRACK_PARAMETERS); |
+ static void makeStringCore(const unsigned char* start, SkPdfNativeObject* obj, ObjectType type) { |
+ makeStringCore(start, strlen((const char*)start), obj, type); |
} |
- static void makeStringCore(const unsigned char* start, const unsigned char* end, SkPdfNativeObject* obj, ObjectType type GET_TRACK_PARAMETERS) { |
- makeStringCore(start, end - start, obj, type PUT_TRACK_PARAMETERS); |
+ static void makeStringCore(const unsigned char* start, const unsigned char* end, SkPdfNativeObject* obj, ObjectType type) { |
+ makeStringCore(start, end - start, obj, type); |
} |
- static void makeStringCore(const unsigned char* start, size_t bytes, SkPdfNativeObject* obj, ObjectType type GET_TRACK_PARAMETERS) { |
- STORE_TRACK_PARAMETERS(obj); |
+ static void makeStringCore(const unsigned char* start, size_t bytes, SkPdfNativeObject* obj, ObjectType type) { |
SkASSERT(obj->fObjectType == kInvalid_PdfObjectType); |
@@ -1228,11 +1213,11 @@ |
class SkPdfName : public SkPdfNativeObject { |
SkPdfName() : SkPdfNativeObject() { |
- SkPdfNativeObject::makeName((const unsigned char*)"", this PUT_TRACK_PARAMETERS_SRC); |
+ SkPdfNativeObject::makeName((const unsigned char*)"", this); |
} |
public: |
SkPdfName(char* name) : SkPdfNativeObject() { |
- this->makeName((const unsigned char*)name, this PUT_TRACK_PARAMETERS_SRC); |
+ this->makeName((const unsigned char*)name, this); |
} |
}; |