Adobe.com
Contents Suites Classes Class Index Member Index

AIAutoCoordinateSystem.h

Go to the documentation of this file.
00001 /*
00002 * Name: AIAutoCoordinateSystem.h
00003 * Author: Started by Pushp
00004 * Date: January, 2009
00005 * Purpose: Adobe Illustrator AutoCoordinateSystem Auto object
00006 *
00007 * ADOBE SYSTEMS INCORPORATED
00008 * Copyright 2008 Adobe Systems Incorporated.
00009 * All rights reserved.
00010 *
00011 * NOTICE:  Adobe permits you to use, modify, and distribute this file
00012 * in accordance with the terms of the Adobe license agreement
00013 * accompanying it. If you have received this file from a source other
00014 * than Adobe, then your use, modification, or distribution of it
00015 * requires the prior written permission of Adobe.
00016 *
00017 */
00018 #pragma once
00019 
00020 #ifndef _AIAutoCoordinateSystem_H_
00021 #define _AIAutoCoordinateSystem_H_
00022 
00023 #include "AIHardSoft.h"
00024 
00025 #ifdef _AI_AUTO_COORDINATE_SYSTEM_INCLUDE_H_
00026 #include _AI_AUTO_COORDINATE_SYSTEM_INCLUDE_H_
00027 #elif  AI_AUTO_SUITE_AVAILABLE
00028 #include "AutoSuite.h"
00029 extern_declare_suite(AIHardSoft);
00030 #else
00031 #ifndef _AI_AUTO_COORDINATE_SYSTEM_USE_C_LINKAGE_
00032 #define _AI_AUTO_COORDINATE_SYSTEM_USE_C_LINKAGE_ 1
00033 #endif
00034 #if _AI_AUTO_COORDINATE_SYSTEM_USE_C_LINKAGE_
00035 extern "C"
00036 {
00037 #endif
00038 
00042         extern AIHardSoftSuite* sAIHardSoft;
00043 
00044 #if _AI_AUTO_COORDINATE_SYSTEM_USE_C_LINKAGE_
00045 }
00046 #endif // _AI_AUTO_COORDINATE_SYSTEM_USE_C_LINKAGE_
00047 
00048 #endif
00049 
00050 namespace ai
00051 {
00058         class AutoCoordinateSystem
00059         {
00060         public:
00070                 AutoCoordinateSystem(AICoordinateSystem coordinateSystem= kAICurrentCoordinateSystem)
00071                 {
00072                         sAIHardSoft->GetCoordinateSystem(fCoordinateSystem);
00073                         sAIHardSoft->SetCoordinateSystem(coordinateSystem);
00074                 }
00079                 ~AutoCoordinateSystem()
00080                 {
00081                         try
00082                         {
00083                                 sAIHardSoft->SetCoordinateSystem(fCoordinateSystem);
00084                         }
00085                         catch (...)
00086                         {
00087                         }
00088                 }
00089         private:
00090                 ai::int32 fCoordinateSystem;
00091         };
00092 }
00093 
00094 #endif


Contents Suites Classes Class Index Member Index
Adobe Solutions Network
 
Copyright © 2014 Adobe Systems Incorporated. All rights reserved.
Terms of Use Online Privacy Policy Adobe and accessibility Avoid software piracy Permissions and Trademarks