/* \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ Hyperion Pattern. Hyperion Pattern is a part of the Hyperion Project. ---------------------------------------------------------- Copyright (c) 2001 Pierre Rebours. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See hyp.license.txt file for more information about the license. Web: http://lagrandeporte.multimania.com/hyperion Email: amtycho@yahoo.fr ---------------------------------------------------------- CVS $Log$ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ */ #include"hyp.ker.ex.h" void MacroTest(void) { hyp_NOTIFY( ("%i %i %s",1,2,"toto") ); try{ hyp_THROW( hyp_ker::CSysException ); } catch(hyp_ker::CException& excep) { g_OutStream<<excep<<'\n'; } try{ hyp_THROW2( hyp_ker::CSysException , ("A system error") ); } catch(hyp_ker::CException& excep) { g_OutStream<<excep<<'\n'; } try{ hyp_THROW( hyp_ker::CException ); } catch(hyp_ker::CException& excep) { g_OutStream<<excep<<'\n'; } try{ hyp_THROW2( hyp_ker::CException , ("A basic error") ); } catch(hyp_ker::CException& excep) { g_OutStream<<excep<<'\n'; } try{ hyp_THROW_COM( hyp_ker::com_false); } catch(hyp_ker::CException& excep) { g_OutStream<<excep<<'\n'; } try{ hyp_THROW_COM2( hyp_ker::com_false, ("A component error") ); } catch(hyp_ker::CException& excep) { g_OutStream<<excep<<'\n'; } try{ hyp_THROW_ASSERT( hyp_ker::CException, (1==0) ); } catch(hyp_ker::CException& excep) { g_OutStream<<excep<<'\n'; } try{ hyp_THROW_COM_ASSERT(1==0); } catch(hyp_ker::CException& excep) { g_OutStream<<excep<<'\n'; } } #if 0 void TestGlobalStream(void) { std::cout<<FormatHeaderSentence("Global Stream test"); hyp_ker::hyp_cerr<<__TIME__<<" \n\n\n;-)"<<std::endl; } #if 0 void TestComposantExample(void) { std::cout<<FormatHeaderSentence("Example Composant test"); hyp_ker::interf::IUnknown* pIUnknown; hyp_ker::hypCreateInstance(hyp::example::CLSID_hypCMatrix, 0, hyp_ker::INPROC_SERVER, hyp_ker::interf::IID_hypIUnknown, (void**)&pIUnknown); hyp::example::IMatrix* pIMatrix; pIUnknown->QueryInterface(hyp::example::IID_hypIMatrix,(void**)&pIMatrix); pIMatrix->SetSize(10,10); pIMatrix->SetComposante(2,0,0); pIMatrix->GetInfo(std::cout); pIMatrix->Release(); pIUnknown->Release(); /*std::string str_test; hyp_ker::hypGetDllInfo(str_test); std::cout<<str_test; */ } #endif #endif
|
|