00001 /* 00002 * ConstCastException.hpp 00003 * 00004 * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. 00005 * 00006 * Oracle is a registered trademarks of Oracle Corporation and/or its 00007 * affiliates. 00008 * 00009 * This software is the confidential and proprietary information of Oracle 00010 * Corporation. You shall not disclose such confidential and proprietary 00011 * information and shall use it only in accordance with the terms of the 00012 * license agreement you entered into with Oracle. 00013 * 00014 * This notice may not be removed or altered. 00015 */ 00016 #ifndef COH_CONST_CAST_EXCEPTION 00017 #define COH_CONST_CAST_EXCEPTION 00018 00019 #include "coherence/lang/compatibility.hpp" 00020 00021 #include "coherence/lang/ClassCastException.hpp" 00022 00023 COH_OPEN_NAMESPACE2(coherence,lang) 00024 00025 00026 /** 00027 * Thrown when an attempt is made to cast away constness from a Holder assigned 00028 * from a View. 00029 * 00030 * @author mf 2008.08.06 00031 */ 00032 class COH_EXPORT ConstCastException 00033 : public throwable_spec<ConstCastException, 00034 extends<ClassCastException> > 00035 { 00036 friend class factory<ConstCastException>; 00037 00038 // ----- constructors --------------------------------------------------- 00039 00040 protected: 00041 /** 00042 * Create an ConstCastException. 00043 * 00044 * @param vsMessage the exception message 00045 * @param vCause the underlying cause of the exception; 00046 * can be <tt>NULL</tt> 00047 */ 00048 ConstCastException(String::View vsMessage = String::null_string, 00049 Exception::View vCause = NULL); 00050 }; 00051 00052 COH_CLOSE_NAMESPACE2 00053 00054 #endif // COH_CONST_CAST_EXCEPTION