/usr/include/salome/DF_definitions.hxx is in salome-kernel-dev 6.5.0-7ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 | // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
// 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.
//
// 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 the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#ifndef DF_DEF_HXX
#define DF_DEF_HXX
#ifdef WIN32
# if defined DF_EXPORTS
# define DF_EXPORT __declspec( dllexport )
# else
# define DF_EXPORT __declspec( dllimport )
# endif
#else
# define DF_EXPORT
#endif
#include <iostream>
#include <stdio.h>
#include <boost/shared_ptr.hpp>
template<class T> class df_shared_ptr: public boost::shared_ptr<T>
{
public:
df_shared_ptr() {}
template<class Y>
explicit df_shared_ptr(Y * p)
{
boost::shared_ptr<T>::reset(p);
}
template<class Y>
df_shared_ptr(df_shared_ptr<Y> const & r)
{
boost::dynamic_pointer_cast<T>(r);
}
template<class Y>
df_shared_ptr & operator=(df_shared_ptr<Y> const & r)
{
df_shared_ptr<T>(r).swap(*this);
return *this;
}
template<class Y> df_shared_ptr& operator()(Y * p) // Y must be complete
{
if(T* pt = dynamic_cast<T*>(p))
boost::shared_ptr<T>::reset(pt);
else
boost::throw_exception(std::bad_cast());
return *this;
}
};
# if defined(WIN32) && !defined(HAVE_NO_DLL)
# ifndef Standard_EXPORT
# define Standard_EXPORT __declspec( dllexport )
// For global variables :
# define Standard_EXPORTEXTERN __declspec( dllexport ) extern
# define Standard_EXPORTEXTERNC extern "C" __declspec( dllexport )
# endif /* Standard_EXPORT */
# ifndef Standard_IMPORT
# define Standard_IMPORT __declspec( dllimport ) extern
# define Standard_IMPORTC extern "C" __declspec( dllimport )
# endif /* Standard_IMPORT */
# else /* WIN32 */
# ifndef Standard_EXPORT
# define Standard_EXPORT
// For global variables :
# define Standard_EXPORTEXTERN extern
# define Standard_EXPORTEXTERNC extern "C"
# endif /* Standard_EXPORT */
# ifndef Standard_IMPORT
# define Standard_IMPORT extern
# define Standard_IMPORTC extern "C"
# endif /* Standard_IMPORT */
# endif /* WIN32 */
# ifndef __Standard_API
//# ifdef WIN32
# if !defined(WIN32)
# define __Standard_API Standard_EXPORT
# define __Standard_APIEXTERN Standard_EXPORTEXTERN
# else
# define __Standard_API Standard_IMPORT
# define __Standard_APIEXTERN Standard_IMPORT
# endif // __Standard_DLL
//# else
//# define __Standard_API
//# endif // WIN32
# endif // __Standard_API
#include <iostream>
class Standard_EXPORT DFexception
{
public :
DFexception(const char *message) {
std::cerr << message << std::endl;
}
};
#endif
|