aboutsummaryrefslogtreecommitdiff
path: root/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/EReturnValidator.h
diff options
context:
space:
mode:
authorferbas <ferbas@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2010-01-13 09:41:29 +0000
committerferbas <ferbas@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2010-01-13 09:41:29 +0000
commit43d65dc03325bcce8561423b9607f7e114355f7d (patch)
tree7bef4e532a43f4e98ee16b012dca7499ab547e5b /Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/EReturnValidator.h
parentf1288ff2082a3330b62b60ee80521c37576ff9cc (diff)
downloadpdf-as-3-43d65dc03325bcce8561423b9607f7e114355f7d.tar.gz
pdf-as-3-43d65dc03325bcce8561423b9607f7e114355f7d.tar.bz2
pdf-as-3-43d65dc03325bcce8561423b9607f7e114355f7d.zip
initial import
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@545 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c
Diffstat (limited to 'Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/EReturnValidator.h')
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/EReturnValidator.h61
1 files changed, 61 insertions, 0 deletions
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/EReturnValidator.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/EReturnValidator.h
new file mode 100644
index 0000000..6d6725b
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/EReturnValidator.h
@@ -0,0 +1,61 @@
+/*********************************************************************************
+ File: EReturnValidator.h
+ Created: October 10, 2004
+ Purpose: This file contains code that makes sure ASRaiseAware objects are
+ not used inside of E_RETURN.
+
+*
+* ___________________
+*
+* (c) Copyright 2004-2006 Adobe Systems, Inc.
+* All Rights Reserved.
+*
+* NOTICE: Adobe permits you to use, modify, and distribute this file
+* in accordance with the terms of the Adobe license agreement
+* accompanying it. If you have received this file from a source other
+* than Adobe, then your use, modification, or distribution of it
+* requires the prior written permission of Adobe.
+************************************************************************************/
+#ifndef _H_ERETURNVALIDATOR
+#define _H_ERETURNVALIDATOR
+
+#ifdef __cplusplus
+
+/* These are templates that make sure ASRaiseAware clases are not used
+ inside of a E_RETURN. Returning an ASRaiseAware class inside of
+ E_RETURN will leave cause the exception frame stack to go out of
+ order leaving the wrong frame at the top of the stack. This could
+ lead to a crash in the event an ASRaise is called
+*/
+#if (defined(DEBUG) && defined(__MWERKS__) && defined(MAC_ENV) && PLUGIN)
+ #define DO_ADDITIONAL_RAISEAWARE_CHECKS 1
+#else
+ #define DO_ADDITIONAL_RAISEAWARE_CHECKS 0
+#endif
+
+#if DO_ADDITIONAL_RAISEAWARE_CHECKS
+
+template < class T >
+struct IsRaiseAwareClass
+{
+ typedef int You_Can_Not_E_Return_Raise_Aware_Objects;
+};
+
+template < class T >
+inline void IsRaiseAwareClassHelperFunction( T* pThis )
+{
+ typename IsRaiseAwareClass< T >::Raise_Aware_Classes_Must_Use_The_Macro_RAISEAWARECLASS tester = 0;
+}
+
+template < class T >
+inline void IsNotRaiseAwareClassHelperFunction( T someInstance )
+{
+ typename IsRaiseAwareClass< T >::You_Can_Not_E_Return_Raise_Aware_Objects tester = 0;
+}
+
+#endif /* DO_ADDITIONAL_RAISEAWARE_CHECKS */
+
+#endif /* __cplusplus */
+
+#endif /* _H_ERETURNVALIDATOR */
+