/contrib/media/updf/include/c/bits/std_cassert.h |
---|
0,0 → 1,39 |
// -*- C++ -*- forwarding header. |
// Copyright (C) 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
// |
// ISO C++ 14882: 19.2 Assertions |
// |
// Note: This is not a conforming implementation. |
// No include guards on this header... |
#pragma GCC system_header |
#include <assert.h> |
/contrib/media/updf/include/c/bits/std_cctype.h |
---|
0,0 → 1,42 |
// -*- C++ -*- forwarding header. |
// Copyright (C) 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
// |
// ISO C++ 14882: <ccytpe> |
// |
// Note: This is not a conforming implementation. |
#ifndef _CPP_CCTYPE |
#define _CPP_CCTYPE 1 |
#pragma GCC system_header |
#include <ctype.h> |
#endif |
/contrib/media/updf/include/c/bits/std_cerrno.h |
---|
0,0 → 1,42 |
// The -*- C++ -*- error number header. |
// Copyright (C) 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
// |
// ISO C++ 14882: 19.3 Error numbers |
// |
// Note: This is not a conforming implementation. |
#ifndef _CPP_CERRNO |
#define _CPP_CERRNO 1 |
#pragma GCC system_header |
#include <errno.h> |
#endif |
/contrib/media/updf/include/c/bits/std_cfloat.h |
---|
0,0 → 1,42 |
// -*- C++ -*- forwarding header. |
// Copyright (C) 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
// |
// ISO C++ 14882: 18.2.2 Implementation properties: C library |
// |
// Note: This is not a conforming implementation. |
#ifndef _CPP_CFLOAT |
#define _CPP_CFLOAT 1 |
#pragma GCC system_header |
#include <float.h> |
#endif |
/contrib/media/updf/include/c/bits/std_climits.h |
---|
0,0 → 1,42 |
// -*- C++ -*- forwarding header. |
// Copyright (C) 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
// |
// ISO C++ 14882: 18.2.2 Implementation properties: C library |
// |
// Note: This is not a conforming implementation. |
#ifndef _CPP_CLIMITS |
#define _CPP_CLIMITS 1 |
#pragma GCC system_header |
#include <limits.h> |
#endif |
/contrib/media/updf/include/c/bits/std_clocale.h |
---|
0,0 → 1,42 |
// -*- C++ -*- forwarding header. |
// Copyright (C) 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
// |
// ISO C++ 14882: 18.2.2 Implementation properties: C library |
// |
// Note: This is not a conforming implementation. |
#ifndef _CPP_CLOCALE |
#define _CPP_CLOCALE 1 |
#pragma GCC system_header |
#include <locale.h> |
#endif |
/contrib/media/updf/include/c/bits/std_cmath.h |
---|
0,0 → 1,42 |
// -*- C++ -*- C math library. |
// Copyright (C) 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
// |
// ISO C++ 14882: 26.5 C library |
// |
// Note: This is not a conforming implementation. |
#ifndef _CPP_CMATH |
#define _CPP_CMATH 1 |
#pragma GCC system_header |
#include <math.h> |
#endif |
/contrib/media/updf/include/c/bits/std_csetjmp.h |
---|
0,0 → 1,42 |
// -*- C++ -*- forwarding header. |
// Copyright (C) 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
// |
// ISO C++ 14882: 20.4.6 C library |
// |
// Note: This is not a conforming implementation. |
#ifndef _CPP_CSETJMP |
#define _CPP_CSETJMP 1 |
#pragma GCC system_header |
#include <setjmp.h> |
#endif |
/contrib/media/updf/include/c/bits/std_csignal.h |
---|
0,0 → 1,42 |
// -*- C++ -*- forwarding header. |
// Copyright (C) 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
// |
// ISO C++ 14882: 20.4.6 C library |
// |
// Note: This is not a conforming implementation. |
#ifndef _CPP_CSIGNAL |
#define _CPP_CSIGNAL 1 |
#pragma GCC system_header |
#include <signal.h> |
#endif |
/contrib/media/updf/include/c/bits/std_cstdarg.h |
---|
0,0 → 1,42 |
// -*- C++ -*- forwarding header. |
// Copyright (C) 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
// |
// ISO C++ 14882: 20.4.6 C library |
// |
// Note: This is not a conforming implementation. |
#ifndef _CPP_CSTDARG |
#define _CPP_CSTDARG 1 |
#pragma GCC system_header |
#include <stdarg.h> |
#endif |
/contrib/media/updf/include/c/bits/std_cstddef.h |
---|
0,0 → 1,42 |
// -*- C++ -*- forwarding header. |
// Copyright (C) 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
// |
// ISO C++ 14882: 18.1 Types |
// |
// Note: This is not a conforming implementation. |
#ifndef _CPP_CSTDDEF |
#define _CPP_CSTDDEF 1 |
#pragma GCC system_header |
#include <stddef.h> |
#endif |
/contrib/media/updf/include/c/bits/std_cstdio.h |
---|
0,0 → 1,42 |
// -*- C++ -*- forwarding header. |
// Copyright (C) 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
// |
// ISO C++ 14882: 27.8.2 C Library files |
// |
// Note: This is not a conforming implementation. |
#ifndef _CPP_CSTDIO |
#define _CPP_CSTDIO 1 |
#pragma GCC system_header |
#include <stdio.h> |
#endif |
/contrib/media/updf/include/c/bits/std_cstdlib.h |
---|
0,0 → 1,42 |
// -*- C++ -*- forwarding header. |
// Copyright (C) 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
// |
// ISO C++ 14882: 20.4.6 C library |
// |
// Note: This is not a conforming implementation. |
#ifndef _CPP_CSTDLIB |
#define _CPP_CSTDLIB 1 |
#pragma GCC system_header |
#include <stdlib.h> |
#endif |
/contrib/media/updf/include/c/bits/std_cstring.h |
---|
0,0 → 1,42 |
// -*- C++ -*- forwarding header. |
// Copyright (C) 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
// |
// ISO C++ 14882: 20.4.6 C library |
// |
// Note: This is not a conforming implementation. |
#ifndef _CPP_CSTRING |
#define _CPP_CSTRING 1 |
#pragma GCC system_header |
#include <string.h> |
#endif |
/contrib/media/updf/include/c/bits/std_ctime.h |
---|
0,0 → 1,42 |
// -*- C++ -*- forwarding header. |
// Copyright (C) 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
// |
// ISO C++ 14882: 20.5 Date and time |
// |
// Note: This is not a conforming implementation. |
#ifndef _CPP_CTIME |
#define _CPP_CTIME 1 |
#pragma GCC system_header |
#include <time.h> |
#endif |
/contrib/media/updf/include/c/bits/std_cwchar.h |
---|
0,0 → 1,42 |
// -*- C++ -*- forwarding header. |
// Copyright (C) 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
// |
// ISO C++ 14882: ??? |
// |
// Note: This is not a conforming implementation. |
#ifndef _CPP_CWCHAR |
#define _CPP_CWCHAR 1 |
#pragma GCC system_header |
#include <wchar.h> |
#endif |
/contrib/media/updf/include/c/bits/std_cwctype.h |
---|
0,0 → 1,42 |
// -*- C++ -*- forwarding header. |
// Copyright (C) 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
// |
// ISO C++ 14882: <cwctype> |
// |
// Note: This is not a conforming implementation. |
#ifndef _CPP_CWCTYPE |
#define _CPP_CWCTYPE 1 |
#pragma GCC system_header |
#include <wctype.h> |
#endif |
/contrib/media/updf/include/c_shadow/assert.h |
---|
0,0 → 1,55 |
// -*- C++ -*- header wrapper. |
// Copyright (C) 1997-1999 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
#ifndef _INCLUDED_CPP_ASSERT_H_ |
# define _INCLUDED_CPP_ASSERT_H_ 1 |
#ifdef _IN_C_LEGACY_ /* sub-included by a C header */ |
// get out of the "legacy" |
} // close extern "C" |
} // close namespace _C_legacy:: |
# undef _IN_C_LEGACY_ |
# define _ASSERT_NEED_C_LEGACY_ |
#endif |
#include <cassert> |
// Expose global C names, including non-standard ones, but shadow |
// some names and types with the std:: C++ version. |
#ifdef _ASSERT_NEED_C_LEGACY_ |
// dive back into the "swamp" |
namespace _C_legacy { |
extern "C" { |
# define _IN_C_LEGACY_ |
# undef _ASSERT_NEED_C_LEGACY_ |
#endif /* _ASSERT_NEED_C_LEGACY_ */ |
#endif /* _INCLUDED_CPP_ASSERT_H_ */ |
/contrib/media/updf/include/c_shadow/bits/std_cassert.h |
---|
0,0 → 1,61 |
// -*- C++ -*- header wrapper. |
// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
// |
// ISO C++ 14882: 19.2 Assertions |
// |
// NB: This is assumed to be a conforming implementation. |
// ISO/IEC 9899:1999 (E), section 7.2 |
// assert.h |
// ..defines the assert macro... |
// ISO 14882 |
// 17.4.1.2 Headers |
// ... declarations and definitions (except for macros) are within |
// namespace scope of the namepace std... |
//#ifndef _CPP_CASSERT |
//#define _CPP_CASSERT 1 |
//namespace _C_legacy { |
extern "C" { |
//# define _IN_C_LEGACY_ |
# pragma GCC system_header |
# include_next <assert.h> |
} |
//} // namespace _C_legacy |
//#undef _IN_C_LEGACY_ |
//#endif |
/contrib/media/updf/include/c_shadow/bits/std_cctype.h |
---|
0,0 → 1,145 |
// -*- C++ -*- header wrapper. |
// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
// ISO C++ 14882: 22 |
// |
#ifndef _CPP_CCTYPE |
#define _CPP_CCTYPE 1 |
namespace _C_legacy { |
extern "C" { |
# define _IN_C_LEGACY_ |
# pragma GCC system_header |
# include_next <ctype.h> |
} |
inline int |
_CPP_isalnum_capture(int c) { return isalnum(c); } |
inline int |
_CPP_isalpha_capture(int c) { return isalpha(c); } |
inline int |
_CPP_iscntrl_capture(int c) { return iscntrl(c); } |
inline int |
_CPP_isdigit_capture(int c) { return isdigit(c); } |
inline int |
_CPP_isgraph_capture(int c) { return isgraph(c); } |
inline int |
_CPP_islower_capture(int c) { return islower(c); } |
inline int |
_CPP_isprint_capture(int c) { return isprint(c); } |
inline int |
_CPP_ispunct_capture(int c) { return ispunct(c); } |
inline int |
_CPP_isspace_capture(int c) { return isspace(c); } |
inline int |
_CPP_isupper_capture(int c) { return isupper(c); } |
inline int |
_CPP_isxdigit_capture(int c) { return isxdigit(c); } |
inline int |
_CPP_tolower_capture(int c) { return tolower(c); } |
inline int |
_CPP_toupper_capture(int c) { return toupper(c); } |
} // namespace _C_legacy |
# undef isalnum |
# undef isalpha |
# undef iscntrl |
# undef isdigit |
# undef isgraph |
# undef islower |
# undef isprint |
# undef ispunct |
# undef isspace |
# undef isupper |
# undef isxdigit |
# undef tolower |
# undef toupper |
namespace std { |
inline int |
isalnum(int __c) { return _C_legacy::_CPP_isalnum_capture(__c); } |
inline int |
isalpha(int __c) { return _C_legacy::_CPP_isalpha_capture(__c); } |
inline int |
iscntrl(int __c) { return _C_legacy::_CPP_iscntrl_capture(__c); } |
inline int |
isdigit(int __c) { return _C_legacy::_CPP_isdigit_capture(__c); } |
inline int |
isgraph(int __c) { return _C_legacy::_CPP_isgraph_capture(__c); } |
inline int |
islower(int __c) { return _C_legacy::_CPP_islower_capture(__c); } |
inline int |
isprint(int __c) { return _C_legacy::_CPP_isprint_capture(__c); } |
inline int |
ispunct(int __c) { return _C_legacy::_CPP_ispunct_capture(__c); } |
inline int |
isspace(int __c) { return _C_legacy::_CPP_isspace_capture(__c); } |
inline int |
isupper(int __c) { return _C_legacy::_CPP_isupper_capture(__c); } |
inline int |
isxdigit(int __c) { return _C_legacy::_CPP_isxdigit_capture(__c); } |
inline int |
tolower(int __c) { return _C_legacy::_CPP_tolower_capture(__c); } |
inline int |
toupper(int __c) { return _C_legacy::_CPP_toupper_capture(__c); } |
} // namespace std |
# undef _IN_C_LEGACY_ |
#endif |
/contrib/media/updf/include/c_shadow/bits/std_cerrno.h |
---|
0,0 → 1,48 |
// -*- C++ -*- header wrapper. |
// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
// ISO C++ 14882: 19.3 Error numbers |
// |
#ifndef _CPP_CERRNO |
#define _CPP_CERRNO 1 |
//namespace _C_legacy { |
extern "C" { |
//# define _IN_C_LEGACY_ |
# pragma GCC system_header |
# include_next <errno.h> |
} |
//} // namespace _C_legacy:: |
//# undef _IN_C_LEGACY_ |
#endif |
/contrib/media/updf/include/c_shadow/bits/std_cfloat.h |
---|
0,0 → 1,54 |
// -*- C++ -*- header wrapper. |
// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
// |
// ISO C++ 14882: 18.2.2 Implementation properties: C library |
// |
#ifndef _CPP_CFLOAT |
#define _CPP_CFLOAT 1 |
namespace _C_legacy { |
extern "C" { |
# define _IN_C_LEGACY_ |
# pragma GCC system_header |
# include_next <float.h> |
} |
} // namespace _C_legacy |
# undef _IN_C_LEGACY_ |
#endif |
/contrib/media/updf/include/c_shadow/bits/std_climits.h |
---|
0,0 → 1,57 |
// -*- C++ -*- header wrapper. |
// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
// |
// ISO C++ 14882: 18.2.2 Implementation properties: C library |
// |
#ifndef _CPP_CLIMITS |
#define _CPP_CLIMITS 1 |
namespace _C_legacy { |
extern "C" { |
# define _IN_C_LEGACY_ |
# pragma GCC system_header |
# include_next <limits.h> |
} |
} // namespace _C_legacy |
# undef _IN_C_LEGACY_ |
#endif |
/contrib/media/updf/include/c_shadow/bits/std_clocale.h |
---|
0,0 → 1,70 |
// -*- C++ -*- header wrapper. |
// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
// |
// ISO C++ 14882: 18.2.2 Implementation properties: C library |
// |
#ifndef _CPP_CLOCALE |
#define _CPP_CLOCALE 1 |
# include <bits/std_cstddef.h> |
namespace _C_legacy { |
extern "C" { |
# define _IN_C_LEGACY_ |
# pragma GCC system_header |
# include_next <locale.h> |
} |
typedef lconv _CPP_lconv_capture; |
} // namespace _C_legacy |
# undef lconv |
# undef setlocale |
# undef localeconv |
namespace std { |
// Adopt C names into std:: |
struct lconv : _C_legacy::_CPP_lconv_capture { }; |
using _C_legacy::setlocale; |
inline lconv* |
localeconv() { return reinterpret_cast<lconv*>(_C_legacy::localeconv()); } |
} // namespace std |
# undef _IN_C_LEGACY_ |
#endif |
/contrib/media/updf/include/c_shadow/bits/std_cmath.h |
---|
0,0 → 1,833 |
// -*- C++ -*- header wrapper. |
// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
// |
// ISO C++ 14882: 26.5 C library |
// |
#ifndef _CPP_CMATH |
#define _CPP_CMATH 1 |
# include <bits/c++config.h> |
namespace _C_legacy { |
extern "C" { |
# define _IN_C_LEGACY_ |
# pragma GCC system_header |
# include_next <math.h> |
} |
#if _GLIBCPP_HAVE_ACOSF |
inline float |
_CPP_acos_capture(float __x) { return acosf(__x); } |
#else |
inline float |
_CPP_acos_capture(float __x) { return acos(static_cast<double>(__x)); } |
#endif |
#if _GLIBCPP_HAVE_ASINF |
inline float |
_CPP_asin_capture(float __x) { return asinf(__x); } |
#else |
inline float |
_CPP_asin_capture(float __x) { return asin(static_cast<double>(__x)); } |
#endif |
#if _GLIBCPP_HAVE_ATANF |
inline float |
_CPP_atan_capture(float __x) { return atanf(__x); } |
#else |
inline float |
_CPP_atan_capture(float __x) { return atan(static_cast<double>(__x)); } |
#endif |
#if _GLIBCPP_HAVE_ATAN2F |
inline float |
_CPP_atan2_capture(float __y, float __x) { return atan2f(__y, __x); } |
#else |
inline float |
_CPP_atan2_capture(float __y, float __x) |
{ return atan2(static_cast<double>(__y), static_cast<double>(__x)); } |
#endif |
#if _GLIBCPP_HAVE_CEILF |
inline float |
_CPP_ceil_capture(float __x) { return ceilf(__x); } |
#else |
inline float |
_CPP_ceil_capture(float __x) { return ceil(static_cast<double>(__x)); } |
#endif |
#if _GLIBCPP_HAVE___BUILTIN_COSF |
inline float |
_CPP_cos_capture(float __x) { return __builtin_cosf(__x); } |
#elif _GLIBCPP_HAVE_COSF |
inline float |
_CPP_cos_capture(float __x) { return cosf(__x); } |
#else |
inline float |
_CPP_cos_capture(float __x) { return cos(static_cast<double>(__x)); } |
#endif |
#if _GLIBCPP_HAVE_COSHF |
inline float |
_CPP_cosh_capture(float __x) { return coshf(__x); } |
#else |
inline float |
_CPP_cosh_capture(float __x) { return cosh(static_cast<double>(__x)); } |
#endif |
#if _GLIBCPP_HAVE_EXPF |
inline float |
_CPP_exp_capture(float __x) { return expf(__x); } |
#else |
inline float |
_CPP_exp_capture(float __x) { return exp(static_cast<double>(__x)); } |
#endif |
#if _GLIBCPP_HAVE___BUILTIN_FABSF |
inline float |
_CPP_fabs_capture(float __x) { return __builtin_fabsf(__x); } |
#elif _GLIBCPP_HAVE_FABSF |
inline float |
_CPP_fabs_capture(float __x) { return fabsf(__x); } |
#else |
inline float |
_CPP_fabs_capture(float __x) { return fabs(static_cast<double>(__x)); } |
#endif |
#if _GLIBCPP_HAVE_FLOORF |
inline float |
_CPP_floor_capture(float __x) { return floorf(__x); } |
#else |
inline float |
_CPP_floor_capture(float __x) { return floor(static_cast<double>(__x)); } |
#endif |
#if _GLIBCPP_HAVE_FMODFF |
inline float |
_CPP_fmod_capture(float __x, float __y) { return fmodf(__x, __y); } |
#else |
inline float |
_CPP_fmod_capture(float __x, float __y) |
{ return fmod(static_cast<double>(__x), static_cast<double>(__y)); } |
#endif |
#if _GLIBCPP_HAVE_FREXPF |
inline float |
_CPP_frexp_capture(float __x, int* __exp) { return frexpf(__x, __exp); } |
#else |
inline float |
_CPP_frexp_capture(float __x, int* __exp) { return frexp(__x, __exp); } |
#endif |
#if _GLIBCPP_HAVE_LDEXPF |
inline float |
_CPP_ldexp_capture(float __x, int __exp) { return ldexpf(__x, __exp); } |
#else |
inline float |
_CPP_ldexp_capture(float __x, int __exp) |
{ return ldexp(static_cast<double>(__x), __exp); } |
#endif |
#if _GLIBCPP_HAVE_LOGF |
inline float |
_CPP_log_capture(float __x) { return logf(__x); } |
#else |
inline float |
_CPP_log_capture(float __x) { return log(static_cast<double>(__x)); } |
#endif |
#if _GLIBCPP_HAVE_LOG10F |
inline float |
_CPP_log10_capture(float __x) { return log10f(__x); } |
#else |
inline float |
_CPP_log10_capture(float __x) { return log10(static_cast<double>(__x)); } |
#endif |
#if _GLIBCPP_HAVE_MODFF |
inline float |
_CPP_modf_capture(float __x, float* __iptr) { return modff(__x, __iptr); } |
#else |
inline float |
_CPP_modf_capture(float __x, float* __iptr) |
{ |
double __tmp; |
double __res = _C_legacy::modf(static_cast<double>(__x), &__tmp); |
*__iptr = static_cast<float> (__tmp); |
return __res; |
} |
#endif |
#if _GLIBCPP_HAVE_POWF |
inline float |
_CPP_pow_capture(float __x, float __y) { return powf(__x, __y); } |
#else |
inline float |
_CPP_pow_capture(float __x, float __y) |
{ return pow(static_cast<double>(__x), static_cast<double>(__y)); } |
#endif |
float pow(float, int); |
#if _GLIBCPP_HAVE___BUILTIN_SINF |
inline float |
_CPP_sin_capture(float __x) { return __builtin_sinf(__x); } |
#elif _GLIBCPP_HAVE_SINF |
inline float |
_CPP_sin_capture(float __x) { return sinf(__x); } |
#else |
inline float |
_CPP_sin_capture(float __x) { return sin(static_cast<double>(__x)); } |
#endif |
#if _GLIBCPP_HAVE_SINHF |
inline float |
_CPP_sinh_capture(float __x) { return sinhf(__x); } |
#else |
inline float |
_CPP_sinh_capture(float __x) { return sinh(static_cast<double>(__x)); } |
#endif |
#if _GLIBCPP_HAVE___BUILTIN_SQRTF |
inline float |
_CPP_sqrt_capture(float __x) { return __builtin_sqrtf(__x); } |
#elif _GLIBCPP_HAVE_SQRTF |
inline float |
_CPP_sqrt_capture(float __x) { return sqrtf(__x); } |
#else |
inline float |
_CPP_sqrt_capture(float __x) { return sqrt(static_cast<double>(__x)); } |
#endif |
#if _GLIBCPP_HAVE_TANF |
inline float |
_CPP_tan_capture(float __x) { return tanf(__x); } |
#else |
inline float |
_CPP_tan_capture(float __x) { return tan(static_cast<double>(__x)); } |
#endif |
#if _GLIBCPP_HAVE_TANHF |
inline float |
_CPP_tanh_capture(float __x) { return tanhf(__x); } |
#else |
inline float |
_CPP_tanh_capture(float __x) { return tanh(static_cast<double>(__x)); } |
#endif |
inline double |
_CPP_acos_capture(double __x) { return acos(__x); } |
inline double |
_CPP_asin_capture(double __x) { return asin(__x); } |
inline double |
_CPP_atan_capture(double __x) { return atan(__x); } |
inline double |
_CPP_atan2_capture(double __y, double __x) { return atan2(__y, __x); } |
inline double |
_CPP_ceil_capture(double __x) { return ceil(__x); } |
#if _GLIBCPP_HAVE___BUILTIN_COS |
inline double |
_CPP_cos_capture(double __x) { return __builtin_cos(__x); } |
#else |
inline double |
_CPP_cos_capture(double __x) { return cos(__x); } |
#endif |
inline double |
_CPP_cosh_capture(double __x) { return cosh(__x); } |
inline double |
_CPP_exp_capture(double __x) { return exp(__x); } |
#if _GLIBCPP_HAVE___BUILTIN_FABS |
inline double |
_CPP_fabs_capture(double __x) { return __builtin_fabs(__x); } |
#else |
inline double |
_CPP_fabs_capture(double __x) { return fabs(__x); } |
#endif |
inline double |
_CPP_floor_capture(double __x) { return floor(__x); } |
inline double |
_CPP_fmod_capture(double __x, double __y) { return fmod(__x, __y); } |
inline double |
_CPP_frexp_capture(double __x, int* __exp) { return frexp(__x, __exp); } |
inline double |
_CPP_ldexp_capture(double __x, int __exp) { return ldexp(__x, __exp); } |
inline double |
_CPP_log_capture(double __x) { return log(__x); } |
inline double |
_CPP_log10_capture(double __x) { return log10(__x); } |
inline double |
_CPP_modf_capture(double __x, double* __iptr) { return modf(__x, __iptr); } |
inline double |
_CPP_pow_capture(double __x, double __y) { return pow(__x, __y); } |
#if _GLIBCPP_HAVE___BUILTIN_SIN |
inline double |
_CPP_sin_capture(double __x) { return __builtin_sin(__x); } |
#else |
inline double |
_CPP_sin_capture(double __x) { return sin(__x); } |
#endif |
inline double |
_CPP_sinh_capture(double __x) { return sinh(__x); } |
#if _GLIBCPP_HAVE___BUILTIN_SQRT |
inline double |
_CPP_sqrt_capture(double __x) { return __builtin_fsqrt(__x); } |
#else |
inline double |
_CPP_sqrt_capture(double __x) { return sqrt(__x); } |
#endif |
inline double |
_CPP_tan_capture(double __x) { return tan(__x); } |
inline double |
_CPP_tanh_capture(double __x) { return tanh(__x); } |
#if _GLIBCPP_HAVE_ACOSL |
inline long double |
_CPP_acos_capture(long double __x) { return acosl(__x); } |
#else |
inline long double |
_CPP_acos_capture(long double __x) { return acos(static_cast<double>(__x)); } |
#endif |
#if _GLIBCPP_HAVE_ASINL |
inline long double |
_CPP_asin_capture(long double __x) { return asinl(__x); } |
#else |
inline long double |
_CPP_asin_capture(long double __x) { return asin(static_cast<double>(__x)); } |
#endif |
#if _GLIBCPP_HAVE_ATANL |
inline long double |
_CPP_atan_capture(long double __x) { return atanl(__x); } |
#else |
inline long double |
_CPP_atan_capture(long double __x) { return atan(static_cast<double>(__x)); } |
#endif |
#if _GLIBCPP_HAVE_ATAN2L |
inline long double |
_CPP_atan2_capture(long double __y, long double __x) |
{ return atan2l(__y, __x); } |
#else |
inline long double |
_CPP_atan2_capture(long double __y, long double __x) |
{ return atan2(static_cast<double>(__y), static_cast<double>(__x)); } |
#endif |
#if _GLIBCPP_HAVE_CEILL |
inline long double |
_CPP_ceil_capture(long double __x) { return ceill(__x); } |
#else |
inline long double |
_CPP_ceil_capture(long double __x) { return ceil(static_cast<double>(__x)); } |
#endif |
#if _GLIBCPP_HAVE___BUILTIN_COSL |
inline long double |
_CPP_cos_capture(long double __x) { return __builtin_cosl(__x); } |
#elif _GLIBCPP_HAVE_COSL |
inline long double |
_CPP_cos_capture(long double __x) { return cosl(__x); } |
#else |
inline long double |
_CPP_cos_capture(long double __x) { return cos(static_cast<double>(__x)); } |
#endif |
#if _GLIBCPP_HAVE_COSHL |
inline long double |
_CPP_cosh_capture(long double __x) { return coshl(__x); } |
#else |
inline long double |
_CPP_cosh_capture(long double __x) { return cosh(static_cast<double>(__x)); } |
#endif |
#if _GLIBCPP_HAVE_EXPL |
inline long double |
_CPP_exp_capture(long double __x) { return expl(__x); } |
#else |
inline long double |
_CPP_exp_capture(long double __x) { return exp(static_cast<double>(__x)); } |
#endif |
#if _GLIBCPP_HAVE___BUILTIN_FABSL |
inline long double |
_CPP_fabs_capture(long double __x) { return __builtin_fabsl(__x); } |
#elif _GLIBCPP_HAVE_FABSL |
inline long double |
_CPP_fabs_capture(long double __x) { return fabsl(__x); } |
#else |
inline long double |
_CPP_fabs_capture(long double __x) { return fabs(static_cast<double>(__x)); } |
#endif |
#if _GLIBCPP_HAVE_FLOORL |
inline long double |
_CPP_floor_capture(long double __x) { return floorl(__x); } |
#else |
inline long double |
_CPP_floor_capture(long double __x) |
{ return floor(static_cast<double>(__x)); } |
#endif |
#if _GLIBCPP_HAVE_FMODL |
inline long double |
_CPP_fmod_capture(long double __x, long double __y) |
{ return fmodl(__x, __y); } |
#else |
inline long double |
_CPP_fmod_capture(long double __x, long double __y) |
{ return fmod(static_cast<double>(__x), static_cast<double>(__y)); } |
#endif |
#if _GLIBCPP_HAVE_FREXPL |
inline long double |
_CPP_frexp_capture(long double __x, int* __exp) |
{ return frexpl(__x, __exp); } |
#else |
inline long double |
_CPP_frexp_capture(long double __x, int* __exp) |
{ return frexp(static_cast<double>(__x), __exp); } |
#endif |
#if _GLIBCPP_HAVE_LDEXPL |
inline long double |
_CPP_ldexp_capture(long double __x, int __exp) { return ldexpl(__x, __exp); } |
#else |
inline long double |
_CPP_ldexp_capture(long double __x, int __exp) |
{ return ldexp(static_cast<double>(__x), __exp); } |
#endif |
#if _GLIBCPP_HAVE_LOGL |
inline long double |
_CPP_log_capture(long double __x) { return logl(__x); } |
#else |
inline long double |
_CPP_log_capture(long double __x) { return log(static_cast<double>(__x)); } |
#endif |
#if _GLIBCPP_HAVE_LOG10L |
inline long double |
_CPP_log10_capture(long double __x) { return log10l(__x); } |
#else |
inline long double |
_CPP_log10_capture(long double __x) |
{ return log10(static_cast<double>(__x)); } |
#endif |
#if _GLIBCPP_HAVE_MODFL |
inline long double |
_CPP_modf_capture(long double __x, long double* __iptr) |
{ return modfl(__x, __iptr); } |
#else |
inline long double |
_CPP_modf_capture(long double __x, long double* __iptr) |
{ |
double __tmp; |
double __res = _C_legacy::modf(static_cast<double>(__x), &__tmp); |
*__iptr = static_cast<long double> (__tmp); |
return __res; |
} |
#endif |
#if _GLIBCPP_HAVE_POWL |
inline long double |
_CPP_pow_capture(long double __x, long double __y) { return powl(__x, __y); } |
#else |
inline long double |
_CPP_pow_capture(long double __x, long double __y) |
{ return pow(static_cast<double>(__x), static_cast<double>(__y)); } |
#endif |
#if _GLIBCPP_HAVE___BUILTIN_SINL |
inline long double |
_CPP_sin_capture(long double __x) { return __builtin_sinl(__x); } |
#elif _GLIBCPP_HAVE_SINL |
inline long double |
_CPP_sin_capture(long double __x) { return sinl(__x); } |
#else |
inline long double |
_CPP_sin_capture(long double __x) { return sin(static_cast<double>(__x)); } |
#endif |
#if _GLIBCPP_HAVE_SINHL |
inline long double |
_CPP_sinh_capture(long double __x) { return sinhl(__x); } |
#else |
inline long double |
_CPP_sinh_capture(long double __x) { return sinh(static_cast<double>(__x)); } |
#endif |
#if _GLIBCPP_HAVE___BUILTIN_SQRTL |
inline long double |
_CPP_sqrt_capture(long double __x) { return __builtin_sqrtl(__x); } |
#elif _GLIBCPP_HAVE_SQRTL |
inline long double |
_CPP_sqrt_capture(long double __x) { return sqrtl(__x); } |
#else |
inline long double |
_CPP_sqrt_capture(long double __x) { return sqrt(static_cast<double>(__x)); } |
#endif |
#if _GLIBCPP_HAVE_TANL |
inline long double |
_CPP_tan_capture(long double __x) { return tanl(__x); } |
#else |
inline long double |
_CPP_tan_capture(long double __x) { return tan(static_cast<double>(__x)); } |
#endif |
#if _GLIBCPP_HAVE_TANHL |
inline long double |
_CPP_tanh_capture(long double __x) { return tanhl(__x); } |
#else |
inline long double |
_CPP_tanh_capture(long double __x) { return tanh(static_cast<double>(__x)); } |
#endif |
} // namespace _C_legacy |
# undef abs |
# undef acos |
# undef asin |
# undef atan |
# undef atan2 |
# undef ceil |
# undef cos |
# undef cosh |
# undef exp |
# undef fabs |
# undef floor |
# undef fmod |
# undef frexp |
# undef ldexp |
# undef log |
# undef log10 |
# undef modf |
# undef pow |
# undef sin |
# undef sinh |
# undef sqrt |
# undef tan |
# undef tanh |
namespace std { |
inline float |
abs(float __x) { return _C_legacy::_CPP_fabs_capture(__x); } |
inline float |
acos(float __x) { return _C_legacy::_CPP_acos_capture(__x); } |
inline float |
asin(float __x) { return _C_legacy::_CPP_asin_capture(__x); } |
inline float |
atan(float __x) { return _C_legacy::_CPP_atan_capture(__x); } |
inline float |
atan2(float __y, float __x) |
{ return _C_legacy::_CPP_atan2_capture(__y, __x); } |
inline float |
ceil(float __x) { return _C_legacy::_CPP_ceil_capture(__x); } |
inline float |
cos(float __x) { return _C_legacy::_CPP_cos_capture(__x); } |
inline float |
cosh(float __x) { return _C_legacy::_CPP_cosh_capture(__x); } |
inline float |
exp(float __x) { return _C_legacy::_CPP_exp_capture(__x); } |
inline float |
fabs(float __x) { return _C_legacy::_CPP_fabs_capture(__x); } |
inline float |
floor(float __x) { return _C_legacy::_CPP_floor_capture(__x); } |
inline float |
fmod(float __x, float __y) |
{ return _C_legacy::_CPP_fmod_capture(__x, __y); } |
inline float |
frexp(float __x, int* __exp) |
{ return _C_legacy::_CPP_frexp_capture(__x, __exp); } |
inline float |
ldexp(float __x, int __exp) |
{ return _C_legacy::_CPP_ldexp_capture(__x, __exp); } |
inline float |
log(float __x) { return _C_legacy::_CPP_log_capture(__x); } |
inline float |
log10(float __x) { return _C_legacy::_CPP_log10_capture(__x); } |
inline float |
modf(float __x, float* __iptr) |
{ return _C_legacy::_CPP_modf_capture(__x, __iptr); } |
inline float |
pow(float __x, float __y) { return _C_legacy::_CPP_pow_capture(__x, __y); } |
float |
pow(float, int); |
inline float |
sin(float __x) { return _C_legacy::_CPP_sin_capture(__x); } |
inline float |
sinh(float __x) { return _C_legacy::_CPP_sinh_capture(__x); } |
inline float |
sqrt(float __x) { return _C_legacy::_CPP_sqrt_capture(__x); } |
inline float |
tan(float __x) { return _C_legacy::_CPP_tan_capture(__x); } |
inline float |
tanh(float __x) { return _C_legacy::_CPP_tanh_capture(__x); } |
inline double |
abs(double __x) { return _C_legacy::_CPP_fabs_capture(__x); } |
inline double |
acos(double __x) { return _C_legacy::_CPP_acos_capture(__x); } |
inline double |
asin(double __x) { return _C_legacy::_CPP_asin_capture(__x); } |
inline double |
atan(double __x) { return _C_legacy::_CPP_atan_capture(__x); } |
inline double |
atan2(double __y, double __x) |
{ return _C_legacy::_CPP_atan2_capture(__y, __x); } |
inline double |
ceil(double __x) { return _C_legacy::_CPP_ceil_capture(__x); } |
inline double |
cos(double __x) { return _C_legacy::_CPP_cos_capture(__x); } |
inline double |
cosh(double __x) { return _C_legacy::_CPP_cosh_capture(__x); } |
inline double |
exp(double __x) { return _C_legacy::_CPP_exp_capture(__x); } |
inline double |
fabs(double __x) { return _C_legacy::_CPP_fabs_capture(__x); } |
inline double |
floor(double __x) { return _C_legacy::_CPP_floor_capture(__x); } |
inline double |
fmod(double __x, double __y) |
{ return _C_legacy::_CPP_fmod_capture(__x, __y); } |
inline double |
frexp(double __x, int* __exp) |
{ return _C_legacy::_CPP_frexp_capture(__x, __exp); } |
inline double |
ldexp(double __x, int __exp) |
{ return _C_legacy::_CPP_ldexp_capture(__x, __exp); } |
inline double |
log(double __x) { return _C_legacy::_CPP_log_capture(__x); } |
inline double |
log10(double __x) { return _C_legacy::_CPP_log10_capture(__x); } |
inline double |
modf(double __x, double* __iptr) |
{ return _C_legacy::_CPP_modf_capture(__x, __iptr); } |
inline double |
pow(double __x, double __y) |
{ return _C_legacy::_CPP_pow_capture(__x, __y); } |
double |
pow(double, int); |
inline double |
sin(double __x) { return _C_legacy::_CPP_sin_capture(__x); } |
inline double |
sinh(double __x) { return _C_legacy::_CPP_sinh_capture(__x); } |
inline double |
sqrt(double __x) { return _C_legacy::_CPP_sqrt_capture(__x); } |
inline double |
tan(double __x) { return _C_legacy::_CPP_tan_capture(__x); } |
inline double |
tanh(double __x) { return _C_legacy::_CPP_tanh_capture(__x); } |
inline long double |
abs(long double __x) { return _C_legacy::_CPP_fabs_capture(__x); } |
inline long double |
acos(long double __x) { return _C_legacy::_CPP_acos_capture(__x); } |
inline long double |
asin(long double __x) { return _C_legacy::_CPP_asin_capture(__x); } |
inline long double |
atan(long double __x) { return _C_legacy::_CPP_atan_capture(__x); } |
inline long double |
atan2(long double __y, long double __x) |
{ return _C_legacy::_CPP_atan2_capture(__y, __x); } |
inline long double |
ceil(long double __x) { return _C_legacy::_CPP_ceil_capture(__x); } |
inline long double |
cos(long double __x) { return _C_legacy::_CPP_cos_capture(__x); } |
inline long double |
cosh(long double __x) { return _C_legacy::_CPP_cosh_capture(__x); } |
inline long double |
exp(long double __x) { return _C_legacy::_CPP_exp_capture(__x); } |
inline long double |
fabs(long double __x) { return _C_legacy::_CPP_fabs_capture(__x); } |
inline long double |
floor(long double __x) { return _C_legacy::_CPP_floor_capture(__x); } |
inline long double |
fmod(long double __x, long double __y) |
{ return _C_legacy::_CPP_fmod_capture(__x, __y); } |
inline long double |
frexp(long double __x, int* __exp) |
{ return _C_legacy::_CPP_frexp_capture(__x, __exp); } |
inline long double |
ldexp(long double __x, int __exp) |
{ return _C_legacy::_CPP_ldexp_capture(__x, __exp); } |
inline long double |
log(long double __x) { return _C_legacy::_CPP_log_capture(__x); } |
inline long double |
log10(long double __x) { return _C_legacy::_CPP_log10_capture(__x); } |
inline long double |
modf(long double __x, long double* __iptr) |
{ return _C_legacy::_CPP_modf_capture(__x, __iptr); } |
inline long double |
pow(long double __x, long double __y) |
{ return _C_legacy::_CPP_pow_capture(__x, __y); } |
long double |
pow(long double, int); |
inline long double |
sin(long double __x) { return _C_legacy::_CPP_sin_capture(__x); } |
inline long double |
sinh(long double __x) { return _C_legacy::_CPP_sinh_capture(__x); } |
inline long double |
sqrt(long double __x) { return _C_legacy::_CPP_sqrt_capture(__x); } |
inline long double |
tan(long double __x) { return _C_legacy::_CPP_tan_capture(__x); } |
inline long double |
tanh(long double __x) { return _C_legacy::_CPP_tanh_capture(__x); } |
} // namespace std |
# undef _IN_C_LEGACY_ |
#endif |
/contrib/media/updf/include/c_shadow/bits/std_csetjmp.h |
---|
0,0 → 1,63 |
// -*- C++ -*- header wrapper. |
// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
// |
// ISO C++ 14882: 20.4.6 C library |
// |
#ifndef _CPP_CSETJMP |
#define _CPP_CSETJMP 1 |
namespace _C_legacy { |
extern "C" { |
# define _IN_C_LEGACY_ |
# pragma GCC system_header |
# include_next <setjmp.h> |
} |
inline int |
_CPP_setjmp_capture(jmp_buf __jb) { return setjmp(__jb); } |
} // namespace _C_legacy |
# undef jmp_buf |
# undef setjmp |
# define setjmp(__jb) _C_legacy::_CPP_setjmp_capture(__jb) |
# undef longjmp |
namespace std { |
// Adopt C names into std:: |
using _C_legacy::jmp_buf; |
using _C_legacy::longjmp; |
} // namespace std |
# undef _IN_C_LEGACY_ |
#endif |
/contrib/media/updf/include/c_shadow/bits/std_csignal.h |
---|
0,0 → 1,67 |
// -*- C++ -*- header wrapper. |
// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
// |
// ISO C++ 14882: 20.4.6 C library |
// |
#ifndef _CPP_CSIGNAL |
#define _CPP_CSIGNAL 1 |
namespace _C_legacy { |
extern "C" { |
# define _IN_C_LEGACY_ |
// XXX |
# undef __need_sig_atomic_t |
# undef __need_sigset_t |
# pragma GCC system_header |
# include_next <signal.h> |
} |
} // namespace _C_legacy |
# undef sig_atomic_t |
# undef raise |
# undef signal |
namespace std { |
// Adopt C names into std:: |
using _C_legacy::sig_atomic_t; |
using _C_legacy::raise; |
using _C_legacy::signal; |
} // namespace std |
# undef _IN_C_LEGACY_ |
#endif |
/contrib/media/updf/include/c_shadow/bits/std_cstdarg.h |
---|
0,0 → 1,54 |
// -*- C++ -*- header wrapper. |
// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
// |
// ISO C++ 14882: 20.4.6 C library |
// |
#ifndef _CPP_CSTDARG |
#define _CPP_CSTDARG 1 |
namespace _C_legacy { |
extern "C" { |
# define _IN_C_LEGACY_ |
# pragma GCC system_header |
# include_next <stdarg.h> |
} |
} // namespace _C_legacy |
# undef va_list |
namespace std { |
using _C_legacy::va_list; |
} // namespace std |
# undef _IN_C_LEGACY_ |
#endif |
/contrib/media/updf/include/c_shadow/bits/std_cstddef.h |
---|
0,0 → 1,59 |
// -*- C++ -*- header wrapper. |
// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
// |
// ISO C++ 14882: 18.1 Types |
// |
#ifndef _CPP_CSTDDEF |
#define _CPP_CSTDDEF 1 |
namespace _C_legacy { |
extern "C" { |
# define _IN_C_LEGACY_ |
# pragma GCC system_header |
// XXX |
# define __need_size_t |
# define __need_ptrdiff_t |
# define __need_NULL |
# include_next <stddef.h> |
} |
} // namespace _C_legacy |
# undef ptrdiff_t |
# undef size_t |
namespace std { |
using _C_legacy::ptrdiff_t; |
using _C_legacy::size_t; |
} // namespace std |
# undef _IN_C_LEGACY_ |
#endif |
/contrib/media/updf/include/c_shadow/bits/std_cstdio.h |
---|
0,0 → 1,283 |
// -*- C++ -*- header wrapper. |
// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
// |
// ISO C++ 14882: 27.8.2 C Library files |
// |
#ifndef _CPP_CSTDIO |
#define _CPP_CSTDIO 1 |
# include <bits/std_cstddef.h> |
# include <bits/std_cstdarg.h> |
namespace _C_legacy { |
extern "C" { |
# define _IN_C_LEGACY_ |
# undef __need_FILE |
# pragma GCC system_header |
# include_next <stdio.h> |
} |
typedef FILE _CPP_FILE_capture; |
typedef fpos_t _CPP_fpos_t_capture; |
inline FILE* |
_CPP_stderr_capture() { return stderr; } |
inline FILE* |
_CPP_stdin_capture() { return stdin; } |
inline FILE* |
_CPP_stdout_capture() { return stdout; } |
inline int |
_CPP_getc_capture(FILE* __f) { return getc(__f); } |
inline int |
_CPP_getchar_capture() { return getchar(); } |
inline int |
_CPP_putc_capture(int __c, FILE* __f) { return putc(__c, __f); } |
inline int |
_CPP_putchar_capture(int __c) { return putchar(__c); } |
inline int |
_CPP_feof_capture(FILE* __f) { return feof(__f); } |
} // namespace _C_legacy |
# undef FILE |
# undef fpos_t |
# undef remove |
# undef rename |
# undef tmpfile |
# undef tmpnam |
# undef fclose |
# undef fflush |
# undef fopen |
# undef freopen |
# undef setbuf |
# undef setvbuf |
# undef fprintf |
# undef fscanf |
# undef printf |
# undef scanf |
# undef sprintf |
# undef sscanf |
# undef vfprintf |
# undef vprintf |
# undef vsprintf |
# undef fgetc |
# undef fgets |
# undef fputc |
# undef fputs |
# undef getc |
# undef getchar |
# undef gets |
# undef putc |
# undef putchar |
# undef puts |
# undef ungetc |
# undef fread |
# undef fwrite |
# undef fgetpos |
# undef fseek |
# undef fsetpos |
# undef ftell |
# undef rewind |
# undef clearerr |
# undef feof |
# undef ferror |
# undef perror |
# undef stderr |
# define stderr std::_CPP_stderr() |
# undef stdin |
# define stdin std::_CPP_stdin() |
# undef stdout |
# define stdout std::_CPP_stdout() |
namespace std { |
struct FILE : _C_legacy::_CPP_FILE_capture { }; |
struct fpos_t { _C_legacy::_CPP_fpos_t_capture _M_dummy; }; |
using _C_legacy::remove; |
using _C_legacy::rename; |
using _C_legacy::tmpnam; |
using _C_legacy::printf; |
using _C_legacy::scanf; |
using _C_legacy::sprintf; |
using _C_legacy::sscanf; |
using _C_legacy::gets; |
using _C_legacy::perror; |
inline FILE* |
_CPP_stderr() |
{ return reinterpret_cast<FILE*>(_C_legacy::_CPP_stderr_capture() ); } |
inline FILE* |
_CPP_stdin() |
{ return reinterpret_cast<FILE*>(_C_legacy::_CPP_stdin_capture() ); } |
inline FILE* |
_CPP_stdout() |
{ return reinterpret_cast<FILE*>(_C_legacy::_CPP_stdout_capture() ); } |
inline FILE* |
tmpfile() { return reinterpret_cast<FILE*>(_C_legacy::tmpfile()); } |
inline int |
fclose(FILE* __f) { return _C_legacy::fclose(__f); } |
inline int |
fflush(FILE* __f) { return _C_legacy::fflush(__f); } |
inline FILE* |
fopen(char const* __name, char const* __mode) |
{ return reinterpret_cast<FILE*>(_C_legacy::fopen(__name,__mode)); } |
inline FILE* |
freopen(char const* __name, char const* __mode, FILE* __f) |
{ return reinterpret_cast<FILE*>(_C_legacy::freopen(__name,__mode,__f)); } |
inline void |
setbuf(FILE* __f, char* __buf) |
{ return _C_legacy::setbuf(__f, __buf); } |
inline int |
setvbuf(FILE* __f, char* __buf, int __mode, size_t __size) |
{ return _C_legacy::setvbuf(__f, __buf, __mode, __size); } |
inline int |
fprintf(FILE* __f, char const* __fmt, ...) |
{ |
va_list __v; |
va_start(__v,__fmt); |
int __i = _C_legacy::vfprintf(__f, __fmt, __v); |
va_end(__v); |
return __i; |
} |
inline int |
fscanf(FILE* __f, char const* __fmt, ...) |
{ |
va_list __v; |
va_start(__v,__fmt); |
int __i = _C_legacy::vfscanf(__f, __fmt, __v); |
va_end(__v); |
return __i; |
} |
inline int |
vfprintf(FILE* __f, char const* __fmt, va_list __v) |
{ return _C_legacy::vfprintf(__f, __fmt, __v); } |
inline int |
vprintf(char const* __fmt, va_list __v) |
{ return _C_legacy::vprintf(__fmt, __v); } |
inline int |
vsprintf(char* __buf, char const* __fmt, va_list __v) |
{ return _C_legacy::vsprintf(__buf, __fmt, __v); } |
inline int |
fgetc(FILE* __f) { return _C_legacy::fgetc(__f); } |
inline char* |
fgets(char* __buf, int __n, FILE* __f) |
{ return _C_legacy::fgets(__buf, __n, __f); } |
inline int |
fputc(int __c, FILE* __f) { return _C_legacy::fputc(__c, __f); } |
inline int |
fputs(char const* __s, FILE* __f) |
{ return _C_legacy::fputs(__s, __f); } |
inline int |
getc(FILE* __f) { return _C_legacy::_CPP_getc_capture(__f); } |
inline int |
getchar() { return _C_legacy::_CPP_getchar_capture(); } |
inline int |
putc(int __c, FILE* __f) |
{ return _C_legacy::_CPP_putc_capture(__c, __f); } |
inline int |
putchar(int __c) { return _C_legacy::_CPP_putchar_capture(__c); } |
using _C_legacy::puts; |
inline int |
ungetc(int __c, FILE* __f) { return _C_legacy::ungetc(__c, __f); } |
inline size_t |
fread(void* __p, size_t __z, size_t __n, FILE* __f) |
{ return _C_legacy::fread(__p,__z,__n,__f); } |
inline size_t |
fwrite(void const* __p, size_t __z, size_t __n, FILE* __f) |
{ return _C_legacy::fwrite(__p,__z,__n,__f); } |
inline int |
fgetpos(FILE* __f, fpos_t* __pos) |
{ return _C_legacy::fgetpos(__f,&__pos->_M_dummy); } |
inline int |
fseek(FILE* __f, long __off, int __how) |
{ return _C_legacy::fseek(__f,__off,__how); } |
inline int |
fsetpos(FILE* __f, fpos_t const* __pos) |
{ return _C_legacy::fsetpos(__f,&__pos->_M_dummy); } |
inline long |
ftell(FILE* __f) { return _C_legacy::ftell(__f); } |
inline void |
rewind(FILE* __f) { return _C_legacy::rewind(__f); } |
inline void |
clearerr(FILE* __f) { return _C_legacy::clearerr(__f); } |
inline int |
feof(FILE* __f) { return _C_legacy::_CPP_feof_capture(__f); } |
inline int |
ferror(FILE* __f) { return _C_legacy::ferror(__f); } |
} // namespace std |
# undef _IN_C_LEGACY_ |
#endif |
/contrib/media/updf/include/c_shadow/bits/std_cstdlib.h |
---|
0,0 → 1,197 |
// -*- C++ -*- header wrapper |
// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
// |
// ISO C++ 14882: 20.4.6 C library |
// |
// Function decls in this header are overloaded on the |
// extern "C"-ness of arguments. This is a rich ground |
// for compiler bugs. |
#ifndef _CPP_CSTDLIB |
#define _CPP_CSTDLIB 1 |
# include <bits/c++config.h> |
# include <bits/std_cstddef.h> |
namespace _C_legacy { |
extern "C" { |
# define _IN_C_LEGACY_ |
# pragma GCC system_header |
# include_next <stdlib.h> |
typedef int (*_C_cmp_fun_ptr)(const void*, const void*); // C fn ptr |
} |
typedef div_t _CPP_div_t_capture; |
typedef ldiv_t _CPP_ldiv_t_capture; |
# if _GLIBCPP_HAVE_LLDIV_T |
typedef lldiv_t _CPP_lldiv_t_capture; |
# endif |
} // namespace _C_legacy |
# undef wchar_t |
# undef div_t |
# undef ldiv_t |
# undef atof |
# undef atoi |
# undef atol |
# undef strtod |
# undef strtol |
# undef strtoul |
#ifdef _GLIBCPP_HAVE_STRTOLD |
# undef strtold |
#endif |
# undef rand |
# undef srand |
# undef calloc |
# undef free |
# undef malloc |
# undef realloc |
# undef abort |
# undef atexit |
# undef exit |
# undef getenv |
# undef system |
# undef bsearch |
# undef qsort |
# undef abs |
# undef div |
# undef labs |
# undef ldiv |
#ifdef _GLIBCPP_USE_LONG_LONG |
# undef llabs |
# undef lldiv |
#endif |
# undef mblen |
# undef mbtowc |
# undef wctomb |
# undef mbstowcs |
# undef wcstombs |
namespace std { |
struct div_t : _C_legacy::_CPP_div_t_capture { }; |
struct ldiv_t : _C_legacy::_CPP_ldiv_t_capture { }; |
#ifdef _GLIBCPP_USE_LONG_LONG |
# ifdef _GLIBCPP_HAVE_LLDIV_T |
struct lldiv_t : _C_legacy::_CPP_lldiv_t_capture { }; |
# else |
struct lldiv_t |
{ |
long long quot; |
long long rem; |
}; |
# endif |
#endif |
using _C_legacy::atof; |
using _C_legacy::atoi; |
using _C_legacy::atol; |
using _C_legacy::strtod; |
using _C_legacy::strtol; |
using _C_legacy::strtoul; |
using _C_legacy::rand; |
using _C_legacy::srand; |
using _C_legacy::calloc; |
using _C_legacy::free; |
using _C_legacy::malloc; |
using _C_legacy::realloc; |
// using _C_legacy::abort; |
using _C_legacy::atexit; |
// using _C_legacy::exit; |
using _C_legacy::bsearch; |
using _C_legacy::qsort; |
using _C_legacy::getenv; |
using _C_legacy::system; |
using _C_legacy::mbtowc; |
using _C_legacy::wctomb; |
using _C_legacy::mbstowcs; |
using _C_legacy::wcstombs; |
using _C_legacy::strtof; |
#ifdef _GLIBCPP_USE_LONG_LONG |
using _C_legacy::strtoll; |
using _C_legacy::strtoull; |
#endif |
#ifdef _GLIBCPP_HAVE_STRTOLD |
using _C_legacy::strtold; |
#endif |
using _C_legacy::mblen; |
inline int |
abs(int __x) { return __x >= 0 ? __x : -__x; } |
inline div_t |
div(int __n, int __d) |
{ div_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; } |
inline long |
labs(long __x) { return __x >= 0 ? __x : -__x; } |
inline long |
abs(long __x) { return __x >= 0 ? __x : -__x; } |
inline ldiv_t |
ldiv(long __n, long __d) |
{ ldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; } |
inline ldiv_t |
div(long __n, long __d) |
{ ldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; } |
#ifdef _GLIBCPP_USE_LONG_LONG |
inline long long |
llabs(long long __x) { return __x >= 0 ? __x : -__x; } |
inline long long |
abs(long long __x) { return __x >= 0 ? __x : -__x; } |
inline lldiv_t |
lldiv(long long __n, long long __d) |
{ lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; } |
inline lldiv_t |
div(long long __n, long long __d) |
{ lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; } |
#endif |
} // namespace std |
# undef _IN_C_LEGACY_ |
#endif |
/contrib/media/updf/include/c_shadow/bits/std_cstring.h |
---|
0,0 → 1,279 |
// -*- C++ -*- header wrapper. |
// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
// |
// ISO C++ 14882: 20.4.6 C library |
// |
#ifndef _CPP_CSTRING |
#define _CPP_CSTRING 1 |
# if defined __GLIBC__ && __GLIBC__ >= 2 |
// We must not see the optimized string functions GNU libc defines. |
# define __NO_STRING_INLINES |
# endif |
# include <bits/std_cstddef.h> |
namespace _C_legacy { |
extern "C" { |
# define _IN_C_LEGACY_ |
# pragma GCC system_header |
# include_next <string.h> |
} |
// We do inline captures of most of these in case they |
// have been optimized with macros. |
inline void* |
_CPP_memcpy_capture(void* __s1, void const* __s2, size_t __n) |
{ return memcpy(__s1, __s2, __n); } |
inline void* |
_CPP_memmove_capture(void* __s1, void const* __s2, size_t __n) |
{ return memmove(__s1, __s2, __n); } |
inline void* |
_CPP_strcpy_capture(char* __s1, char const* __s2) |
{ return strcpy(__s1, __s2); } |
inline char* |
_CPP_strncpy_capture(char* __s1, char const* __s2, size_t __n) |
{ return strncpy(__s1, __s2, __n); } |
inline char* |
_CPP_strcat_capture(char* __s1, char const* __s2) |
{ return strcat(__s1, __s2); } |
inline char* |
_CPP_strncat_capture(char* __s1, char const* __s2, size_t __n) |
{ return strncat(__s1, __s2, __n); } |
inline int |
_CPP_memcmp_capture(void const* __s1, void const* __s2, size_t __n) |
{ return memcmp(__s1, __s2, __n); } |
inline int |
_CPP_strcmp_capture(char const* __s1, char const* __s2) |
{ return strcmp(__s1, __s2); } |
inline int |
_CPP_strcoll_capture(char const* __s1, char const* __s2) |
{ return strcoll(__s1, __s2); } |
inline int |
_CPP_strncmp_capture(char const* __s1, char const* __s2, size_t __n) |
{ return strncmp(__s1, __s2, __n); } |
inline size_t |
_CPP_strxfrm_capture(char* __b, char const* __s, size_t __n) |
{ return strxfrm(__b, __s, __n); } |
inline void* |
_CPP_memchr_capture(void const* __s1, int __c, size_t __n) |
{ return memchr(__s1, __c, __n); } |
inline char* |
_CPP_strchr_capture(char const* __s1, int __c) |
{ return strchr(__s1, __c); } |
inline size_t |
_CPP_strcspn_capture(char const* __s1, char const* __s2) |
{ return strcspn(__s1, __s2); } |
inline char* |
_CPP_strpbrk_capture(char const* __s1, char const* __s2) |
{ return strpbrk(__s1, __s2); } |
inline char* |
_CPP_strrchr_capture(char const* __s1, int __c) |
{ return strrchr(__s1, __c); } |
inline size_t |
_CPP_strspn_capture(char const* __s1, char const* __s2) |
{ return strspn(__s1, __s2); } |
inline char* |
_CPP_strstr_capture(char const* __s1, char const* __s2) |
{ return strstr(__s1, __s2); } |
inline char* |
_CPP_strtok_capture(char* __s1, char const* __s2) |
{ return strtok(__s1, __s2); } |
inline void* |
_CPP_memset_capture(void* __s, int __c, size_t __n) |
{ return memset(__s, __c, __n); } |
// inline char* |
// _CPP_strerror_capture(int __num) |
// { return strerror(__num); } |
inline size_t |
_CPP_strlen_capture(char const* __s) |
{ return strlen(__s); } |
} // namespace _C_legacy |
# undef memcpy |
# undef memmove |
# undef strcpy |
# undef strncpy |
# undef strcat |
# undef strncat |
# undef memcmp |
# undef strcmp |
# undef strcoll |
# undef strncmp |
# undef strxfrm |
# undef memchr |
# undef strchr |
# undef strcspn |
# undef strpbrk |
# undef strrchr |
# undef strspn |
# undef strstr |
# undef strtok |
# undef memset |
# undef strerror |
# undef strlen |
namespace std { |
// Redefine most of these inline. Note that the |
// C++ definition differs from C in some cases. |
inline void* |
memcpy(void* __s1, void const* __s2, size_t __n) |
{ return _C_legacy::_CPP_memcpy_capture(__s1, __s2, __n); } |
inline void* |
memmove(void* __s1, void const* __s2, size_t __n) |
{ return _C_legacy::_CPP_memmove_capture(__s1, __s2, __n); } |
inline void* |
strcpy(char* __s1, char const* __s2) |
{ return _C_legacy::_CPP_strcpy_capture(__s1, __s2); } |
inline char* |
strncpy(char* __s1, char const* __s2, size_t __n) |
{ return _C_legacy::_CPP_strncpy_capture(__s1, __s2, __n); } |
inline char* |
strcat(char* __s1, char const* __s2) |
{ return _C_legacy::_CPP_strcat_capture(__s1, __s2); } |
inline char* |
strncat(char* __s1, char const* __s2, size_t __n) |
{ return _C_legacy::_CPP_strncat_capture(__s1, __s2, __n); } |
inline int |
memcmp(void const* __s1, void const* __s2, size_t __n) |
{ return _C_legacy::_CPP_memcmp_capture(__s1, __s2, __n); } |
inline int |
strcmp(char const* __s1, char const* __s2) |
{ return _C_legacy::_CPP_strcmp_capture(__s1, __s2); } |
inline int |
strcoll(char const* __s1, char const* __s2) |
{ return _C_legacy::_CPP_strcoll_capture(__s1, __s2); } |
inline int |
strncmp(char const* __s1, char const* __s2, size_t __n) |
{ return _C_legacy::_CPP_strncmp_capture(__s1, __s2, __n); } |
inline size_t |
strxfrm(char* __b, char const* __s, size_t __n) |
{ return _C_legacy::_CPP_strxfrm_capture(__b, __s, __n); } |
inline void |
const* memchr(void const* __s1, int __c, size_t __n) |
{ return _C_legacy::_CPP_memchr_capture(__s1, __c, __n); } |
inline void* |
memchr(void* __s1, int __c, size_t __n) |
{ return _C_legacy::_CPP_memchr_capture(__s1, __c, __n); } |
inline char const* |
strchr(char const* __s1, int __c) |
{ return _C_legacy::_CPP_strchr_capture(__s1, __c); } |
inline char* |
strchr(char* __s1, int __c) |
{ return _C_legacy::_CPP_strchr_capture(__s1, __c); } |
inline size_t |
strcspn(char const* __s1, char const* __s2) |
{ return _C_legacy::_CPP_strcspn_capture(__s1, __s2); } |
inline char const* |
strpbrk(char const* __s1, char const* __s2) |
{ return _C_legacy::_CPP_strpbrk_capture(__s1, __s2); } |
inline char* |
strpbrk(char* __s1, char const* __s2) |
{ return _C_legacy::_CPP_strpbrk_capture(__s1, __s2); } |
inline char const* |
strrchr(char const* __s1, int __c) |
{ return _C_legacy::_CPP_strrchr_capture(__s1, __c); } |
inline char* |
strrchr(char* __s1, int __c) |
{ return _C_legacy::_CPP_strrchr_capture(__s1, __c); } |
inline size_t |
strspn(char const* __s1, char const* __s2) |
{ return _C_legacy::_CPP_strspn_capture(__s1, __s2); } |
inline char const* |
strstr(char const* __s1, char const* __s2) |
{ return _C_legacy::_CPP_strstr_capture(__s1, __s2); } |
inline char* |
strstr(char* __s1, char const* __s2) |
{ return _C_legacy::_CPP_strstr_capture(__s1, __s2); } |
inline char* |
strtok(char* __s1, char const* __s2) |
{ return _C_legacy::_CPP_strtok_capture(__s1, __s2); } |
inline void* |
memset(void* __s, int __c, size_t __n) |
{ return _C_legacy::_CPP_memset_capture(__s, __c, __n); } |
using _C_legacy::strerror; |
inline size_t |
strlen(char const* __s) |
{ return _C_legacy::_CPP_strlen_capture(__s); } |
} // namespace std |
# undef _IN_C_LEGACY_ |
#endif |
/contrib/media/updf/include/c_shadow/bits/std_ctime.h |
---|
0,0 → 1,107 |
// -*- C++ -*- header wrapper. |
// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
// |
// ISO C++ 14882: 20.5 Date and time |
// |
#ifndef _CPP_CTIME |
#define _CPP_CTIME 1 |
# include <bits/std_cstddef.h> |
namespace _C_legacy { |
extern "C" { |
# define _IN_C_LEGACY_ |
# pragma GCC system_header |
// XXX |
// glibc 2.1.x time.h is on crack |
# undef __need_time_t |
# undef __need_clock_t |
# undef __need_timespec |
# include_next <time.h> |
} |
typedef clock_t _CPP_clock_t_capture; |
typedef time_t _CPP_time_t_capture; |
typedef tm _CPP_tm_capture; |
} // namespace _C_legacy |
# undef clock_t |
# undef time_t |
# undef tm |
# undef clock |
# undef difftime |
# undef mktime |
# undef time |
# undef asctime |
# undef ctime |
# undef gmtime |
# undef localtime |
# undef strftime |
namespace std { |
// Adopt C names into std:: |
typedef _C_legacy::_CPP_clock_t_capture clock_t; |
typedef _C_legacy::_CPP_time_t_capture time_t; |
struct tm : _C_legacy::_CPP_tm_capture { }; |
using _C_legacy::clock; |
using _C_legacy::difftime; |
using _C_legacy::mktime; |
using _C_legacy::time; |
using _C_legacy::ctime; |
inline char* |
asctime(const tm* __t) |
{ return _C_legacy::asctime(static_cast<_C_legacy::_CPP_tm_capture const*>(__t)); } |
inline tm* |
gmtime(time_t const* __tp) |
{ return reinterpret_cast<tm*>(_C_legacy::gmtime(__tp)); } |
inline tm* |
localtime(const time_t* __tp) |
{ return reinterpret_cast<tm*>(_C_legacy::localtime(__tp)); } |
inline size_t |
strftime(char* __buf, size_t __maxsz, char const* __fmt, tm const* __tp) |
{ return _C_legacy::strftime(__buf, __maxsz, __fmt, |
static_cast<_C_legacy::_CPP_tm_capture const*>(__tp)); } |
} // namespace std |
# undef _IN_C_LEGACY_ |
#endif |
/contrib/media/updf/include/c_shadow/bits/std_cwchar.h |
---|
0,0 → 1,275 |
// -*- C++ -*- header wrapper. |
// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
// |
// ISO C++ 14882: 21 |
#ifndef _CPP_CWCHAR |
# define _CPP_CWCHAR 1 |
# include <bits/std_cstdio.h> |
namespace _C_legacy { |
extern "C" { |
# define _IN_C_LEGACY_ |
# pragma GCC system_header |
# include_next <wchar.h> |
} |
#if 0 |
// XXX |
inline int |
fwprintf(FILE* __stream, const wchar_t* __format, ...); |
inline int |
fwscanf(FILE* __stream, const wchar_t* __format, ...); |
inline int |
vfwprintf(FILE* __stream, const wchar_t* __format, va_list __arg); |
inline int |
vfwscanf(FILE* __stream, const wchar_t* __format, va_list __arg); |
inline wint_t |
_CPP_fgetwc_capture(FILE* __stream) |
{ return fgetwc(__stream); } |
inline wchar_t* |
_CPP_fgetws_capture(wchar_t* __s, int __n, FILE* __stream) |
{ return fgetws(__s, __n, __stream); } |
inline wint_t |
_CPP_fputwc_capture(wchar_t __c, FILE* __stream) |
{ return fputwc(__c, __stream); } |
inline int |
_CPP_fputws_capture(const wchar_t* __s, FILE* __stream) |
{ return fputws(__s, __stream); } |
inline int |
_CPP_fwide_capture(FILE* __stream, int __mode) |
{ return fwide(__stream, __mode); } |
inline wint_t |
_CPP_fgetwc_capture(FILE* __stream) |
{ return fgetwc(__stream); } |
inline wint_t |
_CPP_putwc_capture(wchar_t __c, FILE* __stream) |
{ return putwc(__c, __stream); } |
inline wint_t |
_CPP_ungetwc_capture(wint_t __c, FILE* __stream) |
{ return ungetwc(__c, __stream); } |
#endif |
} // namespace _C_legacy |
# undef wchar_t |
# undef wint_t |
# undef mbstate_t |
# undef fwprintf |
# undef fwscanf |
# undef swprintf |
# undef swscanf |
# undef vfwprintf |
# undef vfwscanf |
# undef vswprintf |
# undef vswscanf |
# undef vwprintf |
# undef vwscanf |
# undef wprintf |
# undef wscanf |
# undef fgetwc |
# undef fgetws |
# undef fputwc |
# undef fputws |
# undef fwide |
# undef getwc |
# undef getwchar |
# undef putwc |
# undef putwchar |
# undef ungetwc |
# undef wcstod |
# undef wcstof |
# undef wcstold |
# undef wcstol |
# undef wcstoll |
# undef wcstoul |
# undef wcstoull |
# undef wcscpy |
# undef wcsncpy |
# undef wcscat |
# undef wcsncat |
# undef wcsmp |
# undef wcscoll |
# undef wcsncmp |
# undef wcsxfrm |
# undef wcschr |
# undef wcscspn |
# undef wcslen |
# undef wcspbrk |
# undef wcsrchr |
# undef wcsspn |
# undef wcsstr |
# undef wcstok |
# undef wmemchr |
# undef wmemcmp |
# undef wmemcpy |
# undef wmemmove |
# undef wmemset |
# undef wcsftime |
# undef btowc |
# undef wctob |
# undef mbsinit |
# undef mbrlen |
# undef mbrtowc |
# undef wcrtomb |
# undef mbsrtowcs |
# undef wcsrtombs |
namespace std { |
using _C_legacy::wint_t; |
using _C_legacy::mbstate_t; |
#if 0 |
using _C_legacy::swprintf; |
using _C_legacy::swscanf; |
using _C_legacy::vswprintf; |
using _C_legacy::vswscanf; |
using _C_legacy::vwprintf; |
using _C_legacy::vwscanf; |
using _C_legacy::wprintf; |
using _C_legacy::wscanf; |
using _C_legacy::getwchar; |
using _C_legacy::putwchar; |
#endif |
using _C_legacy::wcstod; |
using _C_legacy::wcstof; |
using _C_legacy::wcstold; |
using _C_legacy::wcstol; |
using _C_legacy::wcstoll; |
using _C_legacy::wcstoul; |
using _C_legacy::wcstoull; |
using _C_legacy::wcscpy; |
using _C_legacy::wcsncpy; |
using _C_legacy::wcscat; |
using _C_legacy::wcsncat; |
#if 0 |
using _C_legacy::wcsmp; |
#endif |
using _C_legacy::wcscoll; |
using _C_legacy::wcsncmp; |
using _C_legacy::wcsxfrm; |
using _C_legacy::wcschr; |
using _C_legacy::wcscspn; |
using _C_legacy::wcslen; |
using _C_legacy::wcspbrk; |
using _C_legacy::wcsrchr; |
using _C_legacy::wcsspn; |
using _C_legacy::wcsstr; |
using _C_legacy::wcstok; |
using _C_legacy::wmemchr; |
using _C_legacy::wmemcmp; |
using _C_legacy::wmemcpy; |
using _C_legacy::wmemmove; |
using _C_legacy::wmemset; |
#if 0 |
using _C_legacy::wcsftime; |
#endif |
using _C_legacy::btowc; |
using _C_legacy::wctob; |
using _C_legacy::mbsinit; |
using _C_legacy::mbrlen; |
using _C_legacy::mbrtowc; |
using _C_legacy::wcrtomb; |
using _C_legacy::mbsrtowcs; |
using _C_legacy::wcsrtombs; |
#if 0 |
// XXX |
inline int |
fwprintf(FILE* __stream, const wchar_t* __format, ...); |
inline int |
fwscanf(FILE* __stream, const wchar_t* __format, ...); |
inline int |
vfwprintf(FILE* __stream, const wchar_t* __format, va_list __arg); |
inline int |
vfwscanf(FILE* __stream, const wchar_t* __format, va_list __arg); |
inline wint_t |
fgetwc(FILE* __stream) |
{ return _C_legacy::_CPP_fgetwc_capture(__stream); } |
inline wchar_t* |
fgetws(wchar_t* __s, int __n, FILE* __stream) |
{ return _C_legacy::_CPP_fgetws_capture(__s, __n, __stream); } |
inline wint_t |
fputwc(wchar_t __c, FILE* __stream) |
{ return _C_legacy::_CPP_fputwc_capture(__c, __stream); } |
inline int |
fputws(const wchar_t* __s, FILE* __stream) |
{ return _C_legacy::_CPP_fputws_capture(__s, __stream); } |
inline int |
fwide(FILE* __stream, int __mode) |
{ return _C_legacy::_CPP_fwide_capture(__stream, __mode); } |
inline wint_t |
getwc(FILE* __stream) |
{ return _C_legacy::_CPP_getwc_capture(__stream); } |
inline wint_t |
putwc(wchar_t __c, FILE* __stream) |
{ return _C_legacy::_CPP_putwc_capture(__c, __stream); } |
inline wint_t |
ungetwc(wint_t __c, FILE* __stream) |
{ return _C_legacy::_CPP_ungetwc_capture(__c, __stream); } |
#endif |
} |
# undef _IN_C_LEGACY_ |
#endif |
/contrib/media/updf/include/c_shadow/bits/std_cwctype.h |
---|
0,0 → 1,129 |
// -*- C++ -*- header wrapper. |
// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
// |
// ISO C++ 14882: |
// |
#ifndef _CPP_CWCTYPE |
#define _CPP_CWCTYPE 1 |
# include <bits/std_cwchar.h> |
namespace _C_legacy { |
extern "C" { |
# define _IN_C_LEGACY_ |
# pragma GCC system_header |
# include_next <wctype.h> |
} |
} // namespace _C_legacy |
# undef wctype_t |
# undef wctrans_t |
# undef iswalpha |
# undef iswupper |
# undef iswlower |
# undef iswdigit |
# undef iswxdigit |
# undef iswalnum |
# undef iswspace |
# undef iswpunct |
# undef iswprint |
# undef iswgraph |
# undef iswcntrl |
# undef iswctype |
# undef towctrans |
# undef towlower |
# undef towupper |
# undef wctrans |
# undef wctype |
namespace std { |
using _C_legacy::wctype_t; |
using _C_legacy::wctrans_t; |
inline int |
iswalpha(wint_t __wc) { return _C_legacy::iswalpha(__wc); } |
inline int |
iswupper(wint_t __wc) { return _C_legacy::iswupper(__wc); } |
inline int |
iswlower(wint_t __wc) { return _C_legacy::iswlower(__wc); } |
inline int |
iswdigit(wint_t __wc) { return _C_legacy::iswdigit(__wc); } |
inline int |
iswxdigit(wint_t __wc) { return _C_legacy::iswxdigit(__wc); } |
inline int |
iswalnum(wint_t __wc) { return _C_legacy::iswalnum(__wc); } |
inline int |
iswspace(wint_t __wc) { return _C_legacy::iswspace(__wc); } |
inline int |
iswpunct(wint_t __wc) { return _C_legacy::iswpunct(__wc); } |
inline int |
iswprint(wint_t __wc) { return _C_legacy::iswprint(__wc); } |
inline int |
iswgraph(wint_t __wc) { return _C_legacy::iswgraph(__wc); } |
inline int |
iswcntrl(wint_t __wc) { return _C_legacy::iswcntrl(__wc); } |
inline int |
towlower(wint_t __wc) { return _C_legacy::towlower(__wc); } |
inline int |
towupper(wint_t __wc) { return _C_legacy::towupper(__wc); } |
inline int |
iswctype(wint_t __wc, wctype_t __desc) |
{ return _C_legacy::iswctype(__wc, __desc); } |
inline wint_t |
towctrans(wint_t __wc, wctrans_t __desc) |
{ return _C_legacy::towctrans (__wc, __desc); } |
inline wctrans_t |
wctrans(const char *__property) { return _C_legacy::wctrans(__property); } |
inline wctype_t |
wctype(char const* __property) { return _C_legacy::wctype(__property); } |
} // namespace std |
# undef _IN_C_LEGACY_ |
#endif |
/contrib/media/updf/include/c_shadow/bits/wrap_fcntl.h |
---|
0,0 → 1,92 |
// -*- C++ -*- header wrapper. |
// Copyright (C) 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
// |
// ISO C++ 14882: 26.5 C library extensions |
// |
#ifndef _CPP_FCNTL |
#define _CPP_FCNTL 1 |
# include <bits/c++config.h> |
namespace _C_legacy { |
extern "C" { |
# define _IN_C_LEGACY_ |
# pragma GCC system_header |
// XXX |
# undef SEEK_SET |
# undef SEEK_CUR |
# undef SEEK_END |
# include_next <fcntl.h> |
} |
} // namespace _C_legacy |
# undef SEEK_SET |
# undef SEEK_CUR |
# undef SEEK_END |
// NB: Don't bring elements from this non-standard header into namespace std. |
# undef _IN_C_LEGACY_ |
#endif |
/contrib/media/updf/include/c_shadow/bits/wrap_features.h |
---|
0,0 → 1,51 |
// -*- C++ -*- header wrapper. |
// Copyright (C) 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
// |
// ISO C++ 14882: 20.5 Extensions |
// |
#ifndef _CPP_WRAP_FEATURES_H |
#define _CPP_WRAP_FEATURES_H 1 |
#include <bits/c++config.h> |
namespace _C_legacy { |
extern "C" { |
# define _IN_C_LEGACY_ |
# pragma GCC system_header |
# include_next <features.h> |
} |
} // namespace _C_legacy |
// NB: Don't bring elements from this non-standard header into namespace std. |
# undef _IN_C_LEGACY_ |
#endif |
/contrib/media/updf/include/c_shadow/bits/wrap_iconv.h |
---|
0,0 → 1,51 |
// -*- C++ -*- header wrapper. |
// Copyright (C) 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
// |
// ISO C++ 14882: 20.5 Extensions |
// |
#ifndef _CPP_WRAP_ICONV_H |
#define _CPP_WRAP_ICONV_H 1 |
namespace _C_legacy { |
extern "C" { |
# define _IN_C_LEGACY_ |
# pragma GCC system_header |
# include_next <iconv.h> |
} |
} // namespace _C_legacy |
// NB: Don't bring elements from this non-standard header into namespace std. |
# undef _IN_C_LEGACY_ |
#endif |
/contrib/media/updf/include/c_shadow/bits/wrap_iolibio.h |
---|
0,0 → 1,50 |
// -*- C++ -*- header wrapper. |
// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
// |
// ISO C++ 14882: 20.5 Extensions |
// |
#ifndef _CPP_WRAP_IOLIBIO_H |
#define _CPP_WRAP_IOLIBIO_H 1 |
namespace _C_legacy { |
extern "C" { |
# define _IN_C_LEGACY_ |
# pragma GCC system_header |
# include_next <iolibio.h> |
} |
} // namespace _C_legacy |
// NB: Don't bring elements from this non-standard header into namespace std. |
# undef _IN_C_LEGACY_ |
#endif |
/contrib/media/updf/include/c_shadow/bits/wrap_langinfo.h |
---|
0,0 → 1,49 |
// -*- C++ -*- header wrapper. |
// Copyright (C) 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
// |
// ISO C++ 14882: 20.5 Extensions |
// |
#ifndef _CPP_WRAP_LANGINFO_H |
#define _CPP_WRAP_LANGINFO_H 1 |
namespace _C_legacy { |
extern "C" { |
# define _IN_C_LEGACY_ |
# pragma GCC system_header |
# include_next <langinfo.h> |
} |
} // namespace _C_legacy |
# undef _IN_C_LEGACY_ |
#endif |
/contrib/media/updf/include/c_shadow/bits/wrap_libio.h |
---|
0,0 → 1,50 |
// -*- C++ -*- header wrapper. |
// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
// |
// ISO C++ 14882: 20.5 Extensions |
// |
#ifndef _CPP_WRAP_LIBIO_H |
#define _CPP_WRAP_LIBIO_H 1 |
namespace _C_legacy { |
extern "C" { |
# define _IN_C_LEGACY_ |
# pragma GCC system_header |
# include_next <libio.h> |
} |
} // namespace _C_legacy |
// NB: Don't bring elements from this non-standard header into namespace std. |
# undef _IN_C_LEGACY_ |
#endif |
/contrib/media/updf/include/c_shadow/bits/wrap_libioP.h |
---|
0,0 → 1,50 |
// -*- C++ -*- header wrapper. |
// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
// |
// ISO C++ 14882: 20.5 Extensions |
// |
#ifndef _CPP_WRAP_LIBIOP_H |
#define _CPP_WRAP_LIBIOP_H 1 |
namespace _C_legacy { |
extern "C" { |
# define _IN_C_LEGACY_ |
# pragma GCC system_header |
# include_next <libioP.h> |
} |
} // namespace _C_legacy |
// NB: Don't bring elements from this non-standard header into namespace std. |
# undef _IN_C_LEGACY_ |
#endif |
/contrib/media/updf/include/c_shadow/bits/wrap_pthread.h |
---|
0,0 → 1,81 |
// -*- C++ -*- header wrapper. |
// Copyright (C) 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
// |
// ISO C++ 14882: 26.5 C library extensions |
// |
#ifndef _CPP_WRAP_PTHREAD_H |
#define _CPP_WRAP_PTHREAD_H 1 |
# include <bits/c++config.h> |
namespace _C_legacy { |
extern "C" { |
# define _IN_C_LEGACY_ |
# pragma GCC system_header |
# include_next <pthread.h> |
} |
} // namespace _C_legacy |
# undef _IN_C_LEGACY_ |
#endif |
/contrib/media/updf/include/c_shadow/bits/wrap_unistd.h |
---|
0,0 → 1,47 |
// -*- C++ -*- header wrapper. |
// Copyright (C) 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
// |
// ISO C++ 14882: 26.5 C library extensions |
// |
#ifndef _CPP_WRAP_UNISTD_H |
#define _CPP_WRAP_UNISTD_H 1 |
namespace _C_legacy { |
extern "C" { |
# define _IN_C_LEGACY_ |
# pragma GCC system_header |
# include_next <unistd.h> |
} |
} // namespace _C_legacy |
# undef _IN_C_LEGACY_ |
#endif |
/contrib/media/updf/include/c_shadow/ctype.h |
---|
0,0 → 1,67 |
// -*- C++ -*- header wrapper. |
// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
#ifndef _INCLUDED_CPP_CTYPE_H_ |
# define _INCLUDED_CPP_CTYPE_H_ 1 |
# ifdef _IN_C_LEGACY_ /* sub-included by a C header */ |
// get out of the "legacy" |
} // close extern "C" |
} // close namespace _C_legacy:: |
# undef _IN_C_LEGACY_ |
# define _CTYPE_NEED_C_LEGACY_ |
# endif |
# include <cctype> |
// Expose global C names, including non-standard ones, but shadow |
// some names and types with the std:: C++ version. |
using std::isalnum; |
using std::isalpha; |
using std::iscntrl; |
using std::isdigit; |
using std::isgraph; |
using std::islower; |
using std::isprint; |
using std::ispunct; |
using std::isspace; |
using std::isupper; |
using std::isxdigit; |
using std::tolower; |
using std::toupper; |
# ifdef _CTYPE_NEED_C_LEGACY_ |
// dive back into the "swamp" |
namespace _C_legacy { |
extern "C" { |
# define _IN_C_LEGACY_ |
# undef _CTYPE_NEED_C_LEGACY_ |
# endif /* _CTYPE_NEED_C_LEGACY_ */ |
#endif /* _INCLUDED_CPP_CTYPE_H_ */ |
/contrib/media/updf/include/c_shadow/errno.h |
---|
0,0 → 1,56 |
// -*- C++ -*- header wrapper. |
// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
#ifndef _INCLUDED_CPP_ERRNO_H_ |
# define _INCLUDED_CPP_ERRNO_H_ 1 |
# ifdef _IN_C_LEGACY_ /* sub-included by a C header */ |
// get out of the "legacy" |
} // close extern "C" |
} // close namespace _C_legacy:: |
# undef _IN_C_LEGACY_ |
# define _ERRNO_NEED_C_LEGACY_ |
# endif |
# include <cerrno> |
// Expose global C names, including non-standard ones, but shadow |
// some names and types with the std:: C++ version. |
// using std::errno; |
# ifdef _ERRNO_NEED_C_LEGACY_ |
// dive back into the "swamp" |
namespace _C_legacy { |
extern "C" { |
# define _IN_C_LEGACY_ |
# undef _ERRNO_NEED_C_LEGACY_ |
# endif /* _ERRNO_NEED_C_LEGACY_ */ |
#endif /* _INCLUDED_CPP_ERRNO_H_ */ |
/contrib/media/updf/include/c_shadow/fcntl.h |
---|
0,0 → 1,63 |
// -*- C++ -*- header wrapper. |
// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
#ifndef _INCLUDED_CPP_FCNTL_H_ |
# define _INCLUDED_CPP_FCNTL_H_ 1 |
# ifdef _IN_C_LEGACY_ /* sub-included by a C header */ |
// get out of the "legacy" |
} // close extern "C" |
} // close namespace _C_legacy:: |
# undef _IN_C_LEGACY_ |
# define _FCNTL_NEED_C_LEGACY_ |
# endif |
# include <bits/wrap_fcntl.h> |
// Expose global C names, including non-standard ones, but shadow |
// some names and types with the std:: C++ version. |
using _C_legacy::flock; |
using _C_legacy::creat; |
using _C_legacy::open; |
using _C_legacy::fcntl; |
# ifdef _FCNTL_NEED_C_LEGACY_ |
// dive back into the "swamp" |
namespace _C_legacy { |
extern "C" { |
# define _IN_C_LEGACY_ |
# undef _FCNTL_NEED_C_LEGACY_ |
# endif /* _FCNTL_NEED_C_LEGACY_ */ |
#endif /* _INCLUDED_CPP_FCNTL_H_ */ |
/contrib/media/updf/include/c_shadow/features.h |
---|
0,0 → 1,58 |
// -*- C++ -*- header wrapper. |
// Copyright (C) 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
#ifndef _INCLUDED_CPP_FEATURES_H_ |
# define _INCLUDED_CPP_FEATURES_H_ 1 |
# ifdef _IN_C_LEGACY_ /* sub-included by a C header */ |
// get out of the "legacy" |
} // close extern "C" |
} // close namespace _C_legacy:: |
# undef _IN_C_LEGACY_ |
# define _FEATURES_NEED_C_LEGACY_ |
# endif |
# include <bits/wrap_features.h> |
// Expose global C names, including non-standard ones, but shadow |
// some names and types with the std:: C++ version. |
# ifdef _FEATURES_NEED_C_LEGACY_ |
// dive back into the "swamp" |
namespace _C_legacy { |
extern "C" { |
# define _IN_C_LEGACY_ |
# undef _FEATURES_NEED_C_LEGACY_ |
# endif /* _FEATURES_NEED_C_LEGACY_ */ |
#endif /* _INCLUDED_CPP_FEATURES_H_ */ |
/contrib/media/updf/include/c_shadow/float.h |
---|
0,0 → 1,54 |
// -*- C++ -*- header wrapper. |
// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
#ifndef _INCLUDED_CPP_FLOAT_H_ |
# define _INCLUDED_CPP_FLOAT_H_ 1 |
# ifdef _IN_C_LEGACY_ /* sub-included by a C header */ |
// get out of the "legacy" |
} // close extern "C" |
} // close namespace _C_legacy:: |
# undef _IN_C_LEGACY_ |
# define _FLOAT_NEED_C_LEGACY_ |
# endif |
# include <cfloat> |
// Expose global C names, including non-standard ones, but shadow |
// some names and types with the std:: C++ version. |
# ifdef _FLOAT_NEED_C_LEGACY_ |
// dive back into the "swamp" |
namespace _C_legacy { |
extern "C" { |
# define _IN_C_LEGACY_ |
# undef _FLOAT_NEED_C_LEGACY_ |
# endif /* _FLOAT_NEED_C_LEGACY_ */ |
#endif /* _INCLUDED_CPP_FLOAT_H_ */ |
/contrib/media/updf/include/c_shadow/iconv.h |
---|
0,0 → 1,66 |
// -*- C++ -*- header wrapper. |
// Copyright (C) 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
#ifndef _INCLUDED_CPP_ICONV_H_ |
# define _INCLUDED_CPP_ICONV_H_ 1 |
# ifdef _IN_C_LEGACY_ /* sub-included by a C header */ |
// get out of the "legacy" |
} // close extern "C" |
} // close namespace _C_legacy:: |
# undef _IN_C_LEGACY_ |
# define _ICONV_NEED_C_LEGACY_ |
# endif |
# include <bits/wrap_iconv.h> |
// Expose global C names, including non-standard ones, but shadow |
// some names and types with the std:: C++ version. |
// NB: Cannot use typedefs here to inject the names as the "C" headers |
// often include typedefs that include the keyword 'struct' |
using _C_legacy::iconv_t; |
using _C_legacy::iconv_open; |
using _C_legacy::iconv; |
using _C_legacy::iconv_close; |
# ifdef _ICONV_NEED_C_LEGACY_ |
// dive back into the "swamp" |
namespace _C_legacy { |
extern "C" { |
# define _IN_C_LEGACY_ |
# undef _ICONV_NEED_C_LEGACY_ |
# endif /* _ICONV_NEED_C_LEGACY_ */ |
#endif /* _INCLUDED_CPP_ICONV_H_ */ |
/contrib/media/updf/include/c_shadow/iolibio.h |
---|
0,0 → 1,58 |
// -*- C++ -*- header wrapper. |
// Copyright (C) 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
#ifndef _INCLUDED_CPP_IOLIBIO_H_ |
# define _INCLUDED_CPP_IOLIBIO_H_ 1 |
# ifdef _IN_C_LEGACY_ /* sub-included by a C header */ |
// get out of the "legacy" |
} // close extern "C" |
} // close namespace _C_legacy:: |
# undef _IN_C_LEGACY_ |
# define _IOLIBIO_NEED_C_LEGACY_ |
# endif |
# include <bits/wrap_iolibio.h> |
// Expose global C names, including non-standard ones, but shadow |
// some names and types with the std:: C++ version. |
# ifdef _IOLIBIO_NEED_C_LEGACY_ |
// dive back into the "swamp" |
namespace _C_legacy { |
extern "C" { |
# define _IN_C_LEGACY_ |
# undef _IOLIBIO_NEED_C_LEGACY_ |
# endif /* _IOLIBIO_NEED_C_LEGACY_ */ |
#endif /* _INCLUDED_CPP_IOLIBIO_H_ */ |
/contrib/media/updf/include/c_shadow/langinfo.h |
---|
0,0 → 1,55 |
// -*- C++ -*- header wrapper. |
// Copyright (C) 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
#ifndef _INCLUDED_CPP_LANGINFO_H_ |
# define _INCLUDED_CPP_LANGINFO_H_ 1 |
# ifdef _IN_C_LEGACY_ /* sub-included by a C header */ |
// get out of the "legacy" |
} // close extern "C" |
} // close namespace _C_legacy:: |
# undef _IN_C_LEGACY_ |
# define _LANGINFO_NEED_C_LEGACY_ |
# endif |
# include <bits/wrap_langinfo.h> |
# ifdef _LANGINFO_NEED_C_LEGACY_ |
// dive back into the "swamp" |
namespace _C_legacy { |
extern "C" { |
# define _IN_C_LEGACY_ |
# undef _LANGINFO_NEED_C_LEGACY_ |
# endif /* _LANGINFO_NEED_C_LEGACY_ */ |
#endif /* _INCLUDED_CPP_LANGINFO_H_ */ |
/contrib/media/updf/include/c_shadow/libio.h |
---|
0,0 → 1,81 |
// -*- C++ -*- header wrapper. |
// Copyright (C) 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
#ifndef _INCLUDED_CPP_LIBIO_H_ |
# define _INCLUDED_CPP_LIBIO_H_ 1 |
# ifdef _IN_C_LEGACY_ /* sub-included by a C header */ |
// get out of the "legacy" |
} // close extern "C" |
} // close namespace _C_legacy:: |
# undef _IN_C_LEGACY_ |
# define _LIBIO_NEED_C_LEGACY_ |
# endif |
# include <bits/wrap_libio.h> |
// Expose global C names, including non-standard ones, but shadow |
// some names and types with the std:: C++ version. |
// NB: Cannot use typedefs here to inject the names as the "C" headers |
// often include typedefs that include the keyword 'struct' |
using _C_legacy::_IO_pos_t; |
using _C_legacy::_IO_fpos_t; |
using _C_legacy::_IO_fpos64_t; |
using _C_legacy::_IO_size_t; |
using _C_legacy::_IO_ssize_t; |
using _C_legacy::_IO_off_t; |
using _C_legacy::_IO_off64_t; |
using _C_legacy::_IO_pid_t; |
using _C_legacy::_IO_uid_t; |
using _C_legacy::_IO_iconv_t; |
using _C_legacy::_IO_va_list; |
using _C_legacy::_IO_wint_t; |
using _C_legacy::_IO_lock_t; |
using _C_legacy::_IO_marker; |
using _C_legacy::_IO_codecvt; |
using _C_legacy::_IO_wide_data; |
using _C_legacy::_IO_FILE; |
using _C_legacy::_IO_cookie_io_functions_t; |
using _C_legacy::_IO_cookie_file; |
# ifdef _LIBIO_NEED_C_LEGACY_ |
// dive back into the "swamp" |
namespace _C_legacy { |
extern "C" { |
# define _IN_C_LEGACY_ |
# undef _LIBIO_NEED_C_LEGACY_ |
# endif /* _LIBIO_NEED_C_LEGACY_ */ |
#endif /* _INCLUDED_CPP_LIBIO_H_ */ |
/contrib/media/updf/include/c_shadow/libioP.h |
---|
0,0 → 1,64 |
// -*- C++ -*- header wrapper. |
// Copyright (C) 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
#ifndef _INCLUDED_CPP_LIBIOP_H_ |
# define _INCLUDED_CPP_LIBIOP_H_ 1 |
# ifdef _IN_C_LEGACY_ /* sub-included by a C header */ |
// get out of the "legacy" |
} // close extern "C" |
} // close namespace _C_legacy:: |
# undef _IN_C_LEGACY_ |
# define _LIBIOP_NEED_C_LEGACY_ |
# endif |
# include <bits/wrap_libioP.h> |
// Expose global C names, including non-standard ones, but shadow |
// some names and types with the std:: C++ version. |
using _C_legacy::_IO_jump_t; |
using _C_legacy::_IO_FILE_plus; |
using _C_legacy::_IO_cookie_file; |
using _C_legacy::_IO_file_jumps; |
using _C_legacy::_IO_wfile_jumps; |
# ifdef _LIBIOP_NEED_C_LEGACY_ |
// dive back into the "swamp" |
namespace _C_legacy { |
extern "C" { |
# define _IN_C_LEGACY_ |
# undef _LIBIOP_NEED_C_LEGACY_ |
# endif /* _LIBIOP_NEED_C_LEGACY_ */ |
#endif /* _INCLUDED_CPP_LIBIOP_H_ */ |
/contrib/media/updf/include/c_shadow/limits.h |
---|
0,0 → 1,54 |
// -*- C++ -*- header wrapper. |
// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
#ifndef _INCLUDED_CPP_LIMITS_H_ |
# define _INCLUDED_CPP_LIMITS_H_ 1 |
# ifdef _IN_C_LEGACY_ /* sub-included by a C header */ |
// get out of the "legacy" |
} // close extern "C" |
} // close namespace _C_legacy:: |
# undef _IN_C_LEGACY_ |
# define _LIMITS_NEED_C_LEGACY_ |
# endif |
# include <climits> |
// Expose global C names, including non-standard ones, but shadow |
// some names and types with the std:: C++ version. |
# ifdef _LIMITS_NEED_C_LEGACY_ |
// dive back into the "swamp" |
namespace _C_legacy { |
extern "C" { |
# define _IN_C_LEGACY_ |
# undef _LIMITS_NEED_C_LEGACY_ |
# endif /* _LIMITS_NEED_C_LEGACY_ */ |
#endif /* _INCLUDED_CPP_LIMITS_H_ */ |
/contrib/media/updf/include/c_shadow/locale.h |
---|
0,0 → 1,57 |
// -*- C++ -*- header wrapper. |
// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
#ifndef _INCLUDED_CPP_LOCALE_H_ |
# define _INCLUDED_CPP_LOCALE_H_ 1 |
# ifdef _IN_C_LEGACY_ /* sub-included by a C header */ |
// get out of the "legacy" |
} // close extern "C" |
} // close namespace _C_legacy:: |
# undef _IN_C_LEGACY_ |
# define _LOCALE_NEED_C_LEGACY_ |
#endif |
# include <clocale> |
// Expose global C names, including non-standard ones, but shadow |
// some names and types with the std:: C++ version. |
using std::lconv; |
using std::setlocale; |
using std::localeconv; |
# ifdef _LOCALE_NEED_C_LEGACY_ |
// dive back into the "swamp" |
namespace _C_legacy { |
extern "C" { |
# define _IN_C_LEGACY_ |
# undef _LOCALE_NEED_C_LEGACY_ |
# endif /* _LOCALE_NEED_C_LEGACY_ */ |
#endif /* _INCLUDED_CPP_LOCALE_H_ */ |
/contrib/media/updf/include/c_shadow/math.h |
---|
0,0 → 1,131 |
// -*- C++ -*- header wrapper. |
// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
#ifndef _INCLUDED_CPP_MATH_H_ |
# define _INCLUDED_CPP_MATH_H_ 1 |
# ifdef _IN_C_LEGACY_ /* sub-included by a C header */ |
// get out of the "legacy" |
} // close extern "C" |
} // close namespace _C_legacy:: |
# undef _IN_C_LEGACY_ |
# define _MATH_NEED_C_LEGACY_ |
# endif |
# include <cmath> |
// Expose global C names, including non-standard ones, but shadow |
// some names and types with the std:: C++ version. |
using std::abs; |
using std::acos; |
using std::asin; |
using std::atan; |
using std::atan2; |
using std::cos; |
using std::sin; |
using std::tan; |
using std::cosh; |
using std::sinh; |
using std::tanh; |
using std::exp; |
using std::frexp; |
using std::ldexp; |
using std::log; |
using std::log10; |
using std::modf; |
using std::pow; |
using std::sqrt; |
using std::ceil; |
using std::fabs; |
using std::floor; |
using std::fmod; |
// From ISO/IEC 9899:1999 |
using std::absf; |
using std::acosf; |
using std::asinf; |
using std::atanf; |
using std::atan2f; |
using std::cosf; |
using std::sinf; |
using std::tanf; |
using std::coshf; |
using std::sinhf; |
using std::tanhf; |
using std::expf; |
using std::frexpf; |
using std::ldexpf; |
using std::logf; |
using std::log10f; |
using std::modff; |
using std::powf; |
using std::sqrtf; |
using std::ceilf; |
using std::fabsf; |
using std::floorf; |
using std::fmodf; |
// From ISO/IEC 9899:1999 |
using std::absl; |
using std::acosl; |
using std::asinl; |
using std::atanl; |
using std::atan2l; |
using std::cosl; |
using std::sinl; |
using std::tanl; |
using std::coshl; |
using std::sinhl; |
using std::tanhl; |
using std::expl; |
using std::frexpl; |
using std::ldexpl; |
using std::logl; |
using std::log10l; |
using std::modfl; |
using std::powl; |
using std::sqrtl; |
using std::ceill; |
using std::fabsl; |
using std::floorl; |
using std::fmodl; |
# ifdef _MATH_NEED_C_LEGACY_ |
// dive back into the "swamp" |
namespace _C_legacy { |
extern "C" { |
# define _IN_C_LEGACY_ |
# undef _MATH_NEED_C_LEGACY_ |
# endif /* _MATH_NEED_C_LEGACY_ */ |
#endif /* _INCLUDED_CPP_MATH_H_ */ |
/contrib/media/updf/include/c_shadow/pthread.h |
---|
0,0 → 1,86 |
// -*- C++ -*- header wrapper. |
// Copyright (C) 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
#ifndef _INCLUDED_CPP_PTHREAD_H_ |
# define _INCLUDED_CPP_PTHREAD_H_ 1 |
# ifdef _IN_C_LEGACY_ /* sub-included by a C header */ |
// get out of the "legacy" |
} // close extern "C" |
} // close namespace _C_legacy:: |
# undef _IN_C_LEGACY_ |
# define _PTHREAD_NEED_C_LEGACY_ |
# endif |
# include <bits/wrap_pthread.h> |
// Expose global C names, including non-standard ones, but shadow |
// some names and types with the std:: C++ version. |
using _C_legacy::__sched_param; |
using _C_legacy::pthread_attr_t; |
using _C_legacy::pthread_cond_t; |
using _C_legacy::pthread_condattr_t; |
using _C_legacy::pthread_key_t; |
using _C_legacy::pthread_mutex_t; |
using _C_legacy::pthread_mutexattr_t; |
using _C_legacy::pthread_once_t; |
using _C_legacy::pthread_rwlock_t; |
using _C_legacy::pthread_rwlockattr_t; |
using _C_legacy::pthread_t; |
using _C_legacy::pthread_mutex_init; |
using _C_legacy::pthread_mutex_destroy; |
using _C_legacy::pthread_mutex_lock; |
using _C_legacy::pthread_mutex_trylock; |
using _C_legacy::pthread_mutex_unlock; |
using _C_legacy::pthread_mutexattr_init; |
using _C_legacy::pthread_mutexattr_destroy; |
using _C_legacy::pthread_mutexattr_settype; |
using _C_legacy::pthread_mutexattr_gettype; |
using _C_legacy::pthread_key_create; |
using _C_legacy::pthread_key_delete; |
using _C_legacy::pthread_setspecific; |
using _C_legacy::pthread_getspecific; |
using _C_legacy::pthread_once; |
using _C_legacy::pthread_atfork; |
# ifdef _PTHREAD_NEED_C_LEGACY_ |
// dive back into the "swamp" |
namespace _C_legacy { |
extern "C" { |
# define _IN_C_LEGACY_ |
# undef _PTHREAD_NEED_C_LEGACY_ |
# endif /* _PTHREAD_NEED_C_LEGACY_ */ |
#endif /* _INCLUDED_CPP_PTHREAD_H_ */ |
/contrib/media/updf/include/c_shadow/setjmp.h |
---|
0,0 → 1,56 |
// -*- C++ -*- header wrapper. |
// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
#ifndef _INCLUDED_CPP_SETJMP_H_ |
# define _INCLUDED_CPP_SETJMP_H_ 1 |
# ifdef _IN_C_LEGACY_ /* sub-included by a C header */ |
// get out of the "legacy" |
} // close extern "C" |
} // close namespace _C_legacy:: |
# undef _IN_C_LEGACY_ |
# define _SETJMP_NEED_C_LEGACY_ |
# endif |
# include <csetjmp> |
// Expose global C names, including non-standard ones, but shadow |
// some names and types with the std:: C++ version. |
using std::jmp_buf; |
using std::longjmp; |
# ifdef _SETJMP_NEED_C_LEGACY_ |
// dive back into the "swamp" |
namespace _C_legacy { |
extern "C" { |
# define _IN_C_LEGACY_ |
# undef _SETJMP_NEED_C_LEGACY_ |
# endif /* _SETJMP_NEED_C_LEGACY_ */ |
#endif /* _INCLUDED_CPP_SETJMP_H_ */ |
/contrib/media/updf/include/c_shadow/signal.h |
---|
0,0 → 1,58 |
// -*- C++ -*- header wrapper. |
// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
#ifndef _INCLUDED_CPP_SIGNAL_H_ |
# define _INCLUDED_CPP_SIGNAL_H_ 1 |
# ifdef _IN_C_LEGACY_ /* sub-included by a C header */ |
// get out of the "legacy" |
} // close extern "C" |
} // close namespace _C_legacy:: |
# undef _IN_C_LEGACY_ |
# define _SIGNAL_NEED_C_LEGACY_ |
# endif |
# include <csignal> |
// Expose global C names, including non-standard ones, but shadow |
// some names and types with the std:: C++ version. |
using std::sig_atomic_t; |
using std::raise; |
using std::signal; |
# ifdef _SIGNAL_NEED_C_LEGACY_ |
// dive back into the "swamp" |
namespace _C_legacy { |
extern "C" { |
# define _IN_C_LEGACY_ |
# undef _SIGNAL_NEED_C_LEGACY_ |
# endif /* _SIGNAL_NEED_C_LEGACY_ */ |
#endif /* _INCLUDED_CPP_SIGNAL_H_ */ |
/contrib/media/updf/include/c_shadow/stdarg.h |
---|
0,0 → 1,55 |
// -*- C++ -*- header wrapper. |
// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
#ifndef _INCLUDED_CPP_STDARG_H_ |
# define _INCLUDED_CPP_STDARG_H_ 1 |
#ifdef _IN_C_LEGACY_ /* sub-included by a C header */ |
// get out of the "legacy" |
} // close extern "C" |
} // close namespace _C_legacy:: |
# undef _IN_C_LEGACY_ |
# define _STDARG_NEED_C_LEGACY_ |
# endif |
# include <cstdarg> |
// Expose global C names, including non-standard ones, but shadow |
// some names and types with the std:: C++ version. |
using std::va_list; |
# ifdef _STDARG_NEED_C_LEGACY_ |
// dive back into the "swamp" |
namespace _C_legacy { |
extern "C" { |
# define _IN_C_LEGACY_ |
# undef _STDARG_NEED_C_LEGACY_ |
# endif /* _STDARG_NEED_C_LEGACY_ */ |
#endif /* _INCLUDED_CPP_STDARG_H_ */ |
/contrib/media/updf/include/c_shadow/stddef.h |
---|
0,0 → 1,60 |
// -*- C++ -*- header wrapper. |
// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
#ifndef _INCLUDED_CPP_STDDEF_H_ |
# define _INCLUDED_CPP_STDDEF_H_ 1 |
# ifdef _IN_C_LEGACY_ /* sub-included by a C header */ |
// get out of the "legacy" |
} // close extern "C" |
} // close namespace _C_legacy:: |
# undef _IN_C_LEGACY_ |
# define _STDDEF_NEED_C_LEGACY_ |
# endif |
# include <cstddef> |
// Expose global C names, including non-standard ones, but shadow |
// some names and types with the std:: C++ version. |
using std::ptrdiff_t; |
using std::size_t; |
# ifdef _STDDEF_NEED_C_LEGACY_ |
// dive back into the "swamp" |
namespace _C_legacy { |
extern "C" { |
# define _IN_C_LEGACY_ |
# undef _STDDEF_NEED_C_LEGACY_ |
# endif /* _STDDEF_NEED_C_LEGACY_ */ |
#endif /* _INCLUDED_CPP_STDDEF_H_ */ |
/contrib/media/updf/include/c_shadow/stdio.h |
---|
0,0 → 1,97 |
// -*- C++ -*- header wrapper. |
// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
#ifndef _INCLUDED_CPP_STDIO_H_ |
# define _INCLUDED_CPP_STDIO_H_ 1 |
# ifdef _IN_C_LEGACY_ /* sub-included by a C header */ |
// get out of the "legacy" |
} // close extern "C" |
} // close namespace _C_legacy:: |
# undef _IN_C_LEGACY_ |
# define _STDIO_NEED_C_LEGACY_ |
# endif |
# include <cstdio> |
// Expose global C names, including non-standard ones, but shadow |
// some names and types with the std:: C++ version. |
using std::FILE; |
using std::fpos_t; |
using std::remove; |
using std::rename; |
using std::tmpfile; |
using std::tmpnam; |
using std::fclose; |
using std::fflush; |
using std::fopen; |
using std::freopen; |
using std::setbuf; |
using std::setvbuf; |
using std::fprintf; |
using std::fscanf; |
using std::printf; |
using std::scanf; |
using std::sprintf; |
using std::sscanf; |
using std::vfprintf; |
using std::vprintf; |
using std::vsprintf; |
using std::fgetc; |
using std::fgets; |
using std::fputc; |
using std::fputs; |
using std::getc; |
using std::getchar; |
using std::gets; |
using std::putc; |
using std::putchar; |
using std::puts; |
using std::ungetc; |
using std::fread; |
using std::fwrite; |
using std::fgetpos; |
using std::fseek; |
using std::fsetpos; |
using std::ftell; |
using std::rewind; |
using std::clearerr; |
using std::feof; |
using std::ferror; |
using std::perror; |
# ifdef _STDIO_NEED_C_LEGACY_ |
// dive back into the "swamp" |
namespace _C_legacy { |
extern "C" { |
# define _IN_C_LEGACY_ |
# undef _STDIO_NEED_C_LEGACY_ |
# endif /* _STDIO_NEED_C_LEGACY_ */ |
#endif /* _INCLUDED_CPP_STDIO_H_ */ |
/contrib/media/updf/include/c_shadow/stdlib.h |
---|
0,0 → 1,101 |
// -*- C++ -*- header wrapper. |
// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
#ifndef _INCLUDED_CPP_STDLIB_H_ |
# define _INCLUDED_CPP_STDLIB_H_ 1 |
# include <bits/c++config.h> |
# ifdef _IN_C_LEGACY_ /* sub-included by a C header */ |
// get out of the "legacy" |
} // close extern "C" |
} // close namespace _C_legacy:: |
# undef _IN_C_LEGACY_ |
# define _STDLIB_NEED_C_LEGACY_ |
# endif |
# include <cstdlib> |
// Expose global C names, including non-standard ones, but shadow |
// some names and types with the std:: C++ version. |
using std::div_t; |
using std::ldiv_t; |
#ifdef _GLIBCPP_USE_LONG_LONG |
using std::lldiv_t; |
#endif |
// using std::abort; |
using std::abs; |
using std::atexit; |
using std::atof; |
using std::atoi; |
using std::atol; |
using std::bsearch; |
using std::calloc; |
using std::div; |
// using std::exit; |
using std::free; |
using std::getenv; |
using std::labs; |
using std::ldiv; |
using std::malloc; |
using std::mblen; |
using std::mbstowcs; |
using std::mbtowc; |
using std::qsort; |
using std::rand; |
using std::realloc; |
using std::srand; |
using std::strtod; |
using std::strtol; |
using std::strtoul; |
using std::system; |
using std::wcstombs; |
using std::wctomb; |
using std::strtof; |
#ifdef _GLIBCPP_USE_LONG_LONG |
using std::strtoll; |
using std::strtoull; |
#endif |
#ifdef _GLIBCPP_HAVE_STRTOLD |
using std::strtold; |
#endif |
# ifdef _STDLIB_NEED_C_LEGACY_ |
// dive back into the "swamp" |
namespace _C_legacy { |
extern "C" { |
# define _IN_C_LEGACY_ |
# undef _STDLIB_NEED_C_LEGACY_ |
# endif /* _STDLIB_NEED_C__LEGACY_ */ |
#endif /* _INCLUDED_CPP_STDLIB_H_ */ |
/contrib/media/updf/include/c_shadow/string.h |
---|
0,0 → 1,76 |
// -*- C++ -*- header wrapper. |
// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
#ifndef _INCLUDED_CPP_STRING_H_ |
# define _INCLUDED_CPP_STRING_H_ 1 |
# ifdef _IN_C_LEGACY_ /* sub-included by a C header */ |
// get out of the "legacy" |
} // close extern "C" |
} // close namespace _C_legacy:: |
# undef _IN_C_LEGACY_ |
# define _STRING_NEED_C_LEGACY_ |
# endif |
# include <cstring> |
// Expose global C names, including non-standard ones, but shadow |
// some names and types with the std:: C++ version. |
using std::memcpy; |
using std::memmove; |
using std::strcpy; |
using std::strncpy; |
using std::strcat; |
using std::strncat; |
using std::memcmp; |
using std::strcmp; |
using std::strcoll; |
using std::strncmp; |
using std::strxfrm; |
using std::memchr; |
using std::strchr; |
using std::strcspn; |
using std::strpbrk; |
using std::strrchr; |
using std::strspn; |
using std::strstr; |
using std::strtok; |
using std::memset; |
using std::strerror; |
using std::strlen; |
# ifdef _STRING_NEED_C_LEGACY_ |
// dive back into the "swamp" |
namespace _C_legacy { |
extern "C" { |
# define _IN_C_LEGACY_ |
# undef _STRING_NEED_C_LEGACY_ |
# endif /* _STRING_NEED_C_LEGACY_ */ |
#endif /* _INCLUDED_CPP_STRING_H_ */ |
/contrib/media/updf/include/c_shadow/sys/cdefs.h |
---|
0,0 → 1,49 |
// -*- C++ -*- header wrapper. |
// Copyright (C) 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
#ifndef _CPP_SYS_CDEFS_H |
# define _CPP_SYS_CDEFS_H 1 |
# pragma GCC system_header |
# include_next <sys/cdefs.h> |
// glibc-2 hackery. Other systems likely require other hacks. |
#undef __BEGIN_DECLS |
#define __BEGIN_DECLS |
#undef __END_DECLS |
#define __END_DECLS |
#endif /* _CPP_SYS_CDEFS_H_ */ |
/contrib/media/updf/include/c_shadow/time.h |
---|
0,0 → 1,67 |
// -*- C++ -*- header wrapper. |
// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
#ifndef _INCLUDED_CPP_TIME_H_ |
# define _INCLUDED_CPP_TIME_H_ 1 |
# ifdef _IN_C_LEGACY_ /* sub-included by a C header */ |
// get out of the "legacy" |
} // close extern "C" |
} // close namespace _C_legacy:: |
# undef _IN_C_LEGACY_ |
# define _TIME_NEED_C_LEGACY_ |
# endif |
# include <ctime> |
// Expose global C names, including non-standard ones, but shadow |
// some names and types with the std:: C++ version. |
using std::clock_t; |
using std::time_t; |
using std::tm; |
using std::clock; |
using std::difftime; |
using std::mktime; |
using std::time; |
using std::asctime; |
using std::ctime; |
using std::gmtime; |
using std::localtime; |
using std::strftime; |
# ifdef _TIME_NEED_C_LEGACY_ |
// dive back into the "swamp" |
namespace _C_legacy { |
extern "C" { |
# define _IN_C_LEGACY_ |
# undef _TIME_NEED_C_LEGACY_ |
# endif /* _TIME_NEED_C_LEGACY_ */ |
#endif /* _INCLUDED_CPP_TIME_H_ */ |
/contrib/media/updf/include/c_shadow/unistd.h |
---|
0,0 → 1,101 |
// -*- C++ -*- header wrapper. |
// Copyright (C) 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
#ifndef _INCLUDED_CPP_UNISTD_H_ |
# define _INCLUDED_CPP_UNISTD_H_ 1 |
# ifdef _IN_C_LEGACY_ /* sub-included by a C header */ |
// get out of the "legacy" |
} // close extern "C" |
} // close namespace _C_legacy:: |
# undef _IN_C_LEGACY_ |
# define _TIME_NEED_C_LEGACY_ |
# endif |
# include <bits/wrap_unistd.h> |
// Expose global C names, including non-standard ones, but shadow |
// some names and types with the std:: C++ version. |
#ifdef __gid_t_defined |
using _C_legacy::gid_t; |
#endif |
#ifdef __uid_t_defined |
using _C_legacy::uid_t; |
#endif |
#ifdef __off_t_defined |
using _C_legacy::off_t; |
#endif |
#ifdef __off64_t_defined |
using _C_legacy::off64_t; |
#endif |
#ifdef __useconds_t_defined |
using _C_legacy::useconds_t; |
#endif |
#ifdef __pid_t_defined |
using _C_legacy::pid_t; |
#endif |
using _C_legacy::intptr_t; |
#ifdef __socklen_t_defined |
using _C_legacy::socklen_t; |
#endif |
using _C_legacy::access; |
using _C_legacy::euidaccess; |
using _C_legacy::lseek; |
using _C_legacy::close; |
using _C_legacy::read; |
using _C_legacy::write; |
using _C_legacy::pread; |
using _C_legacy::pwrite; |
using _C_legacy::pipe; |
using _C_legacy::alarm; |
using _C_legacy::sleep; |
using _C_legacy::ualarm; |
using _C_legacy::usleep; |
using _C_legacy::pause; |
using _C_legacy::chown; |
using _C_legacy::fchown; |
using _C_legacy::lchown; |
using _C_legacy::chdir; |
using _C_legacy::fchdir; |
using _C_legacy::getcwd; |
using _C_legacy::get_current_dir_name; |
using _C_legacy::getwd; |
using _C_legacy::dup; |
using _C_legacy::dup2; |
# ifdef _TIME_NEED_C_LEGACY_ |
// dive back into the "swamp" |
namespace _C_legacy { |
extern "C" { |
# define _IN_C_LEGACY_ |
# undef _TIME_NEED_C_LEGACY_ |
# endif /* _TIME_NEED_C_LEGACY_ */ |
#endif /* _INCLUDED_CPP_UNISTD_H_ */ |
/contrib/media/updf/include/c_shadow/wchar.h |
---|
0,0 → 1,131 |
// -*- C++ -*- header wrapper. |
// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
#ifndef _INCLUDED_CPP_WCHAR_H_ |
# define _INCLUDED_CPP_WCHAR_H_ 1 |
# ifdef _IN_C_LEGACY_ /* sub-included by a C header */ |
// get out of the "legacy" |
} // close extern "C" |
} // close namespace _C_legacy:: |
# undef _IN_C_LEGACY_ /* sub-included by a C header */ |
# define _WCHAR_NEED_C_LEGACY_ |
# endif |
# include <cwchar> |
// Expose global C names, including non-standard ones, but shadow |
// some names and types with the std:: C++ version. |
using std::wchar_t; |
using std::wint_t; |
using std::mbstate_t; |
#if 0 |
using std::fwprintf; |
using std::fwscanf; |
using std::swprintf; |
using std::swscanf; |
using std::vfwprintf; |
using std::vfwscanf; |
using std::vswprintf; |
using std::vswscanf; |
using std::vwprintf; |
using std::vwscanf; |
using std::wprintf; |
using std::wscanf; |
using std::fgetwc; |
using std::fgetws; |
using std::fputwc; |
using std::fputws; |
using std::fwide; |
using std::getwc; |
using std::getwchar; |
using std::putwc; |
using std::putwchar; |
using std::ungetwc; |
#endif |
using std::wcstod; |
using std::wcstof; |
using std::wcstold; |
using std::wcstol; |
using std::wcstoll; |
using std::wcstoul; |
using std::wcstoull; |
using std::wcscpy; |
using std::wcsncpy; |
using std::wcscat; |
using std::wcsncat; |
#if 0 |
using std::wcsmp; |
#endif |
using std::wcscoll; |
using std::wcsncmp; |
using std::wcsxfrm; |
using std::wcschr; |
using std::wcscspn; |
using std::wcslen; |
using std::wcspbrk; |
using std::wcsrchr; |
using std::wcsspn; |
using std::wcsstr; |
using std::wcstok; |
using std::wmemchr; |
using std::wmemcmp; |
using std::wmemcpy; |
using std::wmemmove; |
using std::wmemset; |
#if 0 |
using std::wcsftime; |
#endif |
using std::btowc; |
using std::wctob; |
using std::mbsinit; |
using std::mbrlen; |
using std::mbrtowc; |
using std::wcrtomb; |
using std::mbsrtowcs; |
using std::wcsrtombs; |
# ifdef _WCHAR_NEED_C_LEGACY_ |
// dive back into the "swamp" |
namespace _C_legacy { |
extern "C" { |
# define _IN_C_LEGACY_ |
# undef _WCHAR_NEED_C_LEGACY_ |
# endif /* _WCHAR_NEED_C_LEGACY_ */ |
#endif /* _INCLUDED_CPP_WCHAR_H_ */ |
/contrib/media/updf/include/c_shadow/wctype.h |
---|
0,0 → 1,74 |
// -*- C++ -*- header wrapper. |
// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc. |
// |
// This file is part of the GNU ISO C++ Library. This library is free |
// software; you can redistribute it and/or modify it under the |
// terms of the GNU General Public License as published by the |
// Free Software Foundation; either version 2, 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 the |
// GNU General Public License for more details. |
// You should have received a copy of the GNU General Public License along |
// with this library; see the file COPYING. If not, write to the Free |
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// USA. |
// As a special exception, you may use this file as part of a free software |
// library without restriction. Specifically, if other files instantiate |
// templates or use macros or inline functions from this file, or you compile |
// this file and link it with other files to produce an executable, this |
// file does not by itself cause the resulting executable to be covered by |
// the GNU General Public License. This exception does not however |
// invalidate any other reasons why the executable file might be covered by |
// the GNU General Public License. |
#ifndef _INCLUDED_CPP_CWCTYPE_H_ |
# define _INCLUDED_CPP_CWCTYPE_H_ 1 |
# ifdef _IN_C_LEGACY_ /* sub-included by a C header */ |
// get out of the "legacy" |
} // close extern "C" |
} // close namespace _C_legacy:: |
# undef _IN_C_LEGACY_ |
# define _CWCHAR_NEED_C_LEGACY_ |
# endif |
# include <cwctype> |
// Expose global C names, including non-standard ones, but shadow |
// some names and types with the std:: C++ version. |
using std::wint_t; |
using std::wctype_t; |
using std::wctrans_t; |
using std::iswalpha; |
using std::iswupper; |
using std::iswlower; |
using std::iswdigit; |
using std::iswxdigit; |
using std::iswalnum; |
using std::iswspace; |
using std::iswpunct; |
using std::iswprint; |
using std::iswgraph; |
using std::iswcntrl; |
using std::iswctype; |
using std::towctrans; |
using std::towlower; |
using std::towupper; |
using std::wctrans; |
using std::wctype; |
# ifdef _CWCHAR_NEED_C_LEGACY_ |
// dive back into the "swamp" |
namespace _C_legacy { |
extern "C" { |
# define _IN_C_LEGACY_ |
# undef _CWCHAR_NEED_C_LEGACY_ |
# endif /* _CWCHAR_NEED_C_LEGACY_ */ |
#endif /* _INCLUDED_CPP_CWCTYPE_H_ */ |
/contrib/media/updf/include/net/if.h |
---|
0,0 → 1,106 |
#ifndef _NET_IF_H |
#define _NET_IF_H |
#include <sys/cdefs.h> |
#include <sys/socket.h> |
__BEGIN_DECLS |
/* Standard interface flags. */ |
#define IFF_UP 0x1 /* interface is up */ |
#define IFF_BROADCAST 0x2 /* broadcast address valid */ |
#define IFF_DEBUG 0x4 /* turn on debugging */ |
#define IFF_LOOPBACK 0x8 /* is a loopback net */ |
#define IFF_POINTOPOINT 0x10 /* interface is has p-p link */ |
#define IFF_NOTRAILERS 0x20 /* avoid use of trailers */ |
#define IFF_RUNNING 0x40 /* resources allocated */ |
#define IFF_NOARP 0x80 /* no ARP protocol */ |
#define IFF_PROMISC 0x100 /* receive all packets */ |
#define IFF_ALLMULTI 0x200 /* receive all multicast packets*/ |
#define IFF_MASTER 0x400 /* master of a load balancer */ |
#define IFF_SLAVE 0x800 /* slave of a load balancer */ |
#define IFF_MULTICAST 0x1000 /* Supports multicast */ |
#define IFF_VOLATILE (IFF_LOOPBACK|IFF_POINTOPOINT|IFF_BROADCAST|IFF_MASTER|IFF_SLAVE|IFF_RUNNING) |
#define IFF_PORTSEL 0x2000 /* can set media type */ |
#define IFF_AUTOMEDIA 0x4000 /* auto media select active */ |
#define IFF_DYNAMIC 0x8000 /* dialup device with changing addresses*/ |
struct ifmap { |
unsigned long mem_start; |
unsigned long mem_end; |
unsigned short base_addr; |
unsigned char irq; |
unsigned char dma; |
unsigned char port; |
/* 3 bytes spare */ |
}; |
struct ifreq { |
#define IFHWADDRLEN 6 |
#define IFNAMSIZ 16 |
union |
{ |
char ifrn_name[IFNAMSIZ]; /* if name, e.g. "en0" */ |
} ifr_ifrn; |
union { |
struct sockaddr ifru_addr; |
struct sockaddr ifru_dstaddr; |
struct sockaddr ifru_broadaddr; |
struct sockaddr ifru_netmask; |
struct sockaddr ifru_hwaddr; |
short ifru_flags; |
int ifru_ivalue; |
int ifru_mtu; |
struct ifmap ifru_map; |
char ifru_slave[IFNAMSIZ]; /* Just fits the size */ |
char ifru_newname[IFNAMSIZ]; |
char* ifru_data; |
} ifr_ifru; |
}; |
#define ifr_name ifr_ifrn.ifrn_name /* interface name */ |
#define ifr_hwaddr ifr_ifru.ifru_hwaddr /* MAC address */ |
#define ifr_addr ifr_ifru.ifru_addr /* address */ |
#define ifr_dstaddr ifr_ifru.ifru_dstaddr /* other end of p-p lnk */ |
#define ifr_broadaddr ifr_ifru.ifru_broadaddr /* broadcast address */ |
#define ifr_netmask ifr_ifru.ifru_netmask /* interface net mask */ |
#define ifr_flags ifr_ifru.ifru_flags /* flags */ |
#define ifr_metric ifr_ifru.ifru_ivalue /* metric */ |
#define ifr_mtu ifr_ifru.ifru_mtu /* mtu */ |
#define ifr_map ifr_ifru.ifru_map /* device map */ |
#define ifr_slave ifr_ifru.ifru_slave /* slave device */ |
#define ifr_data ifr_ifru.ifru_data /* for use by interface */ |
#define ifr_ifindex ifr_ifru.ifru_ivalue /* interface index */ |
#define ifr_bandwidth ifr_ifru.ifru_ivalue /* link bandwidth */ |
#define ifr_qlen ifr_ifru.ifru_ivalue /* Queue length */ |
#define ifr_newname ifr_ifru.ifru_newname /* New name */ |
struct ifconf { |
int ifc_len; /* size of buffer */ |
union { |
char * ifcu_buf; |
struct ifreq *ifcu_req; |
} ifc_ifcu; |
}; |
#define ifc_buf ifc_ifcu.ifcu_buf /* buffer address */ |
#define ifc_req ifc_ifcu.ifcu_req /* array of structures */ |
unsigned int if_nametoindex (const char *ifname) __THROW; |
char *if_indextoname (unsigned int ifindex, char *ifname) __THROW; |
struct if_nameindex { |
unsigned int if_index; |
char *if_name; |
}; |
struct if_nameindex* if_nameindex(void) __THROW; |
void if_freenameindex(struct if_nameindex* ptr) __THROW; |
__END_DECLS |
#endif |
/contrib/media/updf/include/net/if_arp.h |
---|
0,0 → 1,118 |
#ifndef _NET_IF_ARP_H |
#define _NET_IF_ARP_H |
#include <sys/socket.h> |
__BEGIN_DECLS |
#define MAX_ADDR_LEN 7 |
/* ARP protocol HARDWARE identifiers. */ |
#define ARPHRD_NETROM 0 /* from KA9Q: NET/ROM pseudo */ |
#define ARPHRD_ETHER 1 /* Ethernet 10Mbps */ |
#define ARPHRD_EETHER 2 /* Experimental Ethernet */ |
#define ARPHRD_AX25 3 /* AX.25 Level 2 */ |
#define ARPHRD_PRONET 4 /* PROnet token ring */ |
#define ARPHRD_CHAOS 5 /* Chaosnet */ |
#define ARPHRD_IEEE802 6 /* IEEE 802.2 Ethernet/TR/TB */ |
#define ARPHRD_ARCNET 7 /* ARCnet */ |
#define ARPHRD_APPLETLK 8 /* APPLEtalk */ |
#define ARPHRD_DLCI 15 /* Frame Relay DLCI */ |
#define ARPHRD_ATM 19 /* ATM */ |
#define ARPHRD_METRICOM 23 /* Metricom STRIP (new IANA id) */ |
/* Dummy types for non ARP hardware */ |
#define ARPHRD_SLIP 256 |
#define ARPHRD_CSLIP 257 |
#define ARPHRD_SLIP6 258 |
#define ARPHRD_CSLIP6 259 |
#define ARPHRD_RSRVD 260 /* Notional KISS type */ |
#define ARPHRD_ADAPT 264 |
#define ARPHRD_ROSE 270 |
#define ARPHRD_X25 271 /* CCITT X.25 */ |
#define ARPHRD_HWX25 272 /* Boards with X.25 in firmware */ |
#define ARPHRD_PPP 512 |
#define ARPHRD_CISCO 513 /* Cisco HDLC */ |
#define ARPHRD_HDLC ARPHRD_CISCO |
#define ARPHRD_LAPB 516 /* LAPB */ |
#define ARPHRD_DDCMP 517 /* Digital's DDCMP protocol */ |
#define ARPHRD_RAWHDLC 518 /* Raw HDLC */ |
#define ARPHRD_TUNNEL 768 /* IPIP tunnel */ |
#define ARPHRD_TUNNEL6 769 /* IPIP6 tunnel */ |
#define ARPHRD_FRAD 770 /* Frame Relay Access Device */ |
#define ARPHRD_SKIP 771 /* SKIP vif */ |
#define ARPHRD_LOOPBACK 772 /* Loopback device */ |
#define ARPHRD_LOCALTLK 773 /* Localtalk device */ |
#define ARPHRD_FDDI 774 /* Fiber Distributed Data Interface */ |
#define ARPHRD_BIF 775 /* AP1000 BIF */ |
#define ARPHRD_SIT 776 /* sit0 device - IPv6-in-IPv4 */ |
#define ARPHRD_IPDDP 777 /* IP over DDP tunneller */ |
#define ARPHRD_IPGRE 778 /* GRE over IP */ |
#define ARPHRD_PIMREG 779 /* PIMSM register interface */ |
#define ARPHRD_HIPPI 780 /* High Performance Parallel Interface */ |
#define ARPHRD_ASH 781 /* Nexus 64Mbps Ash */ |
#define ARPHRD_ECONET 782 /* Acorn Econet */ |
#define ARPHRD_IRDA 783 /* Linux-IrDA */ |
/* ARP works differently on different FC media .. so */ |
#define ARPHRD_FCPP 784 /* Point to point fibrechannel */ |
#define ARPHRD_FCAL 785 /* Fibrechannel arbitrated loop */ |
#define ARPHRD_FCPL 786 /* Fibrechannel public loop */ |
#define ARPHRD_FCFABRIC 787 /* Fibrechannel fabric */ |
/* 787->799 reserved for fibrechannel media types */ |
#define ARPHRD_IEEE802_TR 800 /* Magic type ident for TR */ |
#define ARPHRD_IEEE80211 801 /* IEEE 802.11 */ |
#define ARPHRD_VOID 0xFFFF /* Void type, nothing is known */ |
/* ARP protocol opcodes. */ |
#define ARPOP_REQUEST 1 /* ARP request */ |
#define ARPOP_REPLY 2 /* ARP reply */ |
#define ARPOP_RREQUEST 3 /* RARP request */ |
#define ARPOP_RREPLY 4 /* RARP reply */ |
#define ARPOP_InREQUEST 8 /* InARP request */ |
#define ARPOP_InREPLY 9 /* InARP reply */ |
#define ARPOP_NAK 10 /* (ATM)ARP NAK */ |
/* ARP ioctl request. */ |
struct arpreq { |
struct sockaddr arp_pa; /* protocol address */ |
struct sockaddr arp_ha; /* hardware address */ |
int arp_flags; /* flags */ |
struct sockaddr arp_netmask; /* netmask (only for proxy arps) */ |
char arp_dev[16]; |
}; |
struct arpreq_old { |
struct sockaddr arp_pa; /* protocol address */ |
struct sockaddr arp_ha; /* hardware address */ |
int arp_flags; /* flags */ |
struct sockaddr arp_netmask; /* netmask (only for proxy arps) */ |
}; |
/* ARP Flag values. */ |
#define ATF_COM 0x02 /* completed entry (ha valid) */ |
#define ATF_PERM 0x04 /* permanent entry */ |
#define ATF_PUBL 0x08 /* publish entry */ |
#define ATF_USETRAILERS 0x10 /* has requested trailers */ |
#define ATF_NETMASK 0x20 /* want to use a netmask (only |
for proxy entries) */ |
#define ATF_DONTPUB 0x40 /* don't answer this addresses */ |
/* |
* This structure defines an ethernet arp header. |
*/ |
struct arphdr |
{ |
unsigned short ar_hrd; /* format of hardware address */ |
unsigned short ar_pro; /* format of protocol address */ |
unsigned char ar_hln; /* length of hardware address */ |
unsigned char ar_pln; /* length of protocol address */ |
unsigned short ar_op; /* ARP opcode (command) */ |
}; |
__END_DECLS |
#endif |
/contrib/media/updf/include/net/if_ether.h |
---|
0,0 → 1,80 |
#ifndef _NET_IF_ETHER_H |
#define _NET_IF_ETHER_H |
#include <sys/cdefs.h> |
__BEGIN_DECLS |
/* taken from <linux/if_ether.h> */ |
#define ETH_ALEN 6 /* Octets in one ethernet addr */ |
#define ETH_HLEN 14 /* Total octets in header. */ |
#define ETH_ZLEN 60 /* Min. octets in frame sans FCS */ |
#define ETH_DATA_LEN 1500 /* Max. octets in payload */ |
#define ETH_FRAME_LEN 1514 /* Max. octets in frame sans FCS */ |
/* |
* These are the defined Ethernet Protocol ID's. |
*/ |
#define ETH_P_LOOP 0x0060 /* Ethernet Loopback packet */ |
#define ETH_P_PUP 0x0200 /* Xerox PUP packet */ |
#define ETH_P_PUPAT 0x0201 /* Xerox PUP Addr Trans packet */ |
#define ETH_P_IP 0x0800 /* Internet Protocol packet */ |
#define ETH_P_X25 0x0805 /* CCITT X.25 */ |
#define ETH_P_ARP 0x0806 /* Address Resolution packet */ |
#define ETH_P_BPQ 0x08FF /* G8BPQ AX.25 Ethernet Packet [ NOT AN OFFICIALLY REGISTERED ID ] */ |
#define ETH_P_IEEEPUP 0x0a00 /* Xerox IEEE802.3 PUP packet */ |
#define ETH_P_IEEEPUPAT 0x0a01 /* Xerox IEEE802.3 PUP Addr Trans packet */ |
#define ETH_P_DEC 0x6000 /* DEC Assigned proto */ |
#define ETH_P_DNA_DL 0x6001 /* DEC DNA Dump/Load */ |
#define ETH_P_DNA_RC 0x6002 /* DEC DNA Remote Console */ |
#define ETH_P_DNA_RT 0x6003 /* DEC DNA Routing */ |
#define ETH_P_LAT 0x6004 /* DEC LAT */ |
#define ETH_P_DIAG 0x6005 /* DEC Diagnostics */ |
#define ETH_P_CUST 0x6006 /* DEC Customer use */ |
#define ETH_P_SCA 0x6007 /* DEC Systems Comms Arch */ |
#define ETH_P_RARP 0x8035 /* Reverse Addr Res packet */ |
#define ETH_P_ATALK 0x809B /* Appletalk DDP */ |
#define ETH_P_AARP 0x80F3 /* Appletalk AARP */ |
#define ETH_P_8021Q 0x8100 /* 802.1Q VLAN Extended Header */ |
#define ETH_P_IPX 0x8137 /* IPX over DIX */ |
#define ETH_P_IPV6 0x86DD /* IPv6 over bluebook */ |
#define ETH_P_PPP_DISC 0x8863 /* PPPoE discovery messages */ |
#define ETH_P_PPP_SES 0x8864 /* PPPoE session messages */ |
#define ETH_P_ATMMPOA 0x884c /* MultiProtocol Over ATM */ |
#define ETH_P_ATMFATE 0x8884 /* Frame-based ATM Transport over Ethernet */ |
/* |
* Non DIX types. Won't clash for 1500 types. |
*/ |
#define ETH_P_802_3 0x0001 /* Dummy type for 802.3 frames */ |
#define ETH_P_AX25 0x0002 /* Dummy protocol id for AX.25 */ |
#define ETH_P_ALL 0x0003 /* Every packet (be careful!!!) */ |
#define ETH_P_802_2 0x0004 /* 802.2 frames */ |
#define ETH_P_SNAP 0x0005 /* Internal only */ |
#define ETH_P_DDCMP 0x0006 /* DEC DDCMP: Internal only */ |
#define ETH_P_WAN_PPP 0x0007 /* Dummy type for WAN PPP frames*/ |
#define ETH_P_PPP_MP 0x0008 /* Dummy type for PPP MP frames */ |
#define ETH_P_LOCALTALK 0x0009 /* Localtalk pseudo type */ |
#define ETH_P_PPPTALK 0x0010 /* Dummy type for Atalk over PPP*/ |
#define ETH_P_TR_802_2 0x0011 /* 802.2 frames */ |
#define ETH_P_MOBITEX 0x0015 /* Mobitex (kaz@cafe.net) */ |
#define ETH_P_CONTROL 0x0016 /* Card specific control frames */ |
#define ETH_P_IRDA 0x0017 /* Linux-IrDA */ |
#define ETH_P_ECONET 0x0018 /* Acorn Econet */ |
/* |
* This is an Ethernet frame header. |
*/ |
struct ethhdr { |
unsigned char h_dest[ETH_ALEN]; /* destination eth addr */ |
unsigned char h_source[ETH_ALEN]; /* source ether addr */ |
unsigned short h_proto; /* packet type ID field */ |
}; |
__END_DECLS |
#endif |
/contrib/media/updf/include/net/route.h |
---|
0,0 → 1,54 |
#ifndef _NET_ROUTE_H |
#define _NET_ROUTE_H |
#include <inttypes.h> |
#include <netinet/in.h> |
__BEGIN_DECLS |
/* This structure gets passed by the SIOCADDRT and SIOCDELRT calls. */ |
struct rtentry { |
unsigned long rt_pad1; |
struct sockaddr rt_dst; /* target address */ |
struct sockaddr rt_gateway; /* gateway addr (RTF_GATEWAY) */ |
struct sockaddr rt_genmask; /* target network mask (IP) */ |
unsigned short rt_flags; |
short rt_pad2; |
unsigned long rt_pad3; |
void *rt_pad4; |
short rt_metric; /* +1 for binary compatibility! */ |
char *rt_dev; /* forcing the device at add */ |
unsigned long rt_mtu; /* per route MTU/Window */ |
#define rt_mss rt_mtu /* Compatibility :-( */ |
unsigned long rt_window; /* Window clamping */ |
unsigned short rt_irtt; /* Initial RTT */ |
}; |
#define RTF_UP 0x0001 /* route usable */ |
#define RTF_GATEWAY 0x0002 /* destination is a gateway */ |
#define RTF_HOST 0x0004 /* host entry (net otherwise) */ |
#define RTF_REINSTATE 0x0008 /* reinstate route after tmout */ |
#define RTF_DYNAMIC 0x0010 /* created dyn. (by redirect) */ |
#define RTF_MODIFIED 0x0020 /* modified dyn. (by redirect) */ |
#define RTF_MTU 0x0040 /* specific MTU for this route */ |
#define RTF_MSS RTF_MTU /* Compatibility :-( */ |
#define RTF_WINDOW 0x0080 /* per route window clamping */ |
#define RTF_IRTT 0x0100 /* Initial round trip time */ |
#define RTF_REJECT 0x0200 /* Reject route */ |
struct in6_rtmsg { |
struct in6_addr rtmsg_dst; |
struct in6_addr rtmsg_src; |
struct in6_addr rtmsg_gateway; |
uint32_t rtmsg_type; |
uint16_t rtmsg_dst_len; |
uint16_t rtmsg_src_len; |
uint32_t rtmsg_metric; |
unsigned long int rtmsg_info; |
uint32_t rtmsg_flags; |
int rtmsg_ifindex; |
}; |
__END_DECLS |
#endif |
/contrib/media/updf/include/netinet/in.h |
---|
0,0 → 1,428 |
#ifndef _NETINET_IN_H |
#define _NETINET_IN_H |
#include <sys/types.h> |
#include <sys/socket.h> |
#include <endian.h> |
__BEGIN_DECLS |
/* Standard well-defined IP protocols. */ |
enum { |
IPPROTO_IP = 0, /* Dummy protocol for TCP */ |
#define IPPROTO_IP IPPROTO_IP |
IPPROTO_ICMP = 1, /* Internet Control Message Protocol */ |
#define IPPROTO_ICMP IPPROTO_ICMP |
IPPROTO_IGMP = 2, /* Internet Group Management Protocol */ |
#define IPPROTO_IGMP IPPROTO_IGMP |
IPPROTO_IPIP = 4, /* IPIP tunnels (older KA9Q tunnels use 94) */ |
#define IPPROTO_IPIP IPPROTO_IPIP |
IPPROTO_TCP = 6, /* Transmission Control Protocol */ |
#define IPPROTO_TCP IPPROTO_TCP |
IPPROTO_EGP = 8, /* Exterior Gateway Protocol */ |
#define IPPROTO_EGP IPPROTO_EGP |
IPPROTO_PUP = 12, /* PUP protocol */ |
#define IPPROTO_PUP IPPROTO_PUP |
IPPROTO_UDP = 17, /* User Datagram Protocol */ |
#define IPPROTO_UDP IPPROTO_UDP |
IPPROTO_IDP = 22, /* XNS IDP protocol */ |
#define IPPROTO_IDP IPPROTO_IDP |
IPPROTO_RSVP = 46, /* RSVP protocol */ |
#define IPPROTO_RSVP IPPROTO_RSVP |
IPPROTO_GRE = 47, /* Cisco GRE tunnels (rfc 1701,1702) */ |
#define IPPROTO_GRE IPPROTO_GRE |
IPPROTO_IPV6 = 41, /* IPv6-in-IPv4 tunnelling */ |
#define IPPROTO_IPV6 IPPROTO_IPV6 |
IPPROTO_PIM = 103, /* Protocol Independent Multicast */ |
#define IPPROTO_PIM IPPROTO_PIM |
IPPROTO_ESP = 50, /* Encapsulation Security Payload protocol */ |
#define IPPROTO_ESP IPPROTO_ESP |
IPPROTO_AH = 51, /* Authentication Header protocol */ |
#define IPPROTO_AH IPPROTO_AH |
IPPROTO_COMP = 108, /* Compression Header protocol */ |
#define IPPROTO_COMP IPPROTO_COMP |
IPPROTO_RAW = 255, /* Raw IP packets */ |
#define IPPROTO_RAW IPPROTO_RAW |
IPPROTO_MAX |
}; |
#define IP_TOS 1 |
#define IP_TTL 2 |
#define IP_HDRINCL 3 |
#define IP_OPTIONS 4 |
#define IP_ROUTER_ALERT 5 |
#define IP_RECVOPTS 6 |
#define IP_RETOPTS 7 |
#define IP_PKTINFO 8 |
#define IP_PKTOPTIONS 9 |
#define IP_MTU_DISCOVER 10 |
#define IP_RECVERR 11 |
#define IP_RECVTTL 12 |
#define IP_RECVTOS 13 |
#define IP_MTU 14 |
#define IP_FREEBIND 15 |
/* BSD compatibility */ |
#define IP_RECVRETOPTS IP_RETOPTS |
/* IP_MTU_DISCOVER values */ |
#define IP_PMTUDISC_DONT 0 /* Never send DF frames */ |
#define IP_PMTUDISC_WANT 1 /* Use per route hints */ |
#define IP_PMTUDISC_DO 2 /* Always DF */ |
#define IP_MULTICAST_IF 32 |
#define IP_MULTICAST_TTL 33 |
#define IP_MULTICAST_LOOP 34 |
#define IP_ADD_MEMBERSHIP 35 |
#define IP_DROP_MEMBERSHIP 36 |
/* These need to appear somewhere around here */ |
#define IP_DEFAULT_MULTICAST_TTL 1 |
#define IP_DEFAULT_MULTICAST_LOOP 1 |
#define IN6ADDR_ANY_INIT {{{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }}} |
#define IN6ADDR_LOOPBACK_INIT {{{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 }}} |
extern const struct in6_addr in6addr_any; |
extern const struct in6_addr in6addr_loopback; |
typedef uint16_t in_port_t; |
typedef uint32_t in_addr_t; |
struct in_addr { |
in_addr_t s_addr; |
}; |
struct ip_mreq { |
struct in_addr imr_multiaddr; /* IP multicast address of group */ |
struct in_addr imr_interface; /* local IP address of interface */ |
}; |
struct ip_mreqn { |
struct in_addr imr_multiaddr; /* IP multicast address of group */ |
struct in_addr imr_address; /* local IP address of interface */ |
int imr_ifindex; /* Interface index */ |
}; |
struct in_pktinfo { |
int ipi_ifindex; |
struct in_addr ipi_spec_dst; |
struct in_addr ipi_addr; |
}; |
/* Structure describing an Internet (IP) socket address. */ |
#define __SOCK_SIZE__ 16 /* sizeof(struct sockaddr) */ |
struct sockaddr_in { |
sa_family_t sin_family; /* Address family */ |
in_port_t sin_port; /* Port number */ |
struct in_addr sin_addr; /* Internet address */ |
/* Pad to size of `struct sockaddr'. */ |
unsigned char sin_zero[__SOCK_SIZE__ - sizeof(short int) - |
sizeof(unsigned short int) - sizeof(struct in_addr)]; |
}; |
/* |
* Definitions of the bits in an Internet address integer. |
* On subnets, host and network parts are found according |
* to the subnet mask, not these masks. |
*/ |
#define IN_CLASSA(a) ((((long int) (a)) & 0x80000000) == 0) |
#define IN_CLASSA_NET 0xff000000 |
#define IN_CLASSA_NSHIFT 24 |
#define IN_CLASSA_HOST (0xffffffff & ~IN_CLASSA_NET) |
#define IN_CLASSA_MAX 128 |
#define IN_CLASSB(a) ((((long int) (a)) & 0xc0000000) == 0x80000000) |
#define IN_CLASSB_NET 0xffff0000 |
#define IN_CLASSB_NSHIFT 16 |
#define IN_CLASSB_HOST (0xffffffff & ~IN_CLASSB_NET) |
#define IN_CLASSB_MAX 65536 |
#define IN_CLASSC(a) ((((long int) (a)) & 0xe0000000) == 0xc0000000) |
#define IN_CLASSC_NET 0xffffff00 |
#define IN_CLASSC_NSHIFT 8 |
#define IN_CLASSC_HOST (0xffffffff & ~IN_CLASSC_NET) |
#define IN_CLASSD(a) ((((long int) (a)) & 0xf0000000) == 0xe0000000) |
#define IN_MULTICAST(a) IN_CLASSD(a) |
#define IN_MULTICAST_NET 0xF0000000 |
#define IN_EXPERIMENTAL(a) ((((long int) (a)) & 0xf0000000) == 0xf0000000) |
#define IN_BADCLASS(a) IN_EXPERIMENTAL((a)) |
/* Address to accept any incoming messages. */ |
#define INADDR_ANY ((unsigned long int) 0x00000000) |
/* Address to send to all hosts. */ |
#define INADDR_BROADCAST ((unsigned long int) 0xffffffff) |
/* Address indicating an error return. */ |
#define INADDR_NONE ((unsigned long int) 0xffffffff) |
/* Network number for local host loopback. */ |
#define IN_LOOPBACKNET 127 |
/* Address to loopback in software to local host. */ |
#define INADDR_LOOPBACK 0x7f000001 /* 127.0.0.1 */ |
#define IN_LOOPBACK(a) ((((long int) (a)) & 0xff000000) == 0x7f000000) |
/* Defines for Multicast INADDR */ |
#define INADDR_UNSPEC_GROUP 0xe0000000U /* 224.0.0.0 */ |
#define INADDR_ALLHOSTS_GROUP 0xe0000001U /* 224.0.0.1 */ |
#define INADDR_ALLRTRS_GROUP 0xe0000002U /* 224.0.0.2 */ |
#define INADDR_MAX_LOCAL_GROUP 0xe00000ffU /* 224.0.0.255 */ |
struct in6_addr { |
union { |
uint8_t u6_addr8[16]; |
uint16_t u6_addr16[8]; |
uint32_t u6_addr32[4]; |
} in6_u; |
#define s6_addr in6_u.u6_addr8 |
#define s6_addr16 in6_u.u6_addr16 |
#define s6_addr32 in6_u.u6_addr32 |
}; |
struct sockaddr_in6 { |
unsigned short int sin6_family; /* AF_INET6 */ |
uint16_t sin6_port; /* Transport layer port # */ |
uint32_t sin6_flowinfo; /* IPv6 flow information */ |
struct in6_addr sin6_addr; /* IPv6 address */ |
uint32_t sin6_scope_id; /* scope id (new in RFC2553) */ |
}; |
struct sockaddr_in_pad { |
sa_family_t sin_family; /* Address family */ |
in_port_t sin_port; /* Port number */ |
struct in_addr sin_addr; /* Internet address */ |
/* Pad to size of `struct sockaddr_in6'. */ |
unsigned char sin_zero[sizeof(struct sockaddr_in6) - sizeof(short int) - |
sizeof(unsigned short int) - sizeof(struct in_addr)]; |
}; |
struct ipv6_mreq { |
/* IPv6 multicast address of group */ |
struct in6_addr ipv6mr_multiaddr; |
/* local IPv6 address of interface */ |
int ipv6mr_interface; |
}; |
struct in6_flowlabel_req { |
struct in6_addr flr_dst; |
uint32_t flr_label; |
uint8_t flr_action; |
uint8_t flr_share; |
uint16_t flr_flags; |
uint16_t flr_expires; |
uint16_t flr_linger; |
uint32_t __flr_pad; |
/* Options in format of IPV6_PKTOPTIONS */ |
}; |
#define IPV6_FL_A_GET 0 |
#define IPV6_FL_A_PUT 1 |
#define IPV6_FL_A_RENEW 2 |
#define IPV6_FL_F_CREATE 1 |
#define IPV6_FL_F_EXCL 2 |
#define IPV6_FL_S_NONE 0 |
#define IPV6_FL_S_EXCL 1 |
#define IPV6_FL_S_PROCESS 2 |
#define IPV6_FL_S_USER 3 |
#define IPV6_FL_S_ANY 255 |
#define IPV6_FLOWINFO_FLOWLABEL 0x000fffff |
#define IPV6_FLOWINFO_PRIORITY 0x0ff00000 |
/* |
* IPV6 extension headers |
*/ |
#define IPPROTO_HOPOPTS 0 /* IPv6 hop-by-hop options */ |
#define IPPROTO_ROUTING 43 /* IPv6 routing header */ |
#define IPPROTO_FRAGMENT 44 /* IPv6 fragmentation header */ |
#define IPPROTO_ICMPV6 58 /* ICMPv6 */ |
#define IPPROTO_NONE 59 /* IPv6 no next header */ |
#define IPPROTO_DSTOPTS 60 /* IPv6 destination options */ |
/* IPv6 TLV options. */ |
#define IPV6_TLV_PAD0 0 |
#define IPV6_TLV_PADN 1 |
#define IPV6_TLV_ROUTERALERT 5 |
#define IPV6_TLV_JUMBO 194 |
/* IPV6 socket options. */ |
#define IPV6_ADDRFORM 1 |
#define IPV6_PKTINFO 2 |
#define IPV6_HOPOPTS 3 |
#define IPV6_DSTOPTS 4 |
#define IPV6_RTHDR 5 |
#define IPV6_PKTOPTIONS 6 |
#define IPV6_CHECKSUM 7 |
#define IPV6_HOPLIMIT 8 |
#define IPV6_NEXTHOP 9 |
#define IPV6_AUTHHDR 10 |
#define IPV6_FLOWINFO 11 |
#define IPV6_UNICAST_HOPS 16 |
#define IPV6_MULTICAST_IF 17 |
#define IPV6_MULTICAST_HOPS 18 |
#define IPV6_MULTICAST_LOOP 19 |
#define IPV6_ADD_MEMBERSHIP 20 |
#define IPV6_DROP_MEMBERSHIP 21 |
#define IPV6_ROUTER_ALERT 22 |
#define IPV6_MTU_DISCOVER 23 |
#define IPV6_MTU 24 |
#define IPV6_RECVERR 25 |
/* IPV6_MTU_DISCOVER values */ |
#define IPV6_PMTUDISC_DONT 0 |
#define IPV6_PMTUDISC_WANT 1 |
#define IPV6_PMTUDISC_DO 2 |
/* Flowlabel */ |
#define IPV6_FLOWLABEL_MGR 32 |
#define IPV6_FLOWINFO_SEND 33 |
#define IPV6_MIN_MTU 1280 |
struct in6_pktinfo { |
struct in6_addr ipi6_addr; |
int ipi6_ifindex; |
}; |
struct in6_ifreq { |
struct in6_addr ifr6_addr; |
uint32_t ifr6_prefixlen; |
int ifr6_ifindex; |
}; |
#define IPV6_SRCRT_STRICT 0x01 /* this hop must be a neighbor */ |
#define IPV6_SRCRT_TYPE_0 0 /* IPv6 type 0 Routing Header */ |
/* routing header */ |
struct ipv6_rt_hdr { |
uint8_t nexthdr; |
uint8_t hdrlen; |
uint8_t type; |
uint8_t segments_left; |
/* type specific data, variable length field */ |
}; |
struct ipv6_opt_hdr { |
uint8_t nexthdr; |
uint8_t hdrlen; |
/* TLV encoded option data follows. */ |
}; |
#define ipv6_destopt_hdr ipv6_opt_hdr |
#define ipv6_hopopt_hdr ipv6_opt_hdr |
/* routing header type 0 (used in cmsghdr struct) */ |
#ifndef __STRICT_ANSI__ |
struct rt0_hdr { |
struct ipv6_rt_hdr rt_hdr; |
uint32_t bitmap; /* strict/loose bit map */ |
struct in6_addr addr[0]; |
#define rt0_type rt_hdr.type; |
}; |
#endif |
struct ipv6hdr { |
#if __BYTE_ORDER == __LITTLE_ENDIAN |
unsigned int flow_lbl:20, |
priority:8, |
version:4; |
#else |
unsigned int version:4, |
priority:8, |
flow_lbl:20; |
#endif |
uint16_t payload_len; |
uint8_t nexthdr; |
uint8_t hop_limit; |
struct in6_addr saddr; |
struct in6_addr daddr; |
}; |
/* fnord */ |
#define IPPORT_RESERVED 1024 |
#define INET6_ADDRSTRLEN 46 |
#undef htonl |
#undef htons |
#undef ntohl |
#undef ntohs |
uint32_t htonl(uint32_t hostlong); |
uint16_t htons(uint16_t hostshort); |
uint32_t ntohl(uint32_t netlong); |
uint16_t ntohs(uint16_t netshort); |
#define IN6_IS_ADDR_UNSPECIFIED(a) \ |
(((__const uint32_t *) (a))[0] == 0 \ |
&& ((__const uint32_t *) (a))[1] == 0 \ |
&& ((__const uint32_t *) (a))[2] == 0 \ |
&& ((__const uint32_t *) (a))[3] == 0) |
#define IN6_IS_ADDR_LOOPBACK(a) \ |
(((__const uint32_t *) (a))[0] == 0 \ |
&& ((__const uint32_t *) (a))[1] == 0 \ |
&& ((__const uint32_t *) (a))[2] == 0 \ |
&& ((__const uint32_t *) (a))[3] == htonl (1)) |
#define IN6_IS_ADDR_MULTICAST(a) (((__const uint8_t *) (a))[0] == 0xff) |
#define IN6_IS_ADDR_LINKLOCAL(a) \ |
((((__const uint32_t *) (a))[0] & htonl (0xffc00000)) \ |
== htonl (0xfe800000)) |
#define IN6_IS_ADDR_SITELOCAL(a) \ |
((((__const uint32_t *) (a))[0] & htonl (0xffc00000)) \ |
== htonl (0xfec00000)) |
#define IN6_IS_ADDR_V4MAPPED(a) \ |
((((__const uint32_t *) (a))[0] == 0) \ |
&& (((__const uint32_t *) (a))[1] == 0) \ |
&& (((__const uint32_t *) (a))[2] == htonl (0xffff))) |
#define IN6_IS_ADDR_V4COMPAT(a) \ |
((((__const uint32_t *) (a))[0] == 0) \ |
&& (((__const uint32_t *) (a))[1] == 0) \ |
&& (((__const uint32_t *) (a))[2] == 0) \ |
&& (ntohl (((__const uint32_t *) (a))[3]) > 1)) |
#define IN6_ARE_ADDR_EQUAL(a,b) \ |
((((__const uint32_t *) (a))[0] == ((__const uint32_t *) (b))[0]) \ |
&& (((__const uint32_t *) (a))[1] == ((__const uint32_t *) (b))[1]) \ |
&& (((__const uint32_t *) (a))[2] == ((__const uint32_t *) (b))[2]) \ |
&& (((__const uint32_t *) (a))[3] == ((__const uint32_t *) (b))[3])) |
/* old legacy bullshit */ |
int bindresvport(int sd, struct sockaddr_in* _sin); |
#define IN6_IS_ADDR_MC_NODELOCAL(a) \ |
(IN6_IS_ADDR_MULTICAST(a) \ |
&& ((((__const uint8_t *) (a))[1] & 0xf) == 0x1)) |
#define IN6_IS_ADDR_MC_LINKLOCAL(a) \ |
(IN6_IS_ADDR_MULTICAST(a) \ |
&& ((((__const uint8_t *) (a))[1] & 0xf) == 0x2)) |
#define IN6_IS_ADDR_MC_SITELOCAL(a) \ |
(IN6_IS_ADDR_MULTICAST(a) \ |
&& ((((__const uint8_t *) (a))[1] & 0xf) == 0x5)) |
#define IN6_IS_ADDR_MC_ORGLOCAL(a) \ |
(IN6_IS_ADDR_MULTICAST(a) \ |
&& ((((__const uint8_t *) (a))[1] & 0xf) == 0x8)) |
#define IN6_IS_ADDR_MC_GLOBAL(a) \ |
(IN6_IS_ADDR_MULTICAST(a) \ |
&& ((((__const uint8_t *) (a))[1] & 0xf) == 0xe)) |
__END_DECLS |
#endif |
/contrib/media/updf/include/netinet/in_systm.h |
---|
--- netinet/ip.h (nonexistent) |
+++ netinet/ip.h (revision 5819) |
@@ -0,0 +1,125 @@ |
+#ifndef _NETINET_IP_H |
+#define _NETINET_IP_H |
+ |
+#include <inttypes.h> |
+#include <endian.h> |
+#include <netinet/in.h> |
+ |
+__BEGIN_DECLS |
+ |
+#define IPVERSION 4 /* IP version number */ |
+#define IP_MAXPACKET 65535 /* maximum packet size */ |
+ |
+#define IPTOS_TOS_MASK 0x1E |
+#define IPTOS_TOS(tos) ((tos)&IPTOS_TOS_MASK) |
+#define IPTOS_LOWDELAY 0x10 |
+#define IPTOS_THROUGHPUT 0x08 |
+#define IPTOS_RELIABILITY 0x04 |
+#define IPTOS_MINCOST 0x02 |
+#define IPTOS_LOWCOST IPTOS_MINCOST |
+ |
+#define IPTOS_PREC_MASK 0xE0 |
+#define IPTOS_PREC(tos) ((tos)&IPTOS_PREC_MASK) |
+#define IPTOS_PREC_NETCONTROL 0xe0 |
+#define IPTOS_PREC_INTERNETCONTROL 0xc0 |
+#define IPTOS_PREC_CRITIC_ECP 0xa0 |
+#define IPTOS_PREC_FLASHOVERRIDE 0x80 |
+#define IPTOS_PREC_FLASH 0x60 |
+#define IPTOS_PREC_IMMEDIATE 0x40 |
+#define IPTOS_PREC_PRIORITY 0x20 |
+#define IPTOS_PREC_ROUTINE 0x00 |
+ |
+ |
+/* IP options */ |
+#define IPOPT_COPY 0x80 |
+#define IPOPT_CLASS_MASK 0x60 |
+#define IPOPT_NUMBER_MASK 0x1f |
+ |
+#define IPOPT_COPIED(o) ((o)&IPOPT_COPY) |
+#define IPOPT_CLASS(o) ((o)&IPOPT_CLASS_MASK) |
+#define IPOPT_NUMBER(o) ((o)&IPOPT_NUMBER_MASK) |
+ |
+#define IPOPT_CONTROL 0x00 |
+#define IPOPT_RESERVED1 0x20 |
+#define IPOPT_MEASUREMENT 0x40 |
+#define IPOPT_RESERVED2 0x60 |
+ |
+#define IPOPT_END (0 |IPOPT_CONTROL) |
+#define IPOPT_NOOP (1 |IPOPT_CONTROL) |
+#define IPOPT_SEC (2 |IPOPT_CONTROL|IPOPT_COPY) |
+#define IPOPT_LSRR (3 |IPOPT_CONTROL|IPOPT_COPY) |
+#define IPOPT_TIMESTAMP (4 |IPOPT_MEASUREMENT) |
+#define IPOPT_RR (7 |IPOPT_CONTROL) |
+#define IPOPT_SID (8 |IPOPT_CONTROL|IPOPT_COPY) |
+#define IPOPT_SSRR (9 |IPOPT_CONTROL|IPOPT_COPY) |
+#define IPOPT_RA (20|IPOPT_CONTROL|IPOPT_COPY) |
+ |
+#define IPVERSION 4 |
+#define MAXTTL 255 |
+#define IPDEFTTL 64 |
+ |
+/* struct timestamp, struct route and MAX_ROUTES are removed. |
+ |
+ REASONS: it is clear that nobody used them because: |
+ - MAX_ROUTES value was wrong. |
+ - "struct route" was wrong. |
+ - "struct timestamp" had fatally misaligned bitfields and was completely unusable. |
+ */ |
+ |
+#define IPOPT_OPTVAL 0 |
+#define IPOPT_OLEN 1 |
+#define IPOPT_OFFSET 2 |
+#define IPOPT_MINOFF 4 |
+#define MAX_IPOPTLEN 40 |
+#define IPOPT_NOP IPOPT_NOOP |
+#define IPOPT_EOL IPOPT_END |
+#define IPOPT_TS IPOPT_TIMESTAMP |
+ |
+#define IPOPT_TS_TSONLY 0 /* timestamps only */ |
+#define IPOPT_TS_TSANDADDR 1 /* timestamps and addresses */ |
+#define IPOPT_TS_PRESPEC 3 /* specified modules only */ |
+ |
+struct iphdr { /* size 20/0x14 */ |
+#if __BYTE_ORDER == __LITTLE_ENDIAN |
+ unsigned int ihl:4, version:4; /* offset 0; version=ip version (4) */ |
+#else |
+ unsigned int version:4, ihl:4; /* offset 0; ihl=ip header length, measured in words (5) */ |
+#endif |
+ unsigned char tos; /* offset 1 */ |
+ unsigned short tot_len; /* offset 2; total bytes in packet in network byte order */ |
+ unsigned short id; /* offset 4 */ |
+ unsigned short frag_off; /* offset 6 */ |
+ unsigned char ttl; /* offset 8 */ |
+ unsigned char protocol; /* offset 9; 1=ICMP, 6=TCP, 17=UDP (see netinet/in.h) */ |
+ unsigned short check; /* offset 10/0xa */ |
+ unsigned int saddr; /* offset 12/0xc */ |
+ unsigned int daddr; /* offset 16/0x10 */ |
+ /*The options start here. */ |
+}; |
+ |
+struct ip { |
+#if __BYTE_ORDER == __LITTLE_ENDIAN |
+ unsigned int ip_hl:4; /* header length */ |
+ unsigned int ip_v:4; /* version */ |
+#endif |
+#if __BYTE_ORDER == __BIG_ENDIAN |
+ unsigned int ip_v:4; /* version */ |
+ unsigned int ip_hl:4; /* header length */ |
+#endif |
+ unsigned char ip_tos; /* type of service */ |
+ unsigned short ip_len; /* total length */ |
+ unsigned short ip_id; /* identification */ |
+ unsigned short ip_off; /* fragment offset field */ |
+#define IP_RF 0x8000 /* reserved fragment flag */ |
+#define IP_DF 0x4000 /* dont fragment flag */ |
+#define IP_MF 0x2000 /* more fragments flag */ |
+#define IP_OFFMASK 0x1fff /* mask for fragmenting bits */ |
+ unsigned char ip_ttl; /* time to live */ |
+ unsigned char ip_p; /* protocol */ |
+ unsigned short ip_sum; /* checksum */ |
+ struct in_addr ip_src, ip_dst; /* source and dest address */ |
+}; |
+ |
+__END_DECLS |
+ |
+#endif |
/contrib/media/updf/include/netinet/ip_icmp.h |
---|
0,0 → 1,149 |
#ifndef NETINET_IP_ICMP_H |
#define NETINET_IP_ICMP_H |
#include <sys/cdefs.h> |
#include <inttypes.h> |
#include <netinet/ip.h> |
__BEGIN_DECLS |
struct icmphdr { |
uint8_t type; /* message type */ |
uint8_t code; /* type sub-code */ |
uint16_t checksum; |
union { |
struct { |
uint16_t id; |
uint16_t sequence; |
} echo; /* echo datagram */ |
uint32_t gateway; /* gateway address */ |
struct { |
uint16_t __unused; |
uint16_t mtu; |
} frag; /* path mtu discovery */ |
} un; |
}; |
#define ICMP_ECHOREPLY 0 /* Echo Reply */ |
#define ICMP_DEST_UNREACH 3 /* Destination Unreachable */ |
#define ICMP_SOURCE_QUENCH 4 /* Source Quench */ |
#define ICMP_REDIRECT 5 /* Redirect (change route) */ |
#define ICMP_ECHO 8 /* Echo Request */ |
#define ICMP_TIME_EXCEEDED 11 /* Time Exceeded */ |
#define ICMP_PARAMETERPROB 12 /* Parameter Problem */ |
#define ICMP_TIMESTAMP 13 /* Timestamp Request */ |
#define ICMP_TIMESTAMPREPLY 14 /* Timestamp Reply */ |
#define ICMP_INFO_REQUEST 15 /* Information Request */ |
#define ICMP_INFO_REPLY 16 /* Information Reply */ |
#define ICMP_ADDRESS 17 /* Address Mask Request */ |
#define ICMP_ADDRESSREPLY 18 /* Address Mask Reply */ |
#define NR_ICMP_TYPES 18 |
/* Codes for UNREACH. */ |
#define ICMP_NET_UNREACH 0 /* Network Unreachable */ |
#define ICMP_HOST_UNREACH 1 /* Host Unreachable */ |
#define ICMP_PROT_UNREACH 2 /* Protocol Unreachable */ |
#define ICMP_PORT_UNREACH 3 /* Port Unreachable */ |
#define ICMP_FRAG_NEEDED 4 /* Fragmentation Needed/DF set */ |
#define ICMP_SR_FAILED 5 /* Source Route failed */ |
#define ICMP_NET_UNKNOWN 6 |
#define ICMP_HOST_UNKNOWN 7 |
#define ICMP_HOST_ISOLATED 8 |
#define ICMP_NET_ANO 9 |
#define ICMP_HOST_ANO 10 |
#define ICMP_NET_UNR_TOS 11 |
#define ICMP_HOST_UNR_TOS 12 |
#define ICMP_PKT_FILTERED 13 /* Packet filtered */ |
#define ICMP_PREC_VIOLATION 14 /* Precedence violation */ |
#define ICMP_PREC_CUTOFF 15 /* Precedence cut off */ |
#define NR_ICMP_UNREACH 15 /* instead of hardcoding immediate value */ |
/* Codes for REDIRECT. */ |
#define ICMP_REDIR_NET 0 /* Redirect Net */ |
#define ICMP_REDIR_HOST 1 /* Redirect Host */ |
#define ICMP_REDIR_NETTOS 2 /* Redirect Net for TOS */ |
#define ICMP_REDIR_HOSTTOS 3 /* Redirect Host for TOS */ |
/* Codes for TIME_EXCEEDED. */ |
#define ICMP_EXC_TTL 0 /* TTL count exceeded */ |
#define ICMP_EXC_FRAGTIME 1 /* Fragment Reass time exceeded */ |
/* |
* Lower bounds on packet lengths for various types. |
* For the error advice packets must first insure that the |
* packet is large enough to contain the returned ip header. |
* Only then can we do the check to see if 64 bits of packet |
* data have been returned, since we need to check the returned |
* ip header length. |
*/ |
#define ICMP_MINLEN 8 /* abs minimum */ |
#define ICMP_TSLEN (8 + 3 * sizeof (n_time)) /* timestamp */ |
#define ICMP_MASKLEN 12 /* address mask */ |
#define ICMP_ADVLENMIN (8 + sizeof (struct ip) + 8) /* min */ |
#ifndef _IP_VHL |
#define ICMP_ADVLEN(p) (8 + ((p)->icmp_ip.ip_hl << 2) + 8) |
/* N.B.: must separately check that ip_hl >= 5 */ |
#else |
#define ICMP_ADVLEN(p) (8 + (IP_VHL_HL((p)->icmp_ip.ip_vhl) << 2) + 8) |
/* N.B.: must separately check that header length >= 5 */ |
#endif |
/* Definition of type and code fields. */ |
/* defined above: ICMP_ECHOREPLY, ICMP_REDIRECT, ICMP_ECHO */ |
#define ICMP_UNREACH 3 /* dest unreachable, codes: */ |
#define ICMP_SOURCEQUENCH 4 /* packet lost, slow down */ |
#define ICMP_ROUTERADVERT 9 /* router advertisement */ |
#define ICMP_ROUTERSOLICIT 10 /* router solicitation */ |
#define ICMP_TIMXCEED 11 /* time exceeded, code: */ |
#define ICMP_PARAMPROB 12 /* ip header bad */ |
#define ICMP_TSTAMP 13 /* timestamp request */ |
#define ICMP_TSTAMPREPLY 14 /* timestamp reply */ |
#define ICMP_IREQ 15 /* information request */ |
#define ICMP_IREQREPLY 16 /* information reply */ |
#define ICMP_MASKREQ 17 /* address mask request */ |
#define ICMP_MASKREPLY 18 /* address mask reply */ |
#define ICMP_MAXTYPE 18 |
/* UNREACH codes */ |
#define ICMP_UNREACH_NET 0 /* bad net */ |
#define ICMP_UNREACH_HOST 1 /* bad host */ |
#define ICMP_UNREACH_PROTOCOL 2 /* bad protocol */ |
#define ICMP_UNREACH_PORT 3 /* bad port */ |
#define ICMP_UNREACH_NEEDFRAG 4 /* IP_DF caused drop */ |
#define ICMP_UNREACH_SRCFAIL 5 /* src route failed */ |
#define ICMP_UNREACH_NET_UNKNOWN 6 /* unknown net */ |
#define ICMP_UNREACH_HOST_UNKNOWN 7 /* unknown host */ |
#define ICMP_UNREACH_ISOLATED 8 /* src host isolated */ |
#define ICMP_UNREACH_NET_PROHIB 9 /* net denied */ |
#define ICMP_UNREACH_HOST_PROHIB 10 /* host denied */ |
#define ICMP_UNREACH_TOSNET 11 /* bad tos for net */ |
#define ICMP_UNREACH_TOSHOST 12 /* bad tos for host */ |
#define ICMP_UNREACH_FILTER_PROHIB 13 /* admin prohib */ |
#define ICMP_UNREACH_HOST_PRECEDENCE 14 /* host prec vio. */ |
#define ICMP_UNREACH_PRECEDENCE_CUTOFF 15 /* prec cutoff */ |
/* REDIRECT codes */ |
#define ICMP_REDIRECT_NET 0 /* for network */ |
#define ICMP_REDIRECT_HOST 1 /* for host */ |
#define ICMP_REDIRECT_TOSNET 2 /* for tos and net */ |
#define ICMP_REDIRECT_TOSHOST 3 /* for tos and host */ |
/* TIMEXCEED codes */ |
#define ICMP_TIMXCEED_INTRANS 0 /* ttl==0 in transit */ |
#define ICMP_TIMXCEED_REASS 1 /* ttl==0 in reass */ |
/* PARAMPROB code */ |
#define ICMP_PARAMPROB_OPTABSENT 1 /* req. opt. absent */ |
#define ICMP_INFOTYPE(type) \ |
((type) == ICMP_ECHOREPLY || (type) == ICMP_ECHO || \ |
(type) == ICMP_ROUTERADVERT || (type) == ICMP_ROUTERSOLICIT || \ |
(type) == ICMP_TSTAMP || (type) == ICMP_TSTAMPREPLY || \ |
(type) == ICMP_IREQ || (type) == ICMP_IREQREPLY || \ |
(type) == ICMP_MASKREQ || (type) == ICMP_MASKREPLY) |
__END_DECLS |
#endif |
/contrib/media/updf/include/netinet/tcp.h |
---|
0,0 → 1,168 |
#ifndef _NETINET_TCP_H |
#define _NETINET_TCP_H |
#include <inttypes.h> |
#include <endian.h> |
__BEGIN_DECLS |
struct tcphdr { /* size 20/0x14 40/0x28 with IP header */ |
uint16_t source; /* offset 0 20/0x14 */ |
uint16_t dest; /* offset 2 22/0x16 */ |
uint32_t seq; /* offset 4 24/0x18 */ |
uint32_t ack_seq; /* offset 8 28/0x1c */ |
#if __BYTE_ORDER == __LITTLE_ENDIAN |
uint16_t res1:4, doff:4, fin:1, syn:1, rst:1, psh:1, ack:1, urg:1, ece:1, cwr:1; |
#else |
uint16_t doff:4, res1:4, cwr:1, ece:1, urg:1, ack:1, psh:1, rst:1, syn:1, fin:1; |
#endif |
/* offset 12/0xc 32/0x20 */ |
uint16_t window; /* offset 14/0xe 34/0x22 */ |
uint16_t check; /* offset 16/0x10 36/0x24 */ |
uint16_t urg_ptr; /* offset 18/0x12 38/0x26 */ |
}; |
enum { |
TCP_ESTABLISHED = 1, |
TCP_SYN_SENT, |
TCP_SYN_RECV, |
TCP_FIN_WAIT1, |
TCP_FIN_WAIT2, |
TCP_TIME_WAIT, |
TCP_CLOSE, |
TCP_CLOSE_WAIT, |
TCP_LAST_ACK, |
TCP_LISTEN, |
TCP_CLOSING, /* now a valid state */ |
TCP_MAX_STATES /* Leave at the end! */ |
}; |
#define TCP_STATE_MASK 0xF |
#define TCP_ACTION_FIN (1 << 7) |
enum { |
TCPF_ESTABLISHED = (1 << 1), |
TCPF_SYN_SENT = (1 << 2), |
TCPF_SYN_RECV = (1 << 3), |
TCPF_FIN_WAIT1 = (1 << 4), |
TCPF_FIN_WAIT2 = (1 << 5), |
TCPF_TIME_WAIT = (1 << 6), |
TCPF_CLOSE = (1 << 7), |
TCPF_CLOSE_WAIT = (1 << 8), |
TCPF_LAST_ACK = (1 << 9), |
TCPF_LISTEN = (1 << 10), |
TCPF_CLOSING = (1 << 11) |
}; |
/* |
* The union cast uses a gcc extension to avoid aliasing problems |
* (union is compatible to any of its members) |
* This means this part of the code is -fstrict-aliasing safe now. |
*/ |
union tcp_word_hdr { |
struct tcphdr hdr; |
uint32_t words[5]; |
}; |
#define tcp_flag_word(tp) ( ((union tcp_word_hdr *)(tp))->words [3]) |
enum { |
#if __BYTE_ORDER == __LITTLE_ENDIAN |
TCP_FLAG_CWR = 0x00008000, |
TCP_FLAG_ECE = 0x00004000, |
TCP_FLAG_URG = 0x00002000, |
TCP_FLAG_ACK = 0x00001000, |
TCP_FLAG_PSH = 0x00000800, |
TCP_FLAG_RST = 0x00000400, |
TCP_FLAG_SYN = 0x00000200, |
TCP_FLAG_FIN = 0x00000100, |
TCP_RESERVED_BITS = 0x0000C00F, |
TCP_DATA_OFFSET = 0x000000F0 |
#else |
TCP_FLAG_CWR = 0x00800000, |
TCP_FLAG_ECE = 0x00400000, |
TCP_FLAG_URG = 0x00200000, |
TCP_FLAG_ACK = 0x00100000, |
TCP_FLAG_PSH = 0x00080000, |
TCP_FLAG_RST = 0x00040000, |
TCP_FLAG_SYN = 0x00020000, |
TCP_FLAG_FIN = 0x00010000, |
TCP_RESERVED_BITS = 0x0FC00000, |
TCP_DATA_OFFSET = 0xF0000000 |
#endif |
}; |
/* TCP socket options */ |
#define TCP_NODELAY 1 /* Turn off Nagle's algorithm. */ |
#define TCP_MAXSEG 2 /* Limit MSS */ |
#define TCP_CORK 3 /* Never send partially complete segments */ |
#define TCP_KEEPIDLE 4 /* Start keeplives after this period */ |
#define TCP_KEEPINTVL 5 /* Interval between keepalives */ |
#define TCP_KEEPCNT 6 /* Number of keepalives before death */ |
#define TCP_SYNCNT 7 /* Number of SYN retransmits */ |
#define TCP_LINGER2 8 /* Life time of orphaned FIN-WAIT-2 state */ |
#define TCP_DEFER_ACCEPT 9 /* Wake up listener only when data arrive */ |
#define TCP_WINDOW_CLAMP 10 /* Bound advertised window */ |
#define TCP_INFO 11 /* Information about this connection. */ |
#define TCP_QUICKACK 12 /* Block/reenable quick acks */ |
#define TCPI_OPT_TIMESTAMPS 1 |
#define TCPI_OPT_SACK 2 |
#define TCPI_OPT_WSCALE 4 |
#define TCPI_OPT_ECN 8 |
enum tcp_ca_state { |
TCP_CA_Open = 0, |
#define TCPF_CA_Open (1<<TCP_CA_Open) |
TCP_CA_Disorder = 1, |
#define TCPF_CA_Disorder (1<<TCP_CA_Disorder) |
TCP_CA_CWR = 2, |
#define TCPF_CA_CWR (1<<TCP_CA_CWR) |
TCP_CA_Recovery = 3, |
#define TCPF_CA_Recovery (1<<TCP_CA_Recovery) |
TCP_CA_Loss = 4 |
#define TCPF_CA_Loss (1<<TCP_CA_Loss) |
}; |
struct tcp_info { |
uint8_t tcpi_state; |
uint8_t tcpi_ca_state; |
uint8_t tcpi_retransmits; |
uint8_t tcpi_probes; |
uint8_t tcpi_backoff; |
uint8_t tcpi_options; |
uint8_t tcpi_snd_wscale : 4, tcpi_rcv_wscale : 4; |
uint32_t tcpi_rto; |
uint32_t tcpi_ato; |
uint32_t tcpi_snd_mss; |
uint32_t tcpi_rcv_mss; |
uint32_t tcpi_unacked; |
uint32_t tcpi_sacked; |
uint32_t tcpi_lost; |
uint32_t tcpi_retrans; |
uint32_t tcpi_fackets; |
/* Times. */ |
uint32_t tcpi_last_data_sent; |
uint32_t tcpi_last_ack_sent; /* Not remembered, sorry. */ |
uint32_t tcpi_last_data_recv; |
uint32_t tcpi_last_ack_recv; |
/* Metrics. */ |
uint32_t tcpi_pmtu; |
uint32_t tcpi_rcv_ssthresh; |
uint32_t tcpi_rtt; |
uint32_t tcpi_rttvar; |
uint32_t tcpi_snd_ssthresh; |
uint32_t tcpi_snd_cwnd; |
uint32_t tcpi_advmss; |
uint32_t tcpi_reordering; |
}; |
__END_DECLS |
#endif |
/contrib/media/updf/include/netinet/udp.h |
---|
0,0 → 1,20 |
#ifndef _NETINET_UDP_H |
#define _NETINET_UDP_H |
#include <sys/cdefs.h> |
#include <sys/types.h> |
__BEGIN_DECLS |
struct udphdr { /* size 8 28/0x1c with IP header */ |
uint16_t source; /* offset 0 20/0x14 */ |
uint16_t dest; /* offset 2 22/0x16 */ |
uint16_t len; /* offset 4 24/0x18 */ |
uint16_t check; /* offset 6 26/0x1a */ |
}; |
#define SOL_UDP 17 /* sockopt level for UDP */ |
__END_DECLS |
#endif |
/contrib/media/updf/include/netpacket/packet.h |
---|
0,0 → 1,47 |
#ifndef __NETPACKET_PACKET_H |
#define __NETPACKET_PACKET_H |
#include <sys/cdefs.h> |
__BEGIN_DECLS |
struct sockaddr_ll { |
unsigned short int sll_family; |
unsigned short int sll_protocol; |
int sll_ifindex; |
unsigned short int sll_hatype; |
unsigned char sll_pkttype; |
unsigned char sll_halen; |
unsigned char sll_addr[8]; |
}; |
#define PACKET_HOST 0 /* To us. */ |
#define PACKET_BROADCAST 1 /* To all. */ |
#define PACKET_MULTICAST 2 /* To group. */ |
#define PACKET_OTHERHOST 3 /* To someone else. */ |
#define PACKET_OUTGOING 4 /* Originated by us. */ |
#define PACKET_LOOPBACK 5 |
#define PACKET_FASTROUTE 6 |
/* Packet socket options. */ |
#define PACKET_ADD_MEMBERSHIP 1 |
#define PACKET_DROP_MEMBERSHIP 2 |
#define PACKET_RECV_OUTPUT 3 |
#define PACKET_RX_RING 5 |
#define PACKET_STATISTICS 6 |
struct packet_mreq { |
int mr_ifindex; |
unsigned short int mr_type; |
unsigned short int mr_alen; |
unsigned char mr_address[8]; |
}; |
#define PACKET_MR_MULTICAST 0 |
#define PACKET_MR_PROMISC 1 |
#define PACKET_MR_ALLMULTI 2 |
__END_DECLS |
#endif |
/contrib/media/updf/include/sigc++/adaptor.h |
---|
0,0 → 1,43 |
// -*- c++ -*- |
/* |
* Copyright 1999 Karl Nelson <kenelson@ece.ucdavis.edu> |
* |
* This library is free software; you can redistribute it and/or |
* modify it under the terms of the GNU Library General Public |
* License as published by the Free Software Foundation; either |
* version 2 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 the GNU |
* Library General Public License for more details. |
* |
* You should have received a copy of the GNU Library General Public |
* License along with this library; if not, write to the Free |
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
*/ |
#ifndef _SIGC_ADAPTOR_H_ |
#define _SIGC_ADAPTOR_H_ |
#include <sigc++/slot.h> |
#ifdef SIGC_CXX_NAMESPACES |
namespace SigC |
{ |
#endif |
struct LIBSIGC_API AdaptorNode : public SlotNode |
{ |
Callback_ data_; |
}; |
struct LIBSIGC_API AdaptorSlot_ |
{ |
static void copy_callback(SlotData* sdata,AdaptorNode* node); |
}; |
#ifdef SIGC_CXX_NAMESPACES |
} // namespace |
#endif |
#endif |
/contrib/media/updf/include/sigc++/basic_signal.h |
---|
0,0 → 1,1185 |
// -*- c++ -*- |
/* This is a generated file, do not edit. Generated from ../sigc++/macros/basic_signal.h.m4 */ |
#ifndef SIGCXX_BASIC_SIGNAL_H |
#define SIGCXX_BASIC_SIGNAL_H |
#include <sigc++/marshal.h> |
#include <sigc++/slot.h> |
// Qt steals a method name. |
#ifdef SIGC_QT |
#undef emit |
#endif |
#ifdef emit |
#define SIGC_QT |
#undef emit |
#endif |
#ifdef SIGC_CXX_NAMESPACES |
namespace SigC |
{ |
#endif |
/**************************************************************** |
***** Signals (build by macros) |
****************************************************************/ |
// common part to all signals |
class LIBSIGC_API Signal_ |
{ |
private: |
Signal_(const Signal_&); |
protected: |
typedef ScopeList List; |
struct LIBSIGC_API Impl |
{ |
typedef ScopeList List; |
List incoming_; |
List outgoing_; |
Impl(); |
~Impl(); |
}; |
Impl *impl; |
SlotData* in_connect(); |
SlotData* out_connect(SlotData *s); |
Signal_(); |
~Signal_(); |
public: |
bool empty() const; |
void clear(); |
}; |
/**************************************************************** |
***** Signal 0 |
****************************************************************/ |
template <class R,typename Marsh=class Marshal<R> > |
class Signal0:public Signal_ |
{ |
public: |
typedef Slot0<R> InSlotType; |
typedef Slot0<typename Marsh::OutType> OutSlotType; |
private: |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef typename Marsh::OutType SType; |
typedef R RType; |
#else |
typedef Trait<typename Marsh::OutType>::type SType; |
typedef Trait<R>::type RType; |
#endif |
typedef typename InSlotType::Callback Callback; |
typedef Signal0<R,Marsh> Self; |
typedef CallDataObj2<typename OutSlotType::Func,Self> CallData; |
static SType callback(void* d) |
{ |
CallData* data=(CallData*)d; |
return data->obj->emit(); |
} |
public: |
OutSlotType slot() |
{ |
SlotData* tmp=in_connect(); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=(typename OutSlotType::Func)callback; |
data.obj=this; |
return tmp; |
} |
Connection connect(const InSlotType &s) |
{ |
return out_connect(s.data()); |
} |
SType emit(); |
SType operator()() |
{return emit();} |
Signal0() {} |
Signal0(const InSlotType &s) {connect(s);} |
~Signal0() {} |
}; |
// emit |
template <class R,class Marsh> |
typename Signal0<R,Marsh>::SType Signal0<R,Marsh>:: |
emit() |
{ |
if (!impl||impl->outgoing_.empty()) return Marsh::default_value(); |
List &out=impl->outgoing_; |
Marsh rc; |
SlotData *data; |
List::Iterator i=out.begin(); |
while (i!=out.end()) |
{ |
data=((SlotDependent*)(i.node()))->parent(); |
++i; |
Callback& s=(Callback&)(data->callback()); |
if (rc.marshal(s.call())) return rc.value(); |
} |
return rc.value(); |
} |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template <class Marsh> |
class Signal0<void,Marsh> |
:public Signal_ |
{ |
public: |
typedef Slot0<void> InSlotType; |
typedef Slot0<void> OutSlotType; |
private: |
typedef InSlotType::Callback Callback; |
typedef Signal0<void,Marsh> Self; |
typedef CallDataObj2<OutSlotType::Func,Self> CallData; |
static void callback(void* d) |
{ |
CallData* data=(CallData*)d; |
data->obj->emit(); |
} |
public: |
OutSlotType slot() |
{ |
SlotData* tmp=in_connect(); |
CallData& data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=callback; |
data.obj=this; |
return tmp; |
} |
Connection connect(const InSlotType &s) |
{ |
return out_connect(s.data()); |
} |
void emit(); |
void operator()() |
{emit();} |
Signal0() {} |
Signal0(const InSlotType &s) {connect(s);} |
~Signal0() {} |
}; |
// emit |
template <class Marsh> |
void Signal0<void,Marsh>:: |
emit() |
{ |
if (!impl||impl->outgoing_.empty()) return; |
List &out=impl->outgoing_; |
SlotData *data; |
List::Iterator i=out.begin(); |
while (i!=out.end()) |
{ |
data=((SlotDependent*)(i.node()))->parent(); |
++i; |
Callback& s=(Callback&)(data->callback()); |
s.call(); |
} |
} |
#endif |
/**************************************************************** |
***** Signal 1 |
****************************************************************/ |
template <class R,class P1,typename Marsh=class Marshal<R> > |
class Signal1:public Signal_ |
{ |
public: |
typedef Slot1<R,P1> InSlotType; |
typedef Slot1<typename Marsh::OutType,P1> OutSlotType; |
private: |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef typename Marsh::OutType SType; |
typedef R RType; |
#else |
typedef Trait<typename Marsh::OutType>::type SType; |
typedef Trait<R>::type RType; |
#endif |
typedef typename InSlotType::Callback Callback; |
typedef Signal1<R,P1,Marsh> Self; |
typedef CallDataObj2<typename OutSlotType::Func,Self> CallData; |
static SType callback(void* d,P1 p1) |
{ |
CallData* data=(CallData*)d; |
return data->obj->emit(p1); |
} |
public: |
OutSlotType slot() |
{ |
SlotData* tmp=in_connect(); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=(typename OutSlotType::Func)callback; |
data.obj=this; |
return tmp; |
} |
Connection connect(const InSlotType &s) |
{ |
return out_connect(s.data()); |
} |
SType emit(typename Trait<P1>::ref p1); |
SType operator()(typename Trait<P1>::ref p1) |
{return emit(p1);} |
Signal1() {} |
Signal1(const InSlotType &s) {connect(s);} |
~Signal1() {} |
}; |
// emit |
template <class R,class P1,class Marsh> |
typename Signal1<R,P1,Marsh>::SType Signal1<R,P1,Marsh>:: |
emit(typename Trait<P1>::ref p1) |
{ |
if (!impl||impl->outgoing_.empty()) return Marsh::default_value(); |
List &out=impl->outgoing_; |
Marsh rc; |
SlotData *data; |
List::Iterator i=out.begin(); |
while (i!=out.end()) |
{ |
data=((SlotDependent*)(i.node()))->parent(); |
++i; |
Callback& s=(Callback&)(data->callback()); |
if (rc.marshal(s.call(p1))) return rc.value(); |
} |
return rc.value(); |
} |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template <class P1,class Marsh> |
class Signal1<void,P1,Marsh> |
:public Signal_ |
{ |
public: |
typedef Slot1<void,P1> InSlotType; |
typedef Slot1<void,P1> OutSlotType; |
private: |
typedef typename InSlotType::Callback Callback; |
typedef Signal1<void,P1,Marsh> Self; |
typedef CallDataObj2<typename OutSlotType::Func,Self> CallData; |
static void callback(void* d,P1 p1) |
{ |
CallData* data=(CallData*)d; |
data->obj->emit(p1); |
} |
public: |
OutSlotType slot() |
{ |
SlotData* tmp=in_connect(); |
CallData& data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=callback; |
data.obj=this; |
return tmp; |
} |
Connection connect(const InSlotType &s) |
{ |
return out_connect(s.data()); |
} |
void emit(typename Trait<P1>::ref p1); |
void operator()(typename Trait<P1>::ref p1) |
{emit(p1);} |
Signal1() {} |
Signal1(const InSlotType &s) {connect(s);} |
~Signal1() {} |
}; |
// emit |
template <class P1,class Marsh> |
void Signal1<void,P1,Marsh>:: |
emit(typename Trait<P1>::ref p1) |
{ |
if (!impl||impl->outgoing_.empty()) return; |
List &out=impl->outgoing_; |
SlotData *data; |
List::Iterator i=out.begin(); |
while (i!=out.end()) |
{ |
data=((SlotDependent*)(i.node()))->parent(); |
++i; |
Callback& s=(Callback&)(data->callback()); |
s.call(p1); |
} |
} |
#endif |
/**************************************************************** |
***** Signal 2 |
****************************************************************/ |
template <class R,class P1,class P2,typename Marsh=class Marshal<R> > |
class Signal2:public Signal_ |
{ |
public: |
typedef Slot2<R,P1,P2> InSlotType; |
typedef Slot2<typename Marsh::OutType,P1,P2> OutSlotType; |
private: |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef typename Marsh::OutType SType; |
typedef R RType; |
#else |
typedef Trait<typename Marsh::OutType>::type SType; |
typedef Trait<R>::type RType; |
#endif |
typedef typename InSlotType::Callback Callback; |
typedef Signal2<R,P1,P2,Marsh> Self; |
typedef CallDataObj2<typename OutSlotType::Func,Self> CallData; |
static SType callback(void* d,P1 p1,P2 p2) |
{ |
CallData* data=(CallData*)d; |
return data->obj->emit(p1,p2); |
} |
public: |
OutSlotType slot() |
{ |
SlotData* tmp=in_connect(); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=(typename OutSlotType::Func)callback; |
data.obj=this; |
return tmp; |
} |
Connection connect(const InSlotType &s) |
{ |
return out_connect(s.data()); |
} |
SType emit(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2); |
SType operator()(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2) |
{return emit(p1,p2);} |
Signal2() {} |
Signal2(const InSlotType &s) {connect(s);} |
~Signal2() {} |
}; |
// emit |
template <class R,class P1,class P2,class Marsh> |
typename Signal2<R,P1,P2,Marsh>::SType Signal2<R,P1,P2,Marsh>:: |
emit(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2) |
{ |
if (!impl||impl->outgoing_.empty()) return Marsh::default_value(); |
List &out=impl->outgoing_; |
Marsh rc; |
SlotData *data; |
List::Iterator i=out.begin(); |
while (i!=out.end()) |
{ |
data=((SlotDependent*)(i.node()))->parent(); |
++i; |
Callback& s=(Callback&)(data->callback()); |
if (rc.marshal(s.call(p1,p2))) return rc.value(); |
} |
return rc.value(); |
} |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template <class P1,class P2,class Marsh> |
class Signal2<void,P1,P2,Marsh> |
:public Signal_ |
{ |
public: |
typedef Slot2<void,P1,P2> InSlotType; |
typedef Slot2<void,P1,P2> OutSlotType; |
private: |
typedef typename InSlotType::Callback Callback; |
typedef Signal2<void,P1,P2,Marsh> Self; |
typedef CallDataObj2<typename OutSlotType::Func,Self> CallData; |
static void callback(void* d,P1 p1,P2 p2) |
{ |
CallData* data=(CallData*)d; |
data->obj->emit(p1,p2); |
} |
public: |
OutSlotType slot() |
{ |
SlotData* tmp=in_connect(); |
CallData& data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=callback; |
data.obj=this; |
return tmp; |
} |
Connection connect(const InSlotType &s) |
{ |
return out_connect(s.data()); |
} |
void emit(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2); |
void operator()(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2) |
{emit(p1,p2);} |
Signal2() {} |
Signal2(const InSlotType &s) {connect(s);} |
~Signal2() {} |
}; |
// emit |
template <class P1,class P2,class Marsh> |
void Signal2<void,P1,P2,Marsh>:: |
emit(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2) |
{ |
if (!impl||impl->outgoing_.empty()) return; |
List &out=impl->outgoing_; |
SlotData *data; |
List::Iterator i=out.begin(); |
while (i!=out.end()) |
{ |
data=((SlotDependent*)(i.node()))->parent(); |
++i; |
Callback& s=(Callback&)(data->callback()); |
s.call(p1,p2); |
} |
} |
#endif |
/**************************************************************** |
***** Signal 3 |
****************************************************************/ |
template <class R,class P1,class P2,class P3,typename Marsh=class Marshal<R> > |
class Signal3:public Signal_ |
{ |
public: |
typedef Slot3<R,P1,P2,P3> InSlotType; |
typedef Slot3<typename Marsh::OutType,P1,P2,P3> OutSlotType; |
private: |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef typename Marsh::OutType SType; |
typedef R RType; |
#else |
typedef Trait<typename Marsh::OutType>::type SType; |
typedef Trait<R>::type RType; |
#endif |
typedef typename InSlotType::Callback Callback; |
typedef Signal3<R,P1,P2,P3,Marsh> Self; |
typedef CallDataObj2<typename OutSlotType::Func,Self> CallData; |
static SType callback(void* d,P1 p1,P2 p2,P3 p3) |
{ |
CallData* data=(CallData*)d; |
return data->obj->emit(p1,p2,p3); |
} |
public: |
OutSlotType slot() |
{ |
SlotData* tmp=in_connect(); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=(typename OutSlotType::Func)callback; |
data.obj=this; |
return tmp; |
} |
Connection connect(const InSlotType &s) |
{ |
return out_connect(s.data()); |
} |
SType emit(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3); |
SType operator()(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3) |
{return emit(p1,p2,p3);} |
Signal3() {} |
Signal3(const InSlotType &s) {connect(s);} |
~Signal3() {} |
}; |
// emit |
template <class R,class P1,class P2,class P3,class Marsh> |
typename Signal3<R,P1,P2,P3,Marsh>::SType Signal3<R,P1,P2,P3,Marsh>:: |
emit(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3) |
{ |
if (!impl||impl->outgoing_.empty()) return Marsh::default_value(); |
List &out=impl->outgoing_; |
Marsh rc; |
SlotData *data; |
List::Iterator i=out.begin(); |
while (i!=out.end()) |
{ |
data=((SlotDependent*)(i.node()))->parent(); |
++i; |
Callback& s=(Callback&)(data->callback()); |
if (rc.marshal(s.call(p1,p2,p3))) return rc.value(); |
} |
return rc.value(); |
} |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template <class P1,class P2,class P3,class Marsh> |
class Signal3<void,P1,P2,P3,Marsh> |
:public Signal_ |
{ |
public: |
typedef Slot3<void,P1,P2,P3> InSlotType; |
typedef Slot3<void,P1,P2,P3> OutSlotType; |
private: |
typedef typename InSlotType::Callback Callback; |
typedef Signal3<void,P1,P2,P3,Marsh> Self; |
typedef CallDataObj2<typename OutSlotType::Func,Self> CallData; |
static void callback(void* d,P1 p1,P2 p2,P3 p3) |
{ |
CallData* data=(CallData*)d; |
data->obj->emit(p1,p2,p3); |
} |
public: |
OutSlotType slot() |
{ |
SlotData* tmp=in_connect(); |
CallData& data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=callback; |
data.obj=this; |
return tmp; |
} |
Connection connect(const InSlotType &s) |
{ |
return out_connect(s.data()); |
} |
void emit(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3); |
void operator()(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3) |
{emit(p1,p2,p3);} |
Signal3() {} |
Signal3(const InSlotType &s) {connect(s);} |
~Signal3() {} |
}; |
// emit |
template <class P1,class P2,class P3,class Marsh> |
void Signal3<void,P1,P2,P3,Marsh>:: |
emit(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3) |
{ |
if (!impl||impl->outgoing_.empty()) return; |
List &out=impl->outgoing_; |
SlotData *data; |
List::Iterator i=out.begin(); |
while (i!=out.end()) |
{ |
data=((SlotDependent*)(i.node()))->parent(); |
++i; |
Callback& s=(Callback&)(data->callback()); |
s.call(p1,p2,p3); |
} |
} |
#endif |
/**************************************************************** |
***** Signal 4 |
****************************************************************/ |
template <class R,class P1,class P2,class P3,class P4,typename Marsh=class Marshal<R> > |
class Signal4:public Signal_ |
{ |
public: |
typedef Slot4<R,P1,P2,P3,P4> InSlotType; |
typedef Slot4<typename Marsh::OutType,P1,P2,P3,P4> OutSlotType; |
private: |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef typename Marsh::OutType SType; |
typedef R RType; |
#else |
typedef Trait<typename Marsh::OutType>::type SType; |
typedef Trait<R>::type RType; |
#endif |
typedef typename InSlotType::Callback Callback; |
typedef Signal4<R,P1,P2,P3,P4,Marsh> Self; |
typedef CallDataObj2<typename OutSlotType::Func,Self> CallData; |
static SType callback(void* d,P1 p1,P2 p2,P3 p3,P4 p4) |
{ |
CallData* data=(CallData*)d; |
return data->obj->emit(p1,p2,p3,p4); |
} |
public: |
OutSlotType slot() |
{ |
SlotData* tmp=in_connect(); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=(typename OutSlotType::Func)callback; |
data.obj=this; |
return tmp; |
} |
Connection connect(const InSlotType &s) |
{ |
return out_connect(s.data()); |
} |
SType emit(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3,typename Trait<P4>::ref p4); |
SType operator()(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3,typename Trait<P4>::ref p4) |
{return emit(p1,p2,p3,p4);} |
Signal4() {} |
Signal4(const InSlotType &s) {connect(s);} |
~Signal4() {} |
}; |
// emit |
template <class R,class P1,class P2,class P3,class P4,class Marsh> |
typename Signal4<R,P1,P2,P3,P4,Marsh>::SType Signal4<R,P1,P2,P3,P4,Marsh>:: |
emit(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3,typename Trait<P4>::ref p4) |
{ |
if (!impl||impl->outgoing_.empty()) return Marsh::default_value(); |
List &out=impl->outgoing_; |
Marsh rc; |
SlotData *data; |
List::Iterator i=out.begin(); |
while (i!=out.end()) |
{ |
data=((SlotDependent*)(i.node()))->parent(); |
++i; |
Callback& s=(Callback&)(data->callback()); |
if (rc.marshal(s.call(p1,p2,p3,p4))) return rc.value(); |
} |
return rc.value(); |
} |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template <class P1,class P2,class P3,class P4,class Marsh> |
class Signal4<void,P1,P2,P3,P4,Marsh> |
:public Signal_ |
{ |
public: |
typedef Slot4<void,P1,P2,P3,P4> InSlotType; |
typedef Slot4<void,P1,P2,P3,P4> OutSlotType; |
private: |
typedef typename InSlotType::Callback Callback; |
typedef Signal4<void,P1,P2,P3,P4,Marsh> Self; |
typedef CallDataObj2<typename OutSlotType::Func,Self> CallData; |
static void callback(void* d,P1 p1,P2 p2,P3 p3,P4 p4) |
{ |
CallData* data=(CallData*)d; |
data->obj->emit(p1,p2,p3,p4); |
} |
public: |
OutSlotType slot() |
{ |
SlotData* tmp=in_connect(); |
CallData& data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=callback; |
data.obj=this; |
return tmp; |
} |
Connection connect(const InSlotType &s) |
{ |
return out_connect(s.data()); |
} |
void emit(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3,typename Trait<P4>::ref p4); |
void operator()(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3,typename Trait<P4>::ref p4) |
{emit(p1,p2,p3,p4);} |
Signal4() {} |
Signal4(const InSlotType &s) {connect(s);} |
~Signal4() {} |
}; |
// emit |
template <class P1,class P2,class P3,class P4,class Marsh> |
void Signal4<void,P1,P2,P3,P4,Marsh>:: |
emit(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3,typename Trait<P4>::ref p4) |
{ |
if (!impl||impl->outgoing_.empty()) return; |
List &out=impl->outgoing_; |
SlotData *data; |
List::Iterator i=out.begin(); |
while (i!=out.end()) |
{ |
data=((SlotDependent*)(i.node()))->parent(); |
++i; |
Callback& s=(Callback&)(data->callback()); |
s.call(p1,p2,p3,p4); |
} |
} |
#endif |
/**************************************************************** |
***** Signal 5 |
****************************************************************/ |
template <class R,class P1,class P2,class P3,class P4,class P5,typename Marsh=class Marshal<R> > |
class Signal5:public Signal_ |
{ |
public: |
typedef Slot5<R,P1,P2,P3,P4,P5> InSlotType; |
typedef Slot5<typename Marsh::OutType,P1,P2,P3,P4,P5> OutSlotType; |
private: |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef typename Marsh::OutType SType; |
typedef R RType; |
#else |
typedef Trait<typename Marsh::OutType>::type SType; |
typedef Trait<R>::type RType; |
#endif |
typedef typename InSlotType::Callback Callback; |
typedef Signal5<R,P1,P2,P3,P4,P5,Marsh> Self; |
typedef CallDataObj2<typename OutSlotType::Func,Self> CallData; |
static SType callback(void* d,P1 p1,P2 p2,P3 p3,P4 p4,P5 p5) |
{ |
CallData* data=(CallData*)d; |
return data->obj->emit(p1,p2,p3,p4,p5); |
} |
public: |
OutSlotType slot() |
{ |
SlotData* tmp=in_connect(); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=(typename OutSlotType::Func)callback; |
data.obj=this; |
return tmp; |
} |
Connection connect(const InSlotType &s) |
{ |
return out_connect(s.data()); |
} |
SType emit(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3,typename Trait<P4>::ref p4,typename Trait<P5>::ref p5); |
SType operator()(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3,typename Trait<P4>::ref p4,typename Trait<P5>::ref p5) |
{return emit(p1,p2,p3,p4,p5);} |
Signal5() {} |
Signal5(const InSlotType &s) {connect(s);} |
~Signal5() {} |
}; |
// emit |
template <class R,class P1,class P2,class P3,class P4,class P5,class Marsh> |
typename Signal5<R,P1,P2,P3,P4,P5,Marsh>::SType Signal5<R,P1,P2,P3,P4,P5,Marsh>:: |
emit(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3,typename Trait<P4>::ref p4,typename Trait<P5>::ref p5) |
{ |
if (!impl||impl->outgoing_.empty()) return Marsh::default_value(); |
List &out=impl->outgoing_; |
Marsh rc; |
SlotData *data; |
List::Iterator i=out.begin(); |
while (i!=out.end()) |
{ |
data=((SlotDependent*)(i.node()))->parent(); |
++i; |
Callback& s=(Callback&)(data->callback()); |
if (rc.marshal(s.call(p1,p2,p3,p4,p5))) return rc.value(); |
} |
return rc.value(); |
} |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template <class P1,class P2,class P3,class P4,class P5,class Marsh> |
class Signal5<void,P1,P2,P3,P4,P5,Marsh> |
:public Signal_ |
{ |
public: |
typedef Slot5<void,P1,P2,P3,P4,P5> InSlotType; |
typedef Slot5<void,P1,P2,P3,P4,P5> OutSlotType; |
private: |
typedef typename InSlotType::Callback Callback; |
typedef Signal5<void,P1,P2,P3,P4,P5,Marsh> Self; |
typedef CallDataObj2<typename OutSlotType::Func,Self> CallData; |
static void callback(void* d,P1 p1,P2 p2,P3 p3,P4 p4,P5 p5) |
{ |
CallData* data=(CallData*)d; |
data->obj->emit(p1,p2,p3,p4,p5); |
} |
public: |
OutSlotType slot() |
{ |
SlotData* tmp=in_connect(); |
CallData& data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=callback; |
data.obj=this; |
return tmp; |
} |
Connection connect(const InSlotType &s) |
{ |
return out_connect(s.data()); |
} |
void emit(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3,typename Trait<P4>::ref p4,typename Trait<P5>::ref p5); |
void operator()(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3,typename Trait<P4>::ref p4,typename Trait<P5>::ref p5) |
{emit(p1,p2,p3,p4,p5);} |
Signal5() {} |
Signal5(const InSlotType &s) {connect(s);} |
~Signal5() {} |
}; |
// emit |
template <class P1,class P2,class P3,class P4,class P5,class Marsh> |
void Signal5<void,P1,P2,P3,P4,P5,Marsh>:: |
emit(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3,typename Trait<P4>::ref p4,typename Trait<P5>::ref p5) |
{ |
if (!impl||impl->outgoing_.empty()) return; |
List &out=impl->outgoing_; |
SlotData *data; |
List::Iterator i=out.begin(); |
while (i!=out.end()) |
{ |
data=((SlotDependent*)(i.node()))->parent(); |
++i; |
Callback& s=(Callback&)(data->callback()); |
s.call(p1,p2,p3,p4,p5); |
} |
} |
#endif |
/**************************************************************** |
***** Signal 6 |
****************************************************************/ |
template <class R,class P1,class P2,class P3,class P4,class P5,class P6,typename Marsh=class Marshal<R> > |
class Signal6:public Signal_ |
{ |
public: |
typedef Slot6<R,P1,P2,P3,P4,P5,P6> InSlotType; |
typedef Slot6<typename Marsh::OutType,P1,P2,P3,P4,P5,P6> OutSlotType; |
private: |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef typename Marsh::OutType SType; |
typedef R RType; |
#else |
typedef Trait<typename Marsh::OutType>::type SType; |
typedef Trait<R>::type RType; |
#endif |
typedef typename InSlotType::Callback Callback; |
typedef Signal6<R,P1,P2,P3,P4,P5,P6,Marsh> Self; |
typedef CallDataObj2<typename OutSlotType::Func,Self> CallData; |
static SType callback(void* d,P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6) |
{ |
CallData* data=(CallData*)d; |
return data->obj->emit(p1,p2,p3,p4,p5,p6); |
} |
public: |
OutSlotType slot() |
{ |
SlotData* tmp=in_connect(); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=(typename OutSlotType::Func)callback; |
data.obj=this; |
return tmp; |
} |
Connection connect(const InSlotType &s) |
{ |
return out_connect(s.data()); |
} |
SType emit(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3,typename Trait<P4>::ref p4,typename Trait<P5>::ref p5,typename Trait<P6>::ref p6); |
SType operator()(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3,typename Trait<P4>::ref p4,typename Trait<P5>::ref p5,typename Trait<P6>::ref p6) |
{return emit(p1,p2,p3,p4,p5,p6);} |
Signal6() {} |
Signal6(const InSlotType &s) {connect(s);} |
~Signal6() {} |
}; |
// emit |
template <class R,class P1,class P2,class P3,class P4,class P5,class P6,class Marsh> |
typename Signal6<R,P1,P2,P3,P4,P5,P6,Marsh>::SType Signal6<R,P1,P2,P3,P4,P5,P6,Marsh>:: |
emit(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3,typename Trait<P4>::ref p4,typename Trait<P5>::ref p5,typename Trait<P6>::ref p6) |
{ |
if (!impl||impl->outgoing_.empty()) return Marsh::default_value(); |
List &out=impl->outgoing_; |
Marsh rc; |
SlotData *data; |
List::Iterator i=out.begin(); |
while (i!=out.end()) |
{ |
data=((SlotDependent*)(i.node()))->parent(); |
++i; |
Callback& s=(Callback&)(data->callback()); |
if (rc.marshal(s.call(p1,p2,p3,p4,p5,p6))) return rc.value(); |
} |
return rc.value(); |
} |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template <class P1,class P2,class P3,class P4,class P5,class P6,class Marsh> |
class Signal6<void,P1,P2,P3,P4,P5,P6,Marsh> |
:public Signal_ |
{ |
public: |
typedef Slot6<void,P1,P2,P3,P4,P5,P6> InSlotType; |
typedef Slot6<void,P1,P2,P3,P4,P5,P6> OutSlotType; |
private: |
typedef typename InSlotType::Callback Callback; |
typedef Signal6<void,P1,P2,P3,P4,P5,P6,Marsh> Self; |
typedef CallDataObj2<typename OutSlotType::Func,Self> CallData; |
static void callback(void* d,P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6) |
{ |
CallData* data=(CallData*)d; |
data->obj->emit(p1,p2,p3,p4,p5,p6); |
} |
public: |
OutSlotType slot() |
{ |
SlotData* tmp=in_connect(); |
CallData& data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=callback; |
data.obj=this; |
return tmp; |
} |
Connection connect(const InSlotType &s) |
{ |
return out_connect(s.data()); |
} |
void emit(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3,typename Trait<P4>::ref p4,typename Trait<P5>::ref p5,typename Trait<P6>::ref p6); |
void operator()(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3,typename Trait<P4>::ref p4,typename Trait<P5>::ref p5,typename Trait<P6>::ref p6) |
{emit(p1,p2,p3,p4,p5,p6);} |
Signal6() {} |
Signal6(const InSlotType &s) {connect(s);} |
~Signal6() {} |
}; |
// emit |
template <class P1,class P2,class P3,class P4,class P5,class P6,class Marsh> |
void Signal6<void,P1,P2,P3,P4,P5,P6,Marsh>:: |
emit(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3,typename Trait<P4>::ref p4,typename Trait<P5>::ref p5,typename Trait<P6>::ref p6) |
{ |
if (!impl||impl->outgoing_.empty()) return; |
List &out=impl->outgoing_; |
SlotData *data; |
List::Iterator i=out.begin(); |
while (i!=out.end()) |
{ |
data=((SlotDependent*)(i.node()))->parent(); |
++i; |
Callback& s=(Callback&)(data->callback()); |
s.call(p1,p2,p3,p4,p5,p6); |
} |
} |
#endif |
/**************************************************************** |
***** Signal 7 |
****************************************************************/ |
template <class R,class P1,class P2,class P3,class P4,class P5,class P6,class P7,typename Marsh=class Marshal<R> > |
class Signal7:public Signal_ |
{ |
public: |
typedef Slot7<R,P1,P2,P3,P4,P5,P6,P7> InSlotType; |
typedef Slot7<typename Marsh::OutType,P1,P2,P3,P4,P5,P6,P7> OutSlotType; |
private: |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef typename Marsh::OutType SType; |
typedef R RType; |
#else |
typedef Trait<typename Marsh::OutType>::type SType; |
typedef Trait<R>::type RType; |
#endif |
typedef typename InSlotType::Callback Callback; |
typedef Signal7<R,P1,P2,P3,P4,P5,P6,P7,Marsh> Self; |
typedef CallDataObj2<typename OutSlotType::Func,Self> CallData; |
static SType callback(void* d,P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7) |
{ |
CallData* data=(CallData*)d; |
return data->obj->emit(p1,p2,p3,p4,p5,p6,p7); |
} |
public: |
OutSlotType slot() |
{ |
SlotData* tmp=in_connect(); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=(typename OutSlotType::Func)callback; |
data.obj=this; |
return tmp; |
} |
Connection connect(const InSlotType &s) |
{ |
return out_connect(s.data()); |
} |
SType emit(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3,typename Trait<P4>::ref p4,typename Trait<P5>::ref p5,typename Trait<P6>::ref p6,typename Trait<P7>::ref p7); |
SType operator()(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3,typename Trait<P4>::ref p4,typename Trait<P5>::ref p5,typename Trait<P6>::ref p6,typename Trait<P7>::ref p7) |
{return emit(p1,p2,p3,p4,p5,p6,p7);} |
Signal7() {} |
Signal7(const InSlotType &s) {connect(s);} |
~Signal7() {} |
}; |
// emit |
template <class R,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class Marsh> |
typename Signal7<R,P1,P2,P3,P4,P5,P6,P7,Marsh>::SType Signal7<R,P1,P2,P3,P4,P5,P6,P7,Marsh>:: |
emit(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3,typename Trait<P4>::ref p4,typename Trait<P5>::ref p5,typename Trait<P6>::ref p6,typename Trait<P7>::ref p7) |
{ |
if (!impl||impl->outgoing_.empty()) return Marsh::default_value(); |
List &out=impl->outgoing_; |
Marsh rc; |
SlotData *data; |
List::Iterator i=out.begin(); |
while (i!=out.end()) |
{ |
data=((SlotDependent*)(i.node()))->parent(); |
++i; |
Callback& s=(Callback&)(data->callback()); |
if (rc.marshal(s.call(p1,p2,p3,p4,p5,p6,p7))) return rc.value(); |
} |
return rc.value(); |
} |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template <class P1,class P2,class P3,class P4,class P5,class P6,class P7,class Marsh> |
class Signal7<void,P1,P2,P3,P4,P5,P6,P7,Marsh> |
:public Signal_ |
{ |
public: |
typedef Slot7<void,P1,P2,P3,P4,P5,P6,P7> InSlotType; |
typedef Slot7<void,P1,P2,P3,P4,P5,P6,P7> OutSlotType; |
private: |
typedef typename InSlotType::Callback Callback; |
typedef Signal7<void,P1,P2,P3,P4,P5,P6,P7,Marsh> Self; |
typedef CallDataObj2<typename OutSlotType::Func,Self> CallData; |
static void callback(void* d,P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7) |
{ |
CallData* data=(CallData*)d; |
data->obj->emit(p1,p2,p3,p4,p5,p6,p7); |
} |
public: |
OutSlotType slot() |
{ |
SlotData* tmp=in_connect(); |
CallData& data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=callback; |
data.obj=this; |
return tmp; |
} |
Connection connect(const InSlotType &s) |
{ |
return out_connect(s.data()); |
} |
void emit(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3,typename Trait<P4>::ref p4,typename Trait<P5>::ref p5,typename Trait<P6>::ref p6,typename Trait<P7>::ref p7); |
void operator()(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3,typename Trait<P4>::ref p4,typename Trait<P5>::ref p5,typename Trait<P6>::ref p6,typename Trait<P7>::ref p7) |
{emit(p1,p2,p3,p4,p5,p6,p7);} |
Signal7() {} |
Signal7(const InSlotType &s) {connect(s);} |
~Signal7() {} |
}; |
// emit |
template <class P1,class P2,class P3,class P4,class P5,class P6,class P7,class Marsh> |
void Signal7<void,P1,P2,P3,P4,P5,P6,P7,Marsh>:: |
emit(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3,typename Trait<P4>::ref p4,typename Trait<P5>::ref p5,typename Trait<P6>::ref p6,typename Trait<P7>::ref p7) |
{ |
if (!impl||impl->outgoing_.empty()) return; |
List &out=impl->outgoing_; |
SlotData *data; |
List::Iterator i=out.begin(); |
while (i!=out.end()) |
{ |
data=((SlotDependent*)(i.node()))->parent(); |
++i; |
Callback& s=(Callback&)(data->callback()); |
s.call(p1,p2,p3,p4,p5,p6,p7); |
} |
} |
#endif |
#ifdef SIGC_CXX_NAMESPACES |
} // namespace |
#endif |
#ifdef SIGC_QT |
#define emit |
#endif |
#endif // SIGCXX_BASIC_SIGNAL_H |
/contrib/media/updf/include/sigc++/bind.h |
---|
0,0 → 1,1429 |
// -*- c++ -*- |
/* This is a generated file, do not edit. Generated from ../sigc++/macros/bind.h.m4 */ |
#ifndef SIGCXX_BIND_H |
#define SIGCXX_BIND_H |
/* |
SigC::bind |
------------- |
bind() alters a Slot by fixing arguments to certain values. |
Argument fixing starts from the last argument. The slot is |
destroyed in the process and a new one is created, so references |
holding onto the slot will no longer be valid. |
Up to two arguments can be bound at a time with the default |
header. |
Simple Sample usage: |
void f(int,int); |
Slot2<void,int,int> s1=slot(f); |
Slot1<void,int> s2=bind(s1,1); // s1 is invalid |
s2(2); // call f with arguments 2,1 |
Multibinding usage: |
void f(int,int); |
Slot2<void,int,int> s1=slot(f); |
Slot0<void> s2=bind(s1,1,2); // s1 is invalid |
s2(); // call f with arguments 1,2 |
Type specified usage: |
struct A {}; |
struct B :public A {}; |
B* b; |
Slot0<void, A*> s1; |
Slot0<void> s2=bind(s1, b); // B* converted to A* |
*/ |
#include <sigc++/adaptor.h> |
#include <sigc++/scope.h> |
#ifdef SIGC_CXX_NAMESPACES |
namespace SigC |
{ |
#endif |
/**************************************************************** |
***** Adaptor Bind Slot 0 arguments, 1 hidden arguments |
****************************************************************/ |
template <class R, |
class C1> |
struct AdaptorBindSlot0_1: public AdaptorSlot_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef R RType; |
#else |
typedef typename Trait<R>::type RType; |
#endif |
typedef Slot0<R> SlotType; |
typedef Slot1<R,C1> InSlotType; |
struct Node:public AdaptorNode |
{ |
C1 c1_; |
Node(C1 c1) |
: c1_(c1) |
{ } |
}; |
typedef CallDataObj2<typename SlotType::Func,Node> CallData; |
static RType callback(void* d) |
{ |
CallData* data=(CallData*)d; |
Node* node=data->obj; |
return ((typename InSlotType::Callback&)(node->data_))( |
node->c1_); |
} |
static SlotData* create(SlotData *s,C1 c1) |
{ |
Node *node=new Node(c1); |
copy_callback(s,node); |
CallData &data=reinterpret_cast<CallData&>(s->data_); |
data.callback=&callback; |
data.obj=node; |
return s; |
} |
}; |
#ifndef SIGC_CXX_VOID_RETURN |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template < |
class C1> |
struct AdaptorBindSlot0_1 |
<void, |
C1> : public AdaptorSlot_ |
{ |
typedef void RType; |
typedef Slot0<void> SlotType; |
typedef Slot1<void,C1> InSlotType; |
struct Node:public AdaptorNode |
{ |
C1 c1_; |
Node(C1 c1) |
: c1_(c1) |
{ } |
}; |
typedef CallDataObj2<typename SlotType::Func,Node> CallData; |
static RType callback(void* d) |
{ |
CallData* data=(CallData*)d; |
Node* node=data->obj; |
((typename InSlotType::Callback&)(node->data_))( |
node->c1_); |
} |
static SlotData* create(SlotData *s,C1 c1) |
{ |
Node *node=new Node(c1); |
copy_callback(s,node); |
CallData &data=reinterpret_cast<CallData&>(s->data_); |
data.callback=&callback; |
data.obj=node; |
return s; |
} |
}; |
#endif |
#endif |
template <class A1, |
class R, |
class C1> |
inline |
Slot0<R> |
bind(const Slot1<R,C1> &s, |
A1 a1) |
{return AdaptorBindSlot0_1<R, |
C1>::create(s.data(),a1); |
} |
/**************************************************************** |
***** Adaptor Bind Slot 1 arguments, 1 hidden arguments |
****************************************************************/ |
template <class R, |
class P1, |
class C1> |
struct AdaptorBindSlot1_1: public AdaptorSlot_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef R RType; |
#else |
typedef typename Trait<R>::type RType; |
#endif |
typedef Slot1<R,P1> SlotType; |
typedef Slot2<R,P1,C1> InSlotType; |
struct Node:public AdaptorNode |
{ |
C1 c1_; |
Node(C1 c1) |
: c1_(c1) |
{ } |
}; |
typedef CallDataObj2<typename SlotType::Func,Node> CallData; |
static RType callback(void* d,P1 p1) |
{ |
CallData* data=(CallData*)d; |
Node* node=data->obj; |
return ((typename InSlotType::Callback&)(node->data_))(p1, |
node->c1_); |
} |
static SlotData* create(SlotData *s,C1 c1) |
{ |
Node *node=new Node(c1); |
copy_callback(s,node); |
CallData &data=reinterpret_cast<CallData&>(s->data_); |
data.callback=&callback; |
data.obj=node; |
return s; |
} |
}; |
#ifndef SIGC_CXX_VOID_RETURN |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template <class P1, |
class C1> |
struct AdaptorBindSlot1_1 |
<void,P1, |
C1> : public AdaptorSlot_ |
{ |
typedef void RType; |
typedef Slot1<void,P1> SlotType; |
typedef Slot2<void,P1,C1> InSlotType; |
struct Node:public AdaptorNode |
{ |
C1 c1_; |
Node(C1 c1) |
: c1_(c1) |
{ } |
}; |
typedef CallDataObj2<typename SlotType::Func,Node> CallData; |
static RType callback(void* d,P1 p1) |
{ |
CallData* data=(CallData*)d; |
Node* node=data->obj; |
((typename InSlotType::Callback&)(node->data_))(p1, |
node->c1_); |
} |
static SlotData* create(SlotData *s,C1 c1) |
{ |
Node *node=new Node(c1); |
copy_callback(s,node); |
CallData &data=reinterpret_cast<CallData&>(s->data_); |
data.callback=&callback; |
data.obj=node; |
return s; |
} |
}; |
#endif |
#endif |
template <class A1, |
class R, |
class P1, |
class C1> |
inline |
Slot1<R,P1> |
bind(const Slot2<R,P1,C1> &s, |
A1 a1) |
{return AdaptorBindSlot1_1<R, |
P1, |
C1>::create(s.data(),a1); |
} |
/**************************************************************** |
***** Adaptor Bind Slot 2 arguments, 1 hidden arguments |
****************************************************************/ |
template <class R, |
class P1,class P2, |
class C1> |
struct AdaptorBindSlot2_1: public AdaptorSlot_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef R RType; |
#else |
typedef typename Trait<R>::type RType; |
#endif |
typedef Slot2<R,P1,P2> SlotType; |
typedef Slot3<R,P1,P2,C1> InSlotType; |
struct Node:public AdaptorNode |
{ |
C1 c1_; |
Node(C1 c1) |
: c1_(c1) |
{ } |
}; |
typedef CallDataObj2<typename SlotType::Func,Node> CallData; |
static RType callback(void* d,P1 p1,P2 p2) |
{ |
CallData* data=(CallData*)d; |
Node* node=data->obj; |
return ((typename InSlotType::Callback&)(node->data_))(p1,p2, |
node->c1_); |
} |
static SlotData* create(SlotData *s,C1 c1) |
{ |
Node *node=new Node(c1); |
copy_callback(s,node); |
CallData &data=reinterpret_cast<CallData&>(s->data_); |
data.callback=&callback; |
data.obj=node; |
return s; |
} |
}; |
#ifndef SIGC_CXX_VOID_RETURN |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template <class P1,class P2, |
class C1> |
struct AdaptorBindSlot2_1 |
<void,P1,P2, |
C1> : public AdaptorSlot_ |
{ |
typedef void RType; |
typedef Slot2<void,P1,P2> SlotType; |
typedef Slot3<void,P1,P2,C1> InSlotType; |
struct Node:public AdaptorNode |
{ |
C1 c1_; |
Node(C1 c1) |
: c1_(c1) |
{ } |
}; |
typedef CallDataObj2<typename SlotType::Func,Node> CallData; |
static RType callback(void* d,P1 p1,P2 p2) |
{ |
CallData* data=(CallData*)d; |
Node* node=data->obj; |
((typename InSlotType::Callback&)(node->data_))(p1,p2, |
node->c1_); |
} |
static SlotData* create(SlotData *s,C1 c1) |
{ |
Node *node=new Node(c1); |
copy_callback(s,node); |
CallData &data=reinterpret_cast<CallData&>(s->data_); |
data.callback=&callback; |
data.obj=node; |
return s; |
} |
}; |
#endif |
#endif |
template <class A1, |
class R, |
class P1,class P2, |
class C1> |
inline |
Slot2<R,P1,P2> |
bind(const Slot3<R,P1,P2,C1> &s, |
A1 a1) |
{return AdaptorBindSlot2_1<R, |
P1,P2, |
C1>::create(s.data(),a1); |
} |
/**************************************************************** |
***** Adaptor Bind Slot 3 arguments, 1 hidden arguments |
****************************************************************/ |
template <class R, |
class P1,class P2,class P3, |
class C1> |
struct AdaptorBindSlot3_1: public AdaptorSlot_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef R RType; |
#else |
typedef typename Trait<R>::type RType; |
#endif |
typedef Slot3<R,P1,P2,P3> SlotType; |
typedef Slot4<R,P1,P2,P3,C1> InSlotType; |
struct Node:public AdaptorNode |
{ |
C1 c1_; |
Node(C1 c1) |
: c1_(c1) |
{ } |
}; |
typedef CallDataObj2<typename SlotType::Func,Node> CallData; |
static RType callback(void* d,P1 p1,P2 p2,P3 p3) |
{ |
CallData* data=(CallData*)d; |
Node* node=data->obj; |
return ((typename InSlotType::Callback&)(node->data_))(p1,p2,p3, |
node->c1_); |
} |
static SlotData* create(SlotData *s,C1 c1) |
{ |
Node *node=new Node(c1); |
copy_callback(s,node); |
CallData &data=reinterpret_cast<CallData&>(s->data_); |
data.callback=&callback; |
data.obj=node; |
return s; |
} |
}; |
#ifndef SIGC_CXX_VOID_RETURN |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template <class P1,class P2,class P3, |
class C1> |
struct AdaptorBindSlot3_1 |
<void,P1,P2,P3, |
C1> : public AdaptorSlot_ |
{ |
typedef void RType; |
typedef Slot3<void,P1,P2,P3> SlotType; |
typedef Slot4<void,P1,P2,P3,C1> InSlotType; |
struct Node:public AdaptorNode |
{ |
C1 c1_; |
Node(C1 c1) |
: c1_(c1) |
{ } |
}; |
typedef CallDataObj2<typename SlotType::Func,Node> CallData; |
static RType callback(void* d,P1 p1,P2 p2,P3 p3) |
{ |
CallData* data=(CallData*)d; |
Node* node=data->obj; |
((typename InSlotType::Callback&)(node->data_))(p1,p2,p3, |
node->c1_); |
} |
static SlotData* create(SlotData *s,C1 c1) |
{ |
Node *node=new Node(c1); |
copy_callback(s,node); |
CallData &data=reinterpret_cast<CallData&>(s->data_); |
data.callback=&callback; |
data.obj=node; |
return s; |
} |
}; |
#endif |
#endif |
template <class A1, |
class R, |
class P1,class P2,class P3, |
class C1> |
inline |
Slot3<R,P1,P2,P3> |
bind(const Slot4<R,P1,P2,P3,C1> &s, |
A1 a1) |
{return AdaptorBindSlot3_1<R, |
P1,P2,P3, |
C1>::create(s.data(),a1); |
} |
/**************************************************************** |
***** Adaptor Bind Slot 4 arguments, 1 hidden arguments |
****************************************************************/ |
template <class R, |
class P1,class P2,class P3,class P4, |
class C1> |
struct AdaptorBindSlot4_1: public AdaptorSlot_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef R RType; |
#else |
typedef typename Trait<R>::type RType; |
#endif |
typedef Slot4<R,P1,P2,P3,P4> SlotType; |
typedef Slot5<R,P1,P2,P3,P4,C1> InSlotType; |
struct Node:public AdaptorNode |
{ |
C1 c1_; |
Node(C1 c1) |
: c1_(c1) |
{ } |
}; |
typedef CallDataObj2<typename SlotType::Func,Node> CallData; |
static RType callback(void* d,P1 p1,P2 p2,P3 p3,P4 p4) |
{ |
CallData* data=(CallData*)d; |
Node* node=data->obj; |
return ((typename InSlotType::Callback&)(node->data_))(p1,p2,p3,p4, |
node->c1_); |
} |
static SlotData* create(SlotData *s,C1 c1) |
{ |
Node *node=new Node(c1); |
copy_callback(s,node); |
CallData &data=reinterpret_cast<CallData&>(s->data_); |
data.callback=&callback; |
data.obj=node; |
return s; |
} |
}; |
#ifndef SIGC_CXX_VOID_RETURN |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template <class P1,class P2,class P3,class P4, |
class C1> |
struct AdaptorBindSlot4_1 |
<void,P1,P2,P3,P4, |
C1> : public AdaptorSlot_ |
{ |
typedef void RType; |
typedef Slot4<void,P1,P2,P3,P4> SlotType; |
typedef Slot5<void,P1,P2,P3,P4,C1> InSlotType; |
struct Node:public AdaptorNode |
{ |
C1 c1_; |
Node(C1 c1) |
: c1_(c1) |
{ } |
}; |
typedef CallDataObj2<typename SlotType::Func,Node> CallData; |
static RType callback(void* d,P1 p1,P2 p2,P3 p3,P4 p4) |
{ |
CallData* data=(CallData*)d; |
Node* node=data->obj; |
((typename InSlotType::Callback&)(node->data_))(p1,p2,p3,p4, |
node->c1_); |
} |
static SlotData* create(SlotData *s,C1 c1) |
{ |
Node *node=new Node(c1); |
copy_callback(s,node); |
CallData &data=reinterpret_cast<CallData&>(s->data_); |
data.callback=&callback; |
data.obj=node; |
return s; |
} |
}; |
#endif |
#endif |
template <class A1, |
class R, |
class P1,class P2,class P3,class P4, |
class C1> |
inline |
Slot4<R,P1,P2,P3,P4> |
bind(const Slot5<R,P1,P2,P3,P4,C1> &s, |
A1 a1) |
{return AdaptorBindSlot4_1<R, |
P1,P2,P3,P4, |
C1>::create(s.data(),a1); |
} |
/**************************************************************** |
***** Adaptor Bind Slot 5 arguments, 1 hidden arguments |
****************************************************************/ |
template <class R, |
class P1,class P2,class P3,class P4,class P5, |
class C1> |
struct AdaptorBindSlot5_1: public AdaptorSlot_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef R RType; |
#else |
typedef typename Trait<R>::type RType; |
#endif |
typedef Slot5<R,P1,P2,P3,P4,P5> SlotType; |
typedef Slot6<R,P1,P2,P3,P4,P5,C1> InSlotType; |
struct Node:public AdaptorNode |
{ |
C1 c1_; |
Node(C1 c1) |
: c1_(c1) |
{ } |
}; |
typedef CallDataObj2<typename SlotType::Func,Node> CallData; |
static RType callback(void* d,P1 p1,P2 p2,P3 p3,P4 p4,P5 p5) |
{ |
CallData* data=(CallData*)d; |
Node* node=data->obj; |
return ((typename InSlotType::Callback&)(node->data_))(p1,p2,p3,p4,p5, |
node->c1_); |
} |
static SlotData* create(SlotData *s,C1 c1) |
{ |
Node *node=new Node(c1); |
copy_callback(s,node); |
CallData &data=reinterpret_cast<CallData&>(s->data_); |
data.callback=&callback; |
data.obj=node; |
return s; |
} |
}; |
#ifndef SIGC_CXX_VOID_RETURN |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template <class P1,class P2,class P3,class P4,class P5, |
class C1> |
struct AdaptorBindSlot5_1 |
<void,P1,P2,P3,P4,P5, |
C1> : public AdaptorSlot_ |
{ |
typedef void RType; |
typedef Slot5<void,P1,P2,P3,P4,P5> SlotType; |
typedef Slot6<void,P1,P2,P3,P4,P5,C1> InSlotType; |
struct Node:public AdaptorNode |
{ |
C1 c1_; |
Node(C1 c1) |
: c1_(c1) |
{ } |
}; |
typedef CallDataObj2<typename SlotType::Func,Node> CallData; |
static RType callback(void* d,P1 p1,P2 p2,P3 p3,P4 p4,P5 p5) |
{ |
CallData* data=(CallData*)d; |
Node* node=data->obj; |
((typename InSlotType::Callback&)(node->data_))(p1,p2,p3,p4,p5, |
node->c1_); |
} |
static SlotData* create(SlotData *s,C1 c1) |
{ |
Node *node=new Node(c1); |
copy_callback(s,node); |
CallData &data=reinterpret_cast<CallData&>(s->data_); |
data.callback=&callback; |
data.obj=node; |
return s; |
} |
}; |
#endif |
#endif |
template <class A1, |
class R, |
class P1,class P2,class P3,class P4,class P5, |
class C1> |
inline |
Slot5<R,P1,P2,P3,P4,P5> |
bind(const Slot6<R,P1,P2,P3,P4,P5,C1> &s, |
A1 a1) |
{return AdaptorBindSlot5_1<R, |
P1,P2,P3,P4,P5, |
C1>::create(s.data(),a1); |
} |
/**************************************************************** |
***** Adaptor Bind Slot 6 arguments, 1 hidden arguments |
****************************************************************/ |
template <class R, |
class P1,class P2,class P3,class P4,class P5,class P6, |
class C1> |
struct AdaptorBindSlot6_1: public AdaptorSlot_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef R RType; |
#else |
typedef typename Trait<R>::type RType; |
#endif |
typedef Slot6<R,P1,P2,P3,P4,P5,P6> SlotType; |
typedef Slot7<R,P1,P2,P3,P4,P5,P6,C1> InSlotType; |
struct Node:public AdaptorNode |
{ |
C1 c1_; |
Node(C1 c1) |
: c1_(c1) |
{ } |
}; |
typedef CallDataObj2<typename SlotType::Func,Node> CallData; |
static RType callback(void* d,P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6) |
{ |
CallData* data=(CallData*)d; |
Node* node=data->obj; |
return ((typename InSlotType::Callback&)(node->data_))(p1,p2,p3,p4,p5,p6, |
node->c1_); |
} |
static SlotData* create(SlotData *s,C1 c1) |
{ |
Node *node=new Node(c1); |
copy_callback(s,node); |
CallData &data=reinterpret_cast<CallData&>(s->data_); |
data.callback=&callback; |
data.obj=node; |
return s; |
} |
}; |
#ifndef SIGC_CXX_VOID_RETURN |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template <class P1,class P2,class P3,class P4,class P5,class P6, |
class C1> |
struct AdaptorBindSlot6_1 |
<void,P1,P2,P3,P4,P5,P6, |
C1> : public AdaptorSlot_ |
{ |
typedef void RType; |
typedef Slot6<void,P1,P2,P3,P4,P5,P6> SlotType; |
typedef Slot7<void,P1,P2,P3,P4,P5,P6,C1> InSlotType; |
struct Node:public AdaptorNode |
{ |
C1 c1_; |
Node(C1 c1) |
: c1_(c1) |
{ } |
}; |
typedef CallDataObj2<typename SlotType::Func,Node> CallData; |
static RType callback(void* d,P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6) |
{ |
CallData* data=(CallData*)d; |
Node* node=data->obj; |
((typename InSlotType::Callback&)(node->data_))(p1,p2,p3,p4,p5,p6, |
node->c1_); |
} |
static SlotData* create(SlotData *s,C1 c1) |
{ |
Node *node=new Node(c1); |
copy_callback(s,node); |
CallData &data=reinterpret_cast<CallData&>(s->data_); |
data.callback=&callback; |
data.obj=node; |
return s; |
} |
}; |
#endif |
#endif |
template <class A1, |
class R, |
class P1,class P2,class P3,class P4,class P5,class P6, |
class C1> |
inline |
Slot6<R,P1,P2,P3,P4,P5,P6> |
bind(const Slot7<R,P1,P2,P3,P4,P5,P6,C1> &s, |
A1 a1) |
{return AdaptorBindSlot6_1<R, |
P1,P2,P3,P4,P5,P6, |
C1>::create(s.data(),a1); |
} |
/**************************************************************** |
***** Adaptor Bind Slot 0 arguments, 2 hidden arguments |
****************************************************************/ |
template <class R, |
class C1,class C2> |
struct AdaptorBindSlot0_2: public AdaptorSlot_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef R RType; |
#else |
typedef typename Trait<R>::type RType; |
#endif |
typedef Slot0<R> SlotType; |
typedef Slot2<R,C1,C2> InSlotType; |
struct Node:public AdaptorNode |
{ |
C1 c1_; |
C2 c2_; |
Node(C1 c1,C2 c2) |
: c1_(c1),c2_(c2) |
{ } |
}; |
typedef CallDataObj2<typename SlotType::Func,Node> CallData; |
static RType callback(void* d) |
{ |
CallData* data=(CallData*)d; |
Node* node=data->obj; |
return ((typename InSlotType::Callback&)(node->data_))( |
node->c1_,node->c2_); |
} |
static SlotData* create(SlotData *s,C1 c1,C2 c2) |
{ |
Node *node=new Node(c1,c2); |
copy_callback(s,node); |
CallData &data=reinterpret_cast<CallData&>(s->data_); |
data.callback=&callback; |
data.obj=node; |
return s; |
} |
}; |
#ifndef SIGC_CXX_VOID_RETURN |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template < |
class C1,class C2> |
struct AdaptorBindSlot0_2 |
<void, |
C1,C2> : public AdaptorSlot_ |
{ |
typedef void RType; |
typedef Slot0<void> SlotType; |
typedef Slot2<void,C1,C2> InSlotType; |
struct Node:public AdaptorNode |
{ |
C1 c1_; |
C2 c2_; |
Node(C1 c1,C2 c2) |
: c1_(c1),c2_(c2) |
{ } |
}; |
typedef CallDataObj2<typename SlotType::Func,Node> CallData; |
static RType callback(void* d) |
{ |
CallData* data=(CallData*)d; |
Node* node=data->obj; |
((typename InSlotType::Callback&)(node->data_))( |
node->c1_,node->c2_); |
} |
static SlotData* create(SlotData *s,C1 c1,C2 c2) |
{ |
Node *node=new Node(c1,c2); |
copy_callback(s,node); |
CallData &data=reinterpret_cast<CallData&>(s->data_); |
data.callback=&callback; |
data.obj=node; |
return s; |
} |
}; |
#endif |
#endif |
template <class A1,class A2, |
class R, |
class C1,class C2> |
inline |
Slot0<R> |
bind(const Slot2<R,C1,C2> &s, |
A1 a1,A2 a2) |
{return AdaptorBindSlot0_2<R, |
C1,C2>::create(s.data(),a1,a2); |
} |
/**************************************************************** |
***** Adaptor Bind Slot 1 arguments, 2 hidden arguments |
****************************************************************/ |
template <class R, |
class P1, |
class C1,class C2> |
struct AdaptorBindSlot1_2: public AdaptorSlot_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef R RType; |
#else |
typedef typename Trait<R>::type RType; |
#endif |
typedef Slot1<R,P1> SlotType; |
typedef Slot3<R,P1,C1,C2> InSlotType; |
struct Node:public AdaptorNode |
{ |
C1 c1_; |
C2 c2_; |
Node(C1 c1,C2 c2) |
: c1_(c1),c2_(c2) |
{ } |
}; |
typedef CallDataObj2<typename SlotType::Func,Node> CallData; |
static RType callback(void* d,P1 p1) |
{ |
CallData* data=(CallData*)d; |
Node* node=data->obj; |
return ((typename InSlotType::Callback&)(node->data_))(p1, |
node->c1_,node->c2_); |
} |
static SlotData* create(SlotData *s,C1 c1,C2 c2) |
{ |
Node *node=new Node(c1,c2); |
copy_callback(s,node); |
CallData &data=reinterpret_cast<CallData&>(s->data_); |
data.callback=&callback; |
data.obj=node; |
return s; |
} |
}; |
#ifndef SIGC_CXX_VOID_RETURN |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template <class P1, |
class C1,class C2> |
struct AdaptorBindSlot1_2 |
<void,P1, |
C1,C2> : public AdaptorSlot_ |
{ |
typedef void RType; |
typedef Slot1<void,P1> SlotType; |
typedef Slot3<void,P1,C1,C2> InSlotType; |
struct Node:public AdaptorNode |
{ |
C1 c1_; |
C2 c2_; |
Node(C1 c1,C2 c2) |
: c1_(c1),c2_(c2) |
{ } |
}; |
typedef CallDataObj2<typename SlotType::Func,Node> CallData; |
static RType callback(void* d,P1 p1) |
{ |
CallData* data=(CallData*)d; |
Node* node=data->obj; |
((typename InSlotType::Callback&)(node->data_))(p1, |
node->c1_,node->c2_); |
} |
static SlotData* create(SlotData *s,C1 c1,C2 c2) |
{ |
Node *node=new Node(c1,c2); |
copy_callback(s,node); |
CallData &data=reinterpret_cast<CallData&>(s->data_); |
data.callback=&callback; |
data.obj=node; |
return s; |
} |
}; |
#endif |
#endif |
template <class A1,class A2, |
class R, |
class P1, |
class C1,class C2> |
inline |
Slot1<R,P1> |
bind(const Slot3<R,P1,C1,C2> &s, |
A1 a1,A2 a2) |
{return AdaptorBindSlot1_2<R, |
P1, |
C1,C2>::create(s.data(),a1,a2); |
} |
/**************************************************************** |
***** Adaptor Bind Slot 2 arguments, 2 hidden arguments |
****************************************************************/ |
template <class R, |
class P1,class P2, |
class C1,class C2> |
struct AdaptorBindSlot2_2: public AdaptorSlot_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef R RType; |
#else |
typedef typename Trait<R>::type RType; |
#endif |
typedef Slot2<R,P1,P2> SlotType; |
typedef Slot4<R,P1,P2,C1,C2> InSlotType; |
struct Node:public AdaptorNode |
{ |
C1 c1_; |
C2 c2_; |
Node(C1 c1,C2 c2) |
: c1_(c1),c2_(c2) |
{ } |
}; |
typedef CallDataObj2<typename SlotType::Func,Node> CallData; |
static RType callback(void* d,P1 p1,P2 p2) |
{ |
CallData* data=(CallData*)d; |
Node* node=data->obj; |
return ((typename InSlotType::Callback&)(node->data_))(p1,p2, |
node->c1_,node->c2_); |
} |
static SlotData* create(SlotData *s,C1 c1,C2 c2) |
{ |
Node *node=new Node(c1,c2); |
copy_callback(s,node); |
CallData &data=reinterpret_cast<CallData&>(s->data_); |
data.callback=&callback; |
data.obj=node; |
return s; |
} |
}; |
#ifndef SIGC_CXX_VOID_RETURN |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template <class P1,class P2, |
class C1,class C2> |
struct AdaptorBindSlot2_2 |
<void,P1,P2, |
C1,C2> : public AdaptorSlot_ |
{ |
typedef void RType; |
typedef Slot2<void,P1,P2> SlotType; |
typedef Slot4<void,P1,P2,C1,C2> InSlotType; |
struct Node:public AdaptorNode |
{ |
C1 c1_; |
C2 c2_; |
Node(C1 c1,C2 c2) |
: c1_(c1),c2_(c2) |
{ } |
}; |
typedef CallDataObj2<typename SlotType::Func,Node> CallData; |
static RType callback(void* d,P1 p1,P2 p2) |
{ |
CallData* data=(CallData*)d; |
Node* node=data->obj; |
((typename InSlotType::Callback&)(node->data_))(p1,p2, |
node->c1_,node->c2_); |
} |
static SlotData* create(SlotData *s,C1 c1,C2 c2) |
{ |
Node *node=new Node(c1,c2); |
copy_callback(s,node); |
CallData &data=reinterpret_cast<CallData&>(s->data_); |
data.callback=&callback; |
data.obj=node; |
return s; |
} |
}; |
#endif |
#endif |
template <class A1,class A2, |
class R, |
class P1,class P2, |
class C1,class C2> |
inline |
Slot2<R,P1,P2> |
bind(const Slot4<R,P1,P2,C1,C2> &s, |
A1 a1,A2 a2) |
{return AdaptorBindSlot2_2<R, |
P1,P2, |
C1,C2>::create(s.data(),a1,a2); |
} |
/**************************************************************** |
***** Adaptor Bind Slot 3 arguments, 2 hidden arguments |
****************************************************************/ |
template <class R, |
class P1,class P2,class P3, |
class C1,class C2> |
struct AdaptorBindSlot3_2: public AdaptorSlot_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef R RType; |
#else |
typedef typename Trait<R>::type RType; |
#endif |
typedef Slot3<R,P1,P2,P3> SlotType; |
typedef Slot5<R,P1,P2,P3,C1,C2> InSlotType; |
struct Node:public AdaptorNode |
{ |
C1 c1_; |
C2 c2_; |
Node(C1 c1,C2 c2) |
: c1_(c1),c2_(c2) |
{ } |
}; |
typedef CallDataObj2<typename SlotType::Func,Node> CallData; |
static RType callback(void* d,P1 p1,P2 p2,P3 p3) |
{ |
CallData* data=(CallData*)d; |
Node* node=data->obj; |
return ((typename InSlotType::Callback&)(node->data_))(p1,p2,p3, |
node->c1_,node->c2_); |
} |
static SlotData* create(SlotData *s,C1 c1,C2 c2) |
{ |
Node *node=new Node(c1,c2); |
copy_callback(s,node); |
CallData &data=reinterpret_cast<CallData&>(s->data_); |
data.callback=&callback; |
data.obj=node; |
return s; |
} |
}; |
#ifndef SIGC_CXX_VOID_RETURN |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template <class P1,class P2,class P3, |
class C1,class C2> |
struct AdaptorBindSlot3_2 |
<void,P1,P2,P3, |
C1,C2> : public AdaptorSlot_ |
{ |
typedef void RType; |
typedef Slot3<void,P1,P2,P3> SlotType; |
typedef Slot5<void,P1,P2,P3,C1,C2> InSlotType; |
struct Node:public AdaptorNode |
{ |
C1 c1_; |
C2 c2_; |
Node(C1 c1,C2 c2) |
: c1_(c1),c2_(c2) |
{ } |
}; |
typedef CallDataObj2<typename SlotType::Func,Node> CallData; |
static RType callback(void* d,P1 p1,P2 p2,P3 p3) |
{ |
CallData* data=(CallData*)d; |
Node* node=data->obj; |
((typename InSlotType::Callback&)(node->data_))(p1,p2,p3, |
node->c1_,node->c2_); |
} |
static SlotData* create(SlotData *s,C1 c1,C2 c2) |
{ |
Node *node=new Node(c1,c2); |
copy_callback(s,node); |
CallData &data=reinterpret_cast<CallData&>(s->data_); |
data.callback=&callback; |
data.obj=node; |
return s; |
} |
}; |
#endif |
#endif |
template <class A1,class A2, |
class R, |
class P1,class P2,class P3, |
class C1,class C2> |
inline |
Slot3<R,P1,P2,P3> |
bind(const Slot5<R,P1,P2,P3,C1,C2> &s, |
A1 a1,A2 a2) |
{return AdaptorBindSlot3_2<R, |
P1,P2,P3, |
C1,C2>::create(s.data(),a1,a2); |
} |
/**************************************************************** |
***** Adaptor Bind Slot 4 arguments, 2 hidden arguments |
****************************************************************/ |
template <class R, |
class P1,class P2,class P3,class P4, |
class C1,class C2> |
struct AdaptorBindSlot4_2: public AdaptorSlot_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef R RType; |
#else |
typedef typename Trait<R>::type RType; |
#endif |
typedef Slot4<R,P1,P2,P3,P4> SlotType; |
typedef Slot6<R,P1,P2,P3,P4,C1,C2> InSlotType; |
struct Node:public AdaptorNode |
{ |
C1 c1_; |
C2 c2_; |
Node(C1 c1,C2 c2) |
: c1_(c1),c2_(c2) |
{ } |
}; |
typedef CallDataObj2<typename SlotType::Func,Node> CallData; |
static RType callback(void* d,P1 p1,P2 p2,P3 p3,P4 p4) |
{ |
CallData* data=(CallData*)d; |
Node* node=data->obj; |
return ((typename InSlotType::Callback&)(node->data_))(p1,p2,p3,p4, |
node->c1_,node->c2_); |
} |
static SlotData* create(SlotData *s,C1 c1,C2 c2) |
{ |
Node *node=new Node(c1,c2); |
copy_callback(s,node); |
CallData &data=reinterpret_cast<CallData&>(s->data_); |
data.callback=&callback; |
data.obj=node; |
return s; |
} |
}; |
#ifndef SIGC_CXX_VOID_RETURN |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template <class P1,class P2,class P3,class P4, |
class C1,class C2> |
struct AdaptorBindSlot4_2 |
<void,P1,P2,P3,P4, |
C1,C2> : public AdaptorSlot_ |
{ |
typedef void RType; |
typedef Slot4<void,P1,P2,P3,P4> SlotType; |
typedef Slot6<void,P1,P2,P3,P4,C1,C2> InSlotType; |
struct Node:public AdaptorNode |
{ |
C1 c1_; |
C2 c2_; |
Node(C1 c1,C2 c2) |
: c1_(c1),c2_(c2) |
{ } |
}; |
typedef CallDataObj2<typename SlotType::Func,Node> CallData; |
static RType callback(void* d,P1 p1,P2 p2,P3 p3,P4 p4) |
{ |
CallData* data=(CallData*)d; |
Node* node=data->obj; |
((typename InSlotType::Callback&)(node->data_))(p1,p2,p3,p4, |
node->c1_,node->c2_); |
} |
static SlotData* create(SlotData *s,C1 c1,C2 c2) |
{ |
Node *node=new Node(c1,c2); |
copy_callback(s,node); |
CallData &data=reinterpret_cast<CallData&>(s->data_); |
data.callback=&callback; |
data.obj=node; |
return s; |
} |
}; |
#endif |
#endif |
template <class A1,class A2, |
class R, |
class P1,class P2,class P3,class P4, |
class C1,class C2> |
inline |
Slot4<R,P1,P2,P3,P4> |
bind(const Slot6<R,P1,P2,P3,P4,C1,C2> &s, |
A1 a1,A2 a2) |
{return AdaptorBindSlot4_2<R, |
P1,P2,P3,P4, |
C1,C2>::create(s.data(),a1,a2); |
} |
/**************************************************************** |
***** Adaptor Bind Slot 5 arguments, 2 hidden arguments |
****************************************************************/ |
template <class R, |
class P1,class P2,class P3,class P4,class P5, |
class C1,class C2> |
struct AdaptorBindSlot5_2: public AdaptorSlot_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef R RType; |
#else |
typedef typename Trait<R>::type RType; |
#endif |
typedef Slot5<R,P1,P2,P3,P4,P5> SlotType; |
typedef Slot7<R,P1,P2,P3,P4,P5,C1,C2> InSlotType; |
struct Node:public AdaptorNode |
{ |
C1 c1_; |
C2 c2_; |
Node(C1 c1,C2 c2) |
: c1_(c1),c2_(c2) |
{ } |
}; |
typedef CallDataObj2<typename SlotType::Func,Node> CallData; |
static RType callback(void* d,P1 p1,P2 p2,P3 p3,P4 p4,P5 p5) |
{ |
CallData* data=(CallData*)d; |
Node* node=data->obj; |
return ((typename InSlotType::Callback&)(node->data_))(p1,p2,p3,p4,p5, |
node->c1_,node->c2_); |
} |
static SlotData* create(SlotData *s,C1 c1,C2 c2) |
{ |
Node *node=new Node(c1,c2); |
copy_callback(s,node); |
CallData &data=reinterpret_cast<CallData&>(s->data_); |
data.callback=&callback; |
data.obj=node; |
return s; |
} |
}; |
#ifndef SIGC_CXX_VOID_RETURN |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template <class P1,class P2,class P3,class P4,class P5, |
class C1,class C2> |
struct AdaptorBindSlot5_2 |
<void,P1,P2,P3,P4,P5, |
C1,C2> : public AdaptorSlot_ |
{ |
typedef void RType; |
typedef Slot5<void,P1,P2,P3,P4,P5> SlotType; |
typedef Slot7<void,P1,P2,P3,P4,P5,C1,C2> InSlotType; |
struct Node:public AdaptorNode |
{ |
C1 c1_; |
C2 c2_; |
Node(C1 c1,C2 c2) |
: c1_(c1),c2_(c2) |
{ } |
}; |
typedef CallDataObj2<typename SlotType::Func,Node> CallData; |
static RType callback(void* d,P1 p1,P2 p2,P3 p3,P4 p4,P5 p5) |
{ |
CallData* data=(CallData*)d; |
Node* node=data->obj; |
((typename InSlotType::Callback&)(node->data_))(p1,p2,p3,p4,p5, |
node->c1_,node->c2_); |
} |
static SlotData* create(SlotData *s,C1 c1,C2 c2) |
{ |
Node *node=new Node(c1,c2); |
copy_callback(s,node); |
CallData &data=reinterpret_cast<CallData&>(s->data_); |
data.callback=&callback; |
data.obj=node; |
return s; |
} |
}; |
#endif |
#endif |
template <class A1,class A2, |
class R, |
class P1,class P2,class P3,class P4,class P5, |
class C1,class C2> |
inline |
Slot5<R,P1,P2,P3,P4,P5> |
bind(const Slot7<R,P1,P2,P3,P4,P5,C1,C2> &s, |
A1 a1,A2 a2) |
{return AdaptorBindSlot5_2<R, |
P1,P2,P3,P4,P5, |
C1,C2>::create(s.data(),a1,a2); |
} |
#ifdef SIGC_CXX_NAMESPACES |
} // namespace |
#endif |
#endif |
/contrib/media/updf/include/sigc++/class_slot.h |
---|
0,0 → 1,318 |
// -*- c++ -*- |
/* This is a generated file, do not edit. Generated from ../sigc++/macros/class_slot.h.m4 */ |
#ifndef SIGCXX_CLASS_SLOT_H |
#define SIGCXX_CLASS_SLOT_H |
/* |
SigC::slot_class() (class) |
----------------------- |
slot_class() can be applied to a class method to form a Slot with a |
profile equivelent to the method. At the same time an instance |
of that class must be specified. This is an unsafe interface. |
This does NOT require that the class be derived from SigC::Object. |
However, the object should be static with regards to the signal system. |
(allocated within the global scope.) If it is not and a connected |
slot is call it will result in a seg fault. If the object must |
be destroyed before the connected slots, all connections must |
be disconnected by hand. |
Sample usage: |
struct A |
{ |
void foo(int,int); |
} a; |
Slot2<void,int,int> s=slot_class(a,&A::foo); |
*/ |
#include <sigc++/object_slot.h> |
#ifdef SIGC_CXX_NAMESPACES |
namespace SigC |
{ |
#endif |
/**************************************************************** |
***** Class Slot 0 |
****************************************************************/ |
template <class R,class Obj> |
struct ClassSlot0_:public ObjectSlot0_<R,Obj> |
{ |
typedef ObjectSlot0_<R,Obj> Base; |
typedef typename Base::InFunc InFunc; |
static SlotData* create(Obj* obj,InFunc func) |
{ |
if (!obj) return 0; |
SlotData* tmp=manage(new SlotData()); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.obj=obj; |
data.func=(Func)func; |
return tmp; |
} |
}; |
template <class R,class Obj> |
Slot0<R> |
slot_class(Obj &obj,R (Obj::*func)()) |
{return ClassSlot0_<R,Obj>::create(&obj,func); |
} |
template <class R,class Obj> |
Slot0<R> |
slot_class(Obj *obj,R (Obj::*func)()) |
{return ClassSlot0_<R,Obj>::create(obj,func); |
} |
/**************************************************************** |
***** Class Slot 1 |
****************************************************************/ |
template <class R,class P1,class Obj> |
struct ClassSlot1_:public ObjectSlot1_<R,P1,Obj> |
{ |
typedef ObjectSlot1_<R,P1,Obj> Base; |
typedef typename Base::InFunc InFunc; |
static SlotData* create(Obj* obj,InFunc func) |
{ |
if (!obj) return 0; |
SlotData* tmp=manage(new SlotData()); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.obj=obj; |
data.func=(Func)func; |
return tmp; |
} |
}; |
template <class R,class P1,class Obj> |
Slot1<R,P1> |
slot_class(Obj &obj,R (Obj::*func)(P1)) |
{return ClassSlot1_<R,P1,Obj>::create(&obj,func); |
} |
template <class R,class P1,class Obj> |
Slot1<R,P1> |
slot_class(Obj *obj,R (Obj::*func)(P1)) |
{return ClassSlot1_<R,P1,Obj>::create(obj,func); |
} |
/**************************************************************** |
***** Class Slot 2 |
****************************************************************/ |
template <class R,class P1,class P2,class Obj> |
struct ClassSlot2_:public ObjectSlot2_<R,P1,P2,Obj> |
{ |
typedef ObjectSlot2_<R,P1,P2,Obj> Base; |
typedef typename Base::InFunc InFunc; |
static SlotData* create(Obj* obj,InFunc func) |
{ |
if (!obj) return 0; |
SlotData* tmp=manage(new SlotData()); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.obj=obj; |
data.func=(Func)func; |
return tmp; |
} |
}; |
template <class R,class P1,class P2,class Obj> |
Slot2<R,P1,P2> |
slot_class(Obj &obj,R (Obj::*func)(P1,P2)) |
{return ClassSlot2_<R,P1,P2,Obj>::create(&obj,func); |
} |
template <class R,class P1,class P2,class Obj> |
Slot2<R,P1,P2> |
slot_class(Obj *obj,R (Obj::*func)(P1,P2)) |
{return ClassSlot2_<R,P1,P2,Obj>::create(obj,func); |
} |
/**************************************************************** |
***** Class Slot 3 |
****************************************************************/ |
template <class R,class P1,class P2,class P3,class Obj> |
struct ClassSlot3_:public ObjectSlot3_<R,P1,P2,P3,Obj> |
{ |
typedef ObjectSlot3_<R,P1,P2,P3,Obj> Base; |
typedef typename Base::InFunc InFunc; |
static SlotData* create(Obj* obj,InFunc func) |
{ |
if (!obj) return 0; |
SlotData* tmp=manage(new SlotData()); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.obj=obj; |
data.func=(Func)func; |
return tmp; |
} |
}; |
template <class R,class P1,class P2,class P3,class Obj> |
Slot3<R,P1,P2,P3> |
slot_class(Obj &obj,R (Obj::*func)(P1,P2,P3)) |
{return ClassSlot3_<R,P1,P2,P3,Obj>::create(&obj,func); |
} |
template <class R,class P1,class P2,class P3,class Obj> |
Slot3<R,P1,P2,P3> |
slot_class(Obj *obj,R (Obj::*func)(P1,P2,P3)) |
{return ClassSlot3_<R,P1,P2,P3,Obj>::create(obj,func); |
} |
/**************************************************************** |
***** Class Slot 4 |
****************************************************************/ |
template <class R,class P1,class P2,class P3,class P4,class Obj> |
struct ClassSlot4_:public ObjectSlot4_<R,P1,P2,P3,P4,Obj> |
{ |
typedef ObjectSlot4_<R,P1,P2,P3,P4,Obj> Base; |
typedef typename Base::InFunc InFunc; |
static SlotData* create(Obj* obj,InFunc func) |
{ |
if (!obj) return 0; |
SlotData* tmp=manage(new SlotData()); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.obj=obj; |
data.func=(Func)func; |
return tmp; |
} |
}; |
template <class R,class P1,class P2,class P3,class P4,class Obj> |
Slot4<R,P1,P2,P3,P4> |
slot_class(Obj &obj,R (Obj::*func)(P1,P2,P3,P4)) |
{return ClassSlot4_<R,P1,P2,P3,P4,Obj>::create(&obj,func); |
} |
template <class R,class P1,class P2,class P3,class P4,class Obj> |
Slot4<R,P1,P2,P3,P4> |
slot_class(Obj *obj,R (Obj::*func)(P1,P2,P3,P4)) |
{return ClassSlot4_<R,P1,P2,P3,P4,Obj>::create(obj,func); |
} |
/**************************************************************** |
***** Class Slot 5 |
****************************************************************/ |
template <class R,class P1,class P2,class P3,class P4,class P5,class Obj> |
struct ClassSlot5_:public ObjectSlot5_<R,P1,P2,P3,P4,P5,Obj> |
{ |
typedef ObjectSlot5_<R,P1,P2,P3,P4,P5,Obj> Base; |
typedef typename Base::InFunc InFunc; |
static SlotData* create(Obj* obj,InFunc func) |
{ |
if (!obj) return 0; |
SlotData* tmp=manage(new SlotData()); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.obj=obj; |
data.func=(Func)func; |
return tmp; |
} |
}; |
template <class R,class P1,class P2,class P3,class P4,class P5,class Obj> |
Slot5<R,P1,P2,P3,P4,P5> |
slot_class(Obj &obj,R (Obj::*func)(P1,P2,P3,P4,P5)) |
{return ClassSlot5_<R,P1,P2,P3,P4,P5,Obj>::create(&obj,func); |
} |
template <class R,class P1,class P2,class P3,class P4,class P5,class Obj> |
Slot5<R,P1,P2,P3,P4,P5> |
slot_class(Obj *obj,R (Obj::*func)(P1,P2,P3,P4,P5)) |
{return ClassSlot5_<R,P1,P2,P3,P4,P5,Obj>::create(obj,func); |
} |
/**************************************************************** |
***** Class Slot 6 |
****************************************************************/ |
template <class R,class P1,class P2,class P3,class P4,class P5,class P6,class Obj> |
struct ClassSlot6_:public ObjectSlot6_<R,P1,P2,P3,P4,P5,P6,Obj> |
{ |
typedef ObjectSlot6_<R,P1,P2,P3,P4,P5,P6,Obj> Base; |
typedef typename Base::InFunc InFunc; |
static SlotData* create(Obj* obj,InFunc func) |
{ |
if (!obj) return 0; |
SlotData* tmp=manage(new SlotData()); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.obj=obj; |
data.func=(Func)func; |
return tmp; |
} |
}; |
template <class R,class P1,class P2,class P3,class P4,class P5,class P6,class Obj> |
Slot6<R,P1,P2,P3,P4,P5,P6> |
slot_class(Obj &obj,R (Obj::*func)(P1,P2,P3,P4,P5,P6)) |
{return ClassSlot6_<R,P1,P2,P3,P4,P5,P6,Obj>::create(&obj,func); |
} |
template <class R,class P1,class P2,class P3,class P4,class P5,class P6,class Obj> |
Slot6<R,P1,P2,P3,P4,P5,P6> |
slot_class(Obj *obj,R (Obj::*func)(P1,P2,P3,P4,P5,P6)) |
{return ClassSlot6_<R,P1,P2,P3,P4,P5,P6,Obj>::create(obj,func); |
} |
/**************************************************************** |
***** Class Slot 7 |
****************************************************************/ |
template <class R,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class Obj> |
struct ClassSlot7_:public ObjectSlot7_<R,P1,P2,P3,P4,P5,P6,P7,Obj> |
{ |
typedef ObjectSlot7_<R,P1,P2,P3,P4,P5,P6,P7,Obj> Base; |
typedef typename Base::InFunc InFunc; |
static SlotData* create(Obj* obj,InFunc func) |
{ |
if (!obj) return 0; |
SlotData* tmp=manage(new SlotData()); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.obj=obj; |
data.func=(Func)func; |
return tmp; |
} |
}; |
template <class R,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class Obj> |
Slot7<R,P1,P2,P3,P4,P5,P6,P7> |
slot_class(Obj &obj,R (Obj::*func)(P1,P2,P3,P4,P5,P6,P7)) |
{return ClassSlot7_<R,P1,P2,P3,P4,P5,P6,P7,Obj>::create(&obj,func); |
} |
template <class R,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class Obj> |
Slot7<R,P1,P2,P3,P4,P5,P6,P7> |
slot_class(Obj *obj,R (Obj::*func)(P1,P2,P3,P4,P5,P6,P7)) |
{return ClassSlot7_<R,P1,P2,P3,P4,P5,P6,P7,Obj>::create(obj,func); |
} |
#ifdef SIGC_CXX_NAMESPACES |
} // namespace |
#endif |
#endif |
/contrib/media/updf/include/sigc++/convert.h |
---|
0,0 → 1,671 |
// -*- c++ -*- |
/* This is a generated file, do not edit. Generated from ../sigc++/macros/convert.h.m4 */ |
#ifndef SIGCXX_CONVERT_H |
#define SIGCXX_CONVERT_H |
/* |
SigC::convert |
------------- |
convert() alters a Slot by assigning a conversion function |
which can completely alter the parameter types of a slot. |
Only convert functions for changing with same number of |
arguments is compiled by default. See examples/custom_convert.h.m4 |
for details on how to build non standard ones. |
Sample usage: |
int my_string_to_char(Callback1<int,const char*> *d,const string &s) |
int f(const char*); |
string s=hello; |
Slot1<int,const string &> s2=convert(slot(f),my_string_to_char); |
s2(s); |
*/ |
#include <sigc++/adaptor.h> |
#ifdef SIGC_CXX_NAMESPACES |
namespace SigC |
{ |
#endif |
/**************************************************************** |
***** Adaptor Convert Slot 1 |
****************************************************************/ |
template <class R1,class P1, |
class R2,class Q1> |
struct AdaptorConvertSlot1_1: public AdaptorSlot_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef R1 RType; |
#else |
typedef typename Trait<R1>::type RType; |
#endif |
typedef Slot1<R1,P1> SlotType; |
typedef Slot1<R2,Q1> InSlotType; |
typedef typename InSlotType::Callback Callback; |
typedef RType (*Func) (Callback*,P1); |
typedef R1 (*InFunc)(Callback*,P1); |
typedef CallDataObj3<typename SlotType::Func,Callback,Func> CallData; |
static RType callback(void* d,P1 p1) |
{ |
CallData* data=(CallData*)d; |
return (data->func)(data->obj,p1); |
} |
static SlotData* create(SlotData *s,InFunc func) |
{ |
SlotData* tmp=(SlotData*)s; |
AdaptorNode *node=new AdaptorNode(); |
copy_callback(tmp,node); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.func=(Func)func; |
data.obj=(Callback*)&(node->data_); |
return tmp; |
} |
}; |
#ifndef SIGC_CXX_VOID_RETURN |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template <class P1, |
class R2,class Q1> |
struct AdaptorConvertSlot1_1 |
<void,P1, |
R2,Q1> |
: public AdaptorSlot_ |
{ |
typedef void RType; |
typedef Slot1<void,P1> SlotType; |
typedef Slot1<R2,Q1> InSlotType; |
typedef typename InSlotType::Callback Callback; |
typedef RType (*Func) (Callback*,P1); |
typedef void (*InFunc)(Callback*,P1); |
typedef CallDataObj3<typename SlotType::Func,Callback,Func> CallData; |
static RType callback(void* d,P1 p1) |
{ |
CallData* data=(CallData*)d; |
(data->func)(data->obj,p1); |
} |
static SlotData* create(SlotData *s,InFunc func) |
{ |
SlotData* tmp=(SlotData*)s; |
AdaptorNode *node=new AdaptorNode(); |
copy_callback(tmp,node); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.func=(Func)func; |
data.obj=(Callback*)&(node->data_); |
return tmp; |
} |
}; |
#endif |
#endif |
template <class R1,class P1, |
class R2,class Q1> |
Slot1<R1,P1> |
convert(const Slot1<R2,Q1> &s, |
R1 (*func)(Callback1<R2,Q1>*,P1)) |
{return AdaptorConvertSlot1_1<R1,P1, |
R2,Q1>::create(s.obj(),func); |
} |
/**************************************************************** |
***** Adaptor Convert Slot 2 |
****************************************************************/ |
template <class R1,class P1,class P2, |
class R2,class Q1,class Q2> |
struct AdaptorConvertSlot2_2: public AdaptorSlot_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef R1 RType; |
#else |
typedef typename Trait<R1>::type RType; |
#endif |
typedef Slot2<R1,P1,P2> SlotType; |
typedef Slot2<R2,Q1,Q2> InSlotType; |
typedef typename InSlotType::Callback Callback; |
typedef RType (*Func) (Callback*,P1,P2); |
typedef R1 (*InFunc)(Callback*,P1,P2); |
typedef CallDataObj3<typename SlotType::Func,Callback,Func> CallData; |
static RType callback(void* d,P1 p1,P2 p2) |
{ |
CallData* data=(CallData*)d; |
return (data->func)(data->obj,p1,p2); |
} |
static SlotData* create(SlotData *s,InFunc func) |
{ |
SlotData* tmp=(SlotData*)s; |
AdaptorNode *node=new AdaptorNode(); |
copy_callback(tmp,node); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.func=(Func)func; |
data.obj=(Callback*)&(node->data_); |
return tmp; |
} |
}; |
#ifndef SIGC_CXX_VOID_RETURN |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template <class P1,class P2, |
class R2,class Q1,class Q2> |
struct AdaptorConvertSlot2_2 |
<void,P1,P2, |
R2,Q1,Q2> |
: public AdaptorSlot_ |
{ |
typedef void RType; |
typedef Slot2<void,P1,P2> SlotType; |
typedef Slot2<R2,Q1,Q2> InSlotType; |
typedef typename InSlotType::Callback Callback; |
typedef RType (*Func) (Callback*,P1,P2); |
typedef void (*InFunc)(Callback*,P1,P2); |
typedef CallDataObj3<typename SlotType::Func,Callback,Func> CallData; |
static RType callback(void* d,P1 p1,P2 p2) |
{ |
CallData* data=(CallData*)d; |
(data->func)(data->obj,p1,p2); |
} |
static SlotData* create(SlotData *s,InFunc func) |
{ |
SlotData* tmp=(SlotData*)s; |
AdaptorNode *node=new AdaptorNode(); |
copy_callback(tmp,node); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.func=(Func)func; |
data.obj=(Callback*)&(node->data_); |
return tmp; |
} |
}; |
#endif |
#endif |
template <class R1,class P1,class P2, |
class R2,class Q1,class Q2> |
Slot2<R1,P1,P2> |
convert(const Slot2<R2,Q1,Q2> &s, |
R1 (*func)(Callback2<R2,Q1,Q2>*,P1,P2)) |
{return AdaptorConvertSlot2_2<R1,P1,P2, |
R2,Q1,Q2>::create(s.obj(),func); |
} |
/**************************************************************** |
***** Adaptor Convert Slot 3 |
****************************************************************/ |
template <class R1,class P1,class P2,class P3, |
class R2,class Q1,class Q2,class Q3> |
struct AdaptorConvertSlot3_3: public AdaptorSlot_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef R1 RType; |
#else |
typedef typename Trait<R1>::type RType; |
#endif |
typedef Slot3<R1,P1,P2,P3> SlotType; |
typedef Slot3<R2,Q1,Q2,Q3> InSlotType; |
typedef typename InSlotType::Callback Callback; |
typedef RType (*Func) (Callback*,P1,P2,P3); |
typedef R1 (*InFunc)(Callback*,P1,P2,P3); |
typedef CallDataObj3<typename SlotType::Func,Callback,Func> CallData; |
static RType callback(void* d,P1 p1,P2 p2,P3 p3) |
{ |
CallData* data=(CallData*)d; |
return (data->func)(data->obj,p1,p2,p3); |
} |
static SlotData* create(SlotData *s,InFunc func) |
{ |
SlotData* tmp=(SlotData*)s; |
AdaptorNode *node=new AdaptorNode(); |
copy_callback(tmp,node); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.func=(Func)func; |
data.obj=(Callback*)&(node->data_); |
return tmp; |
} |
}; |
#ifndef SIGC_CXX_VOID_RETURN |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template <class P1,class P2,class P3, |
class R2,class Q1,class Q2,class Q3> |
struct AdaptorConvertSlot3_3 |
<void,P1,P2,P3, |
R2,Q1,Q2,Q3> |
: public AdaptorSlot_ |
{ |
typedef void RType; |
typedef Slot3<void,P1,P2,P3> SlotType; |
typedef Slot3<R2,Q1,Q2,Q3> InSlotType; |
typedef typename InSlotType::Callback Callback; |
typedef RType (*Func) (Callback*,P1,P2,P3); |
typedef void (*InFunc)(Callback*,P1,P2,P3); |
typedef CallDataObj3<typename SlotType::Func,Callback,Func> CallData; |
static RType callback(void* d,P1 p1,P2 p2,P3 p3) |
{ |
CallData* data=(CallData*)d; |
(data->func)(data->obj,p1,p2,p3); |
} |
static SlotData* create(SlotData *s,InFunc func) |
{ |
SlotData* tmp=(SlotData*)s; |
AdaptorNode *node=new AdaptorNode(); |
copy_callback(tmp,node); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.func=(Func)func; |
data.obj=(Callback*)&(node->data_); |
return tmp; |
} |
}; |
#endif |
#endif |
template <class R1,class P1,class P2,class P3, |
class R2,class Q1,class Q2,class Q3> |
Slot3<R1,P1,P2,P3> |
convert(const Slot3<R2,Q1,Q2,Q3> &s, |
R1 (*func)(Callback3<R2,Q1,Q2,Q3>*,P1,P2,P3)) |
{return AdaptorConvertSlot3_3<R1,P1,P2,P3, |
R2,Q1,Q2,Q3>::create(s.obj(),func); |
} |
/**************************************************************** |
***** Adaptor Convert Slot 4 |
****************************************************************/ |
template <class R1,class P1,class P2,class P3,class P4, |
class R2,class Q1,class Q2,class Q3,class Q4> |
struct AdaptorConvertSlot4_4: public AdaptorSlot_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef R1 RType; |
#else |
typedef typename Trait<R1>::type RType; |
#endif |
typedef Slot4<R1,P1,P2,P3,P4> SlotType; |
typedef Slot4<R2,Q1,Q2,Q3,Q4> InSlotType; |
typedef typename InSlotType::Callback Callback; |
typedef RType (*Func) (Callback*,P1,P2,P3,P4); |
typedef R1 (*InFunc)(Callback*,P1,P2,P3,P4); |
typedef CallDataObj3<typename SlotType::Func,Callback,Func> CallData; |
static RType callback(void* d,P1 p1,P2 p2,P3 p3,P4 p4) |
{ |
CallData* data=(CallData*)d; |
return (data->func)(data->obj,p1,p2,p3,p4); |
} |
static SlotData* create(SlotData *s,InFunc func) |
{ |
SlotData* tmp=(SlotData*)s; |
AdaptorNode *node=new AdaptorNode(); |
copy_callback(tmp,node); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.func=(Func)func; |
data.obj=(Callback*)&(node->data_); |
return tmp; |
} |
}; |
#ifndef SIGC_CXX_VOID_RETURN |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template <class P1,class P2,class P3,class P4, |
class R2,class Q1,class Q2,class Q3,class Q4> |
struct AdaptorConvertSlot4_4 |
<void,P1,P2,P3,P4, |
R2,Q1,Q2,Q3,Q4> |
: public AdaptorSlot_ |
{ |
typedef void RType; |
typedef Slot4<void,P1,P2,P3,P4> SlotType; |
typedef Slot4<R2,Q1,Q2,Q3,Q4> InSlotType; |
typedef typename InSlotType::Callback Callback; |
typedef RType (*Func) (Callback*,P1,P2,P3,P4); |
typedef void (*InFunc)(Callback*,P1,P2,P3,P4); |
typedef CallDataObj3<typename SlotType::Func,Callback,Func> CallData; |
static RType callback(void* d,P1 p1,P2 p2,P3 p3,P4 p4) |
{ |
CallData* data=(CallData*)d; |
(data->func)(data->obj,p1,p2,p3,p4); |
} |
static SlotData* create(SlotData *s,InFunc func) |
{ |
SlotData* tmp=(SlotData*)s; |
AdaptorNode *node=new AdaptorNode(); |
copy_callback(tmp,node); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.func=(Func)func; |
data.obj=(Callback*)&(node->data_); |
return tmp; |
} |
}; |
#endif |
#endif |
template <class R1,class P1,class P2,class P3,class P4, |
class R2,class Q1,class Q2,class Q3,class Q4> |
Slot4<R1,P1,P2,P3,P4> |
convert(const Slot4<R2,Q1,Q2,Q3,Q4> &s, |
R1 (*func)(Callback4<R2,Q1,Q2,Q3,Q4>*,P1,P2,P3,P4)) |
{return AdaptorConvertSlot4_4<R1,P1,P2,P3,P4, |
R2,Q1,Q2,Q3,Q4>::create(s.obj(),func); |
} |
/**************************************************************** |
***** Adaptor Convert Slot 5 |
****************************************************************/ |
template <class R1,class P1,class P2,class P3,class P4,class P5, |
class R2,class Q1,class Q2,class Q3,class Q4,class Q5> |
struct AdaptorConvertSlot5_5: public AdaptorSlot_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef R1 RType; |
#else |
typedef typename Trait<R1>::type RType; |
#endif |
typedef Slot5<R1,P1,P2,P3,P4,P5> SlotType; |
typedef Slot5<R2,Q1,Q2,Q3,Q4,Q5> InSlotType; |
typedef typename InSlotType::Callback Callback; |
typedef RType (*Func) (Callback*,P1,P2,P3,P4,P5); |
typedef R1 (*InFunc)(Callback*,P1,P2,P3,P4,P5); |
typedef CallDataObj3<typename SlotType::Func,Callback,Func> CallData; |
static RType callback(void* d,P1 p1,P2 p2,P3 p3,P4 p4,P5 p5) |
{ |
CallData* data=(CallData*)d; |
return (data->func)(data->obj,p1,p2,p3,p4,p5); |
} |
static SlotData* create(SlotData *s,InFunc func) |
{ |
SlotData* tmp=(SlotData*)s; |
AdaptorNode *node=new AdaptorNode(); |
copy_callback(tmp,node); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.func=(Func)func; |
data.obj=(Callback*)&(node->data_); |
return tmp; |
} |
}; |
#ifndef SIGC_CXX_VOID_RETURN |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template <class P1,class P2,class P3,class P4,class P5, |
class R2,class Q1,class Q2,class Q3,class Q4,class Q5> |
struct AdaptorConvertSlot5_5 |
<void,P1,P2,P3,P4,P5, |
R2,Q1,Q2,Q3,Q4,Q5> |
: public AdaptorSlot_ |
{ |
typedef void RType; |
typedef Slot5<void,P1,P2,P3,P4,P5> SlotType; |
typedef Slot5<R2,Q1,Q2,Q3,Q4,Q5> InSlotType; |
typedef typename InSlotType::Callback Callback; |
typedef RType (*Func) (Callback*,P1,P2,P3,P4,P5); |
typedef void (*InFunc)(Callback*,P1,P2,P3,P4,P5); |
typedef CallDataObj3<typename SlotType::Func,Callback,Func> CallData; |
static RType callback(void* d,P1 p1,P2 p2,P3 p3,P4 p4,P5 p5) |
{ |
CallData* data=(CallData*)d; |
(data->func)(data->obj,p1,p2,p3,p4,p5); |
} |
static SlotData* create(SlotData *s,InFunc func) |
{ |
SlotData* tmp=(SlotData*)s; |
AdaptorNode *node=new AdaptorNode(); |
copy_callback(tmp,node); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.func=(Func)func; |
data.obj=(Callback*)&(node->data_); |
return tmp; |
} |
}; |
#endif |
#endif |
template <class R1,class P1,class P2,class P3,class P4,class P5, |
class R2,class Q1,class Q2,class Q3,class Q4,class Q5> |
Slot5<R1,P1,P2,P3,P4,P5> |
convert(const Slot5<R2,Q1,Q2,Q3,Q4,Q5> &s, |
R1 (*func)(Callback5<R2,Q1,Q2,Q3,Q4,Q5>*,P1,P2,P3,P4,P5)) |
{return AdaptorConvertSlot5_5<R1,P1,P2,P3,P4,P5, |
R2,Q1,Q2,Q3,Q4,Q5>::create(s.obj(),func); |
} |
/**************************************************************** |
***** Adaptor Convert Slot 6 |
****************************************************************/ |
template <class R1,class P1,class P2,class P3,class P4,class P5,class P6, |
class R2,class Q1,class Q2,class Q3,class Q4,class Q5,class Q6> |
struct AdaptorConvertSlot6_6: public AdaptorSlot_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef R1 RType; |
#else |
typedef typename Trait<R1>::type RType; |
#endif |
typedef Slot6<R1,P1,P2,P3,P4,P5,P6> SlotType; |
typedef Slot6<R2,Q1,Q2,Q3,Q4,Q5,Q6> InSlotType; |
typedef typename InSlotType::Callback Callback; |
typedef RType (*Func) (Callback*,P1,P2,P3,P4,P5,P6); |
typedef R1 (*InFunc)(Callback*,P1,P2,P3,P4,P5,P6); |
typedef CallDataObj3<typename SlotType::Func,Callback,Func> CallData; |
static RType callback(void* d,P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6) |
{ |
CallData* data=(CallData*)d; |
return (data->func)(data->obj,p1,p2,p3,p4,p5,p6); |
} |
static SlotData* create(SlotData *s,InFunc func) |
{ |
SlotData* tmp=(SlotData*)s; |
AdaptorNode *node=new AdaptorNode(); |
copy_callback(tmp,node); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.func=(Func)func; |
data.obj=(Callback*)&(node->data_); |
return tmp; |
} |
}; |
#ifndef SIGC_CXX_VOID_RETURN |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template <class P1,class P2,class P3,class P4,class P5,class P6, |
class R2,class Q1,class Q2,class Q3,class Q4,class Q5,class Q6> |
struct AdaptorConvertSlot6_6 |
<void,P1,P2,P3,P4,P5,P6, |
R2,Q1,Q2,Q3,Q4,Q5,Q6> |
: public AdaptorSlot_ |
{ |
typedef void RType; |
typedef Slot6<void,P1,P2,P3,P4,P5,P6> SlotType; |
typedef Slot6<R2,Q1,Q2,Q3,Q4,Q5,Q6> InSlotType; |
typedef typename InSlotType::Callback Callback; |
typedef RType (*Func) (Callback*,P1,P2,P3,P4,P5,P6); |
typedef void (*InFunc)(Callback*,P1,P2,P3,P4,P5,P6); |
typedef CallDataObj3<typename SlotType::Func,Callback,Func> CallData; |
static RType callback(void* d,P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6) |
{ |
CallData* data=(CallData*)d; |
(data->func)(data->obj,p1,p2,p3,p4,p5,p6); |
} |
static SlotData* create(SlotData *s,InFunc func) |
{ |
SlotData* tmp=(SlotData*)s; |
AdaptorNode *node=new AdaptorNode(); |
copy_callback(tmp,node); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.func=(Func)func; |
data.obj=(Callback*)&(node->data_); |
return tmp; |
} |
}; |
#endif |
#endif |
template <class R1,class P1,class P2,class P3,class P4,class P5,class P6, |
class R2,class Q1,class Q2,class Q3,class Q4,class Q5,class Q6> |
Slot6<R1,P1,P2,P3,P4,P5,P6> |
convert(const Slot6<R2,Q1,Q2,Q3,Q4,Q5,Q6> &s, |
R1 (*func)(Callback6<R2,Q1,Q2,Q3,Q4,Q5,Q6>*,P1,P2,P3,P4,P5,P6)) |
{return AdaptorConvertSlot6_6<R1,P1,P2,P3,P4,P5,P6, |
R2,Q1,Q2,Q3,Q4,Q5,Q6>::create(s.obj(),func); |
} |
/**************************************************************** |
***** Adaptor Convert Slot 7 |
****************************************************************/ |
template <class R1,class P1,class P2,class P3,class P4,class P5,class P6,class P7, |
class R2,class Q1,class Q2,class Q3,class Q4,class Q5,class Q6,class Q7> |
struct AdaptorConvertSlot7_7: public AdaptorSlot_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef R1 RType; |
#else |
typedef typename Trait<R1>::type RType; |
#endif |
typedef Slot7<R1,P1,P2,P3,P4,P5,P6,P7> SlotType; |
typedef Slot7<R2,Q1,Q2,Q3,Q4,Q5,Q6,Q7> InSlotType; |
typedef typename InSlotType::Callback Callback; |
typedef RType (*Func) (Callback*,P1,P2,P3,P4,P5,P6,P7); |
typedef R1 (*InFunc)(Callback*,P1,P2,P3,P4,P5,P6,P7); |
typedef CallDataObj3<typename SlotType::Func,Callback,Func> CallData; |
static RType callback(void* d,P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7) |
{ |
CallData* data=(CallData*)d; |
return (data->func)(data->obj,p1,p2,p3,p4,p5,p6,p7); |
} |
static SlotData* create(SlotData *s,InFunc func) |
{ |
SlotData* tmp=(SlotData*)s; |
AdaptorNode *node=new AdaptorNode(); |
copy_callback(tmp,node); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.func=(Func)func; |
data.obj=(Callback*)&(node->data_); |
return tmp; |
} |
}; |
#ifndef SIGC_CXX_VOID_RETURN |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template <class P1,class P2,class P3,class P4,class P5,class P6,class P7, |
class R2,class Q1,class Q2,class Q3,class Q4,class Q5,class Q6,class Q7> |
struct AdaptorConvertSlot7_7 |
<void,P1,P2,P3,P4,P5,P6,P7, |
R2,Q1,Q2,Q3,Q4,Q5,Q6,Q7> |
: public AdaptorSlot_ |
{ |
typedef void RType; |
typedef Slot7<void,P1,P2,P3,P4,P5,P6,P7> SlotType; |
typedef Slot7<R2,Q1,Q2,Q3,Q4,Q5,Q6,Q7> InSlotType; |
typedef typename InSlotType::Callback Callback; |
typedef RType (*Func) (Callback*,P1,P2,P3,P4,P5,P6,P7); |
typedef void (*InFunc)(Callback*,P1,P2,P3,P4,P5,P6,P7); |
typedef CallDataObj3<typename SlotType::Func,Callback,Func> CallData; |
static RType callback(void* d,P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7) |
{ |
CallData* data=(CallData*)d; |
(data->func)(data->obj,p1,p2,p3,p4,p5,p6,p7); |
} |
static SlotData* create(SlotData *s,InFunc func) |
{ |
SlotData* tmp=(SlotData*)s; |
AdaptorNode *node=new AdaptorNode(); |
copy_callback(tmp,node); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.func=(Func)func; |
data.obj=(Callback*)&(node->data_); |
return tmp; |
} |
}; |
#endif |
#endif |
template <class R1,class P1,class P2,class P3,class P4,class P5,class P6,class P7, |
class R2,class Q1,class Q2,class Q3,class Q4,class Q5,class Q6,class Q7> |
Slot7<R1,P1,P2,P3,P4,P5,P6,P7> |
convert(const Slot7<R2,Q1,Q2,Q3,Q4,Q5,Q6,Q7> &s, |
R1 (*func)(Callback7<R2,Q1,Q2,Q3,Q4,Q5,Q6,Q7>*,P1,P2,P3,P4,P5,P6,P7)) |
{return AdaptorConvertSlot7_7<R1,P1,P2,P3,P4,P5,P6,P7, |
R2,Q1,Q2,Q3,Q4,Q5,Q6,Q7>::create(s.obj(),func); |
} |
#ifdef SIGC_CXX_NAMESPACES |
} // namespace |
#endif |
#endif |
/contrib/media/updf/include/sigc++/func_slot.h |
---|
0,0 → 1,606 |
// -*- c++ -*- |
/* This is a generated file, do not edit. Generated from ../sigc++/macros/func_slot.h.m4 */ |
#ifndef SIGCXX_FUNC_SLOT_H |
#define SIGCXX_FUNC_SLOT_H |
#include <sigc++/slot.h> |
/* |
SigC::slot() (function) |
----------------------- |
slot() can be applied to a function to form a Slot with a |
profile equivelent to the function. To avoid warns be |
sure to pass the address of the function. |
Sample usage: |
void foo(int,int); |
Slot2<void,int,int> s=slot(&foo); |
*/ |
#ifdef SIGC_CXX_NAMESPACES |
namespace SigC |
{ |
#endif |
// From which we build specific Slots and a set of |
// functions for creating a slot of this type |
/**************************************************************** |
***** Function Slot 0 |
****************************************************************/ |
template <class R> |
struct FuncSlot0_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef R RType; |
#else |
typedef typename Trait<R>::type RType; |
#endif |
typedef R (*InFunc)(); |
typedef RType (*Func)(); |
typedef Slot0<R> SlotType; |
typedef CallDataFunc<typename SlotType::Func,Func> CallData; |
static RType callback(void* data) |
{ |
return (((CallData*)data)->func)(); |
} |
static SlotData* create(InFunc func) |
{ |
SlotData* tmp=manage(new SlotData()); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.func=(Func)func; |
return tmp; |
} |
}; |
#ifndef SIGC_CXX_VOID_RETURN |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template <> |
struct FuncSlot0_<void> |
{ |
typedef void RType; |
typedef void (*InFunc)(); |
typedef RType (*Func)(); |
typedef Slot0<void> SlotType; |
typedef CallDataFunc<SlotType::Func,Func> CallData; |
static RType callback(void* data) |
{ |
(((CallData*)data)->func)(); |
} |
static SlotData* create(InFunc func) |
{ |
SlotData* tmp=manage(new SlotData()); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.func=(Func)func; |
return tmp; |
} |
}; |
#endif |
#endif |
template <class R> |
inline Slot0<R> |
slot(R (*func)()) |
{ |
return FuncSlot0_<R>::create(func); |
} |
/**************************************************************** |
***** Function Slot 1 |
****************************************************************/ |
template <class R,class P1> |
struct FuncSlot1_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef R RType; |
#else |
typedef typename Trait<R>::type RType; |
#endif |
typedef R (*InFunc)(P1); |
typedef RType (*Func)(P1); |
typedef Slot1<R,P1> SlotType; |
typedef CallDataFunc<typename SlotType::Func,Func> CallData; |
static RType callback(void* data,P1 p1) |
{ |
return (((CallData*)data)->func)(p1); |
} |
static SlotData* create(InFunc func) |
{ |
SlotData* tmp=manage(new SlotData()); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.func=(Func)func; |
return tmp; |
} |
}; |
#ifndef SIGC_CXX_VOID_RETURN |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template <class P1> |
struct FuncSlot1_<void,P1> |
{ |
typedef void RType; |
typedef void (*InFunc)(P1); |
typedef RType (*Func)(P1); |
typedef Slot1<void,P1> SlotType; |
typedef CallDataFunc<typename SlotType::Func,Func> CallData; |
static RType callback(void* data,P1 p1) |
{ |
(((CallData*)data)->func)(p1); |
} |
static SlotData* create(InFunc func) |
{ |
SlotData* tmp=manage(new SlotData()); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.func=(Func)func; |
return tmp; |
} |
}; |
#endif |
#endif |
template <class R,class P1> |
inline Slot1<R,P1> |
slot(R (*func)(P1)) |
{ |
return FuncSlot1_<R,P1>::create(func); |
} |
/**************************************************************** |
***** Function Slot 2 |
****************************************************************/ |
template <class R,class P1,class P2> |
struct FuncSlot2_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef R RType; |
#else |
typedef typename Trait<R>::type RType; |
#endif |
typedef R (*InFunc)(P1,P2); |
typedef RType (*Func)(P1,P2); |
typedef Slot2<R,P1,P2> SlotType; |
typedef CallDataFunc<typename SlotType::Func,Func> CallData; |
static RType callback(void* data,P1 p1,P2 p2) |
{ |
return (((CallData*)data)->func)(p1,p2); |
} |
static SlotData* create(InFunc func) |
{ |
SlotData* tmp=manage(new SlotData()); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.func=(Func)func; |
return tmp; |
} |
}; |
#ifndef SIGC_CXX_VOID_RETURN |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template <class P1,class P2> |
struct FuncSlot2_<void,P1,P2> |
{ |
typedef void RType; |
typedef void (*InFunc)(P1,P2); |
typedef RType (*Func)(P1,P2); |
typedef Slot2<void,P1,P2> SlotType; |
typedef CallDataFunc<typename SlotType::Func,Func> CallData; |
static RType callback(void* data,P1 p1,P2 p2) |
{ |
(((CallData*)data)->func)(p1,p2); |
} |
static SlotData* create(InFunc func) |
{ |
SlotData* tmp=manage(new SlotData()); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.func=(Func)func; |
return tmp; |
} |
}; |
#endif |
#endif |
template <class R,class P1,class P2> |
inline Slot2<R,P1,P2> |
slot(R (*func)(P1,P2)) |
{ |
return FuncSlot2_<R,P1,P2>::create(func); |
} |
/**************************************************************** |
***** Function Slot 3 |
****************************************************************/ |
template <class R,class P1,class P2,class P3> |
struct FuncSlot3_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef R RType; |
#else |
typedef typename Trait<R>::type RType; |
#endif |
typedef R (*InFunc)(P1,P2,P3); |
typedef RType (*Func)(P1,P2,P3); |
typedef Slot3<R,P1,P2,P3> SlotType; |
typedef CallDataFunc<typename SlotType::Func,Func> CallData; |
static RType callback(void* data,P1 p1,P2 p2,P3 p3) |
{ |
return (((CallData*)data)->func)(p1,p2,p3); |
} |
static SlotData* create(InFunc func) |
{ |
SlotData* tmp=manage(new SlotData()); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.func=(Func)func; |
return tmp; |
} |
}; |
#ifndef SIGC_CXX_VOID_RETURN |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template <class P1,class P2,class P3> |
struct FuncSlot3_<void,P1,P2,P3> |
{ |
typedef void RType; |
typedef void (*InFunc)(P1,P2,P3); |
typedef RType (*Func)(P1,P2,P3); |
typedef Slot3<void,P1,P2,P3> SlotType; |
typedef CallDataFunc<typename SlotType::Func,Func> CallData; |
static RType callback(void* data,P1 p1,P2 p2,P3 p3) |
{ |
(((CallData*)data)->func)(p1,p2,p3); |
} |
static SlotData* create(InFunc func) |
{ |
SlotData* tmp=manage(new SlotData()); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.func=(Func)func; |
return tmp; |
} |
}; |
#endif |
#endif |
template <class R,class P1,class P2,class P3> |
inline Slot3<R,P1,P2,P3> |
slot(R (*func)(P1,P2,P3)) |
{ |
return FuncSlot3_<R,P1,P2,P3>::create(func); |
} |
/**************************************************************** |
***** Function Slot 4 |
****************************************************************/ |
template <class R,class P1,class P2,class P3,class P4> |
struct FuncSlot4_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef R RType; |
#else |
typedef typename Trait<R>::type RType; |
#endif |
typedef R (*InFunc)(P1,P2,P3,P4); |
typedef RType (*Func)(P1,P2,P3,P4); |
typedef Slot4<R,P1,P2,P3,P4> SlotType; |
typedef CallDataFunc<typename SlotType::Func,Func> CallData; |
static RType callback(void* data,P1 p1,P2 p2,P3 p3,P4 p4) |
{ |
return (((CallData*)data)->func)(p1,p2,p3,p4); |
} |
static SlotData* create(InFunc func) |
{ |
SlotData* tmp=manage(new SlotData()); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.func=(Func)func; |
return tmp; |
} |
}; |
#ifndef SIGC_CXX_VOID_RETURN |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template <class P1,class P2,class P3,class P4> |
struct FuncSlot4_<void,P1,P2,P3,P4> |
{ |
typedef void RType; |
typedef void (*InFunc)(P1,P2,P3,P4); |
typedef RType (*Func)(P1,P2,P3,P4); |
typedef Slot4<void,P1,P2,P3,P4> SlotType; |
typedef CallDataFunc<typename SlotType::Func,Func> CallData; |
static RType callback(void* data,P1 p1,P2 p2,P3 p3,P4 p4) |
{ |
(((CallData*)data)->func)(p1,p2,p3,p4); |
} |
static SlotData* create(InFunc func) |
{ |
SlotData* tmp=manage(new SlotData()); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.func=(Func)func; |
return tmp; |
} |
}; |
#endif |
#endif |
template <class R,class P1,class P2,class P3,class P4> |
inline Slot4<R,P1,P2,P3,P4> |
slot(R (*func)(P1,P2,P3,P4)) |
{ |
return FuncSlot4_<R,P1,P2,P3,P4>::create(func); |
} |
/**************************************************************** |
***** Function Slot 5 |
****************************************************************/ |
template <class R,class P1,class P2,class P3,class P4,class P5> |
struct FuncSlot5_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef R RType; |
#else |
typedef typename Trait<R>::type RType; |
#endif |
typedef R (*InFunc)(P1,P2,P3,P4,P5); |
typedef RType (*Func)(P1,P2,P3,P4,P5); |
typedef Slot5<R,P1,P2,P3,P4,P5> SlotType; |
typedef CallDataFunc<typename SlotType::Func,Func> CallData; |
static RType callback(void* data,P1 p1,P2 p2,P3 p3,P4 p4,P5 p5) |
{ |
return (((CallData*)data)->func)(p1,p2,p3,p4,p5); |
} |
static SlotData* create(InFunc func) |
{ |
SlotData* tmp=manage(new SlotData()); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.func=(Func)func; |
return tmp; |
} |
}; |
#ifndef SIGC_CXX_VOID_RETURN |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template <class P1,class P2,class P3,class P4,class P5> |
struct FuncSlot5_<void,P1,P2,P3,P4,P5> |
{ |
typedef void RType; |
typedef void (*InFunc)(P1,P2,P3,P4,P5); |
typedef RType (*Func)(P1,P2,P3,P4,P5); |
typedef Slot5<void,P1,P2,P3,P4,P5> SlotType; |
typedef CallDataFunc<typename SlotType::Func,Func> CallData; |
static RType callback(void* data,P1 p1,P2 p2,P3 p3,P4 p4,P5 p5) |
{ |
(((CallData*)data)->func)(p1,p2,p3,p4,p5); |
} |
static SlotData* create(InFunc func) |
{ |
SlotData* tmp=manage(new SlotData()); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.func=(Func)func; |
return tmp; |
} |
}; |
#endif |
#endif |
template <class R,class P1,class P2,class P3,class P4,class P5> |
inline Slot5<R,P1,P2,P3,P4,P5> |
slot(R (*func)(P1,P2,P3,P4,P5)) |
{ |
return FuncSlot5_<R,P1,P2,P3,P4,P5>::create(func); |
} |
/**************************************************************** |
***** Function Slot 6 |
****************************************************************/ |
template <class R,class P1,class P2,class P3,class P4,class P5,class P6> |
struct FuncSlot6_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef R RType; |
#else |
typedef typename Trait<R>::type RType; |
#endif |
typedef R (*InFunc)(P1,P2,P3,P4,P5,P6); |
typedef RType (*Func)(P1,P2,P3,P4,P5,P6); |
typedef Slot6<R,P1,P2,P3,P4,P5,P6> SlotType; |
typedef CallDataFunc<typename SlotType::Func,Func> CallData; |
static RType callback(void* data,P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6) |
{ |
return (((CallData*)data)->func)(p1,p2,p3,p4,p5,p6); |
} |
static SlotData* create(InFunc func) |
{ |
SlotData* tmp=manage(new SlotData()); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.func=(Func)func; |
return tmp; |
} |
}; |
#ifndef SIGC_CXX_VOID_RETURN |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template <class P1,class P2,class P3,class P4,class P5,class P6> |
struct FuncSlot6_<void,P1,P2,P3,P4,P5,P6> |
{ |
typedef void RType; |
typedef void (*InFunc)(P1,P2,P3,P4,P5,P6); |
typedef RType (*Func)(P1,P2,P3,P4,P5,P6); |
typedef Slot6<void,P1,P2,P3,P4,P5,P6> SlotType; |
typedef CallDataFunc<typename SlotType::Func,Func> CallData; |
static RType callback(void* data,P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6) |
{ |
(((CallData*)data)->func)(p1,p2,p3,p4,p5,p6); |
} |
static SlotData* create(InFunc func) |
{ |
SlotData* tmp=manage(new SlotData()); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.func=(Func)func; |
return tmp; |
} |
}; |
#endif |
#endif |
template <class R,class P1,class P2,class P3,class P4,class P5,class P6> |
inline Slot6<R,P1,P2,P3,P4,P5,P6> |
slot(R (*func)(P1,P2,P3,P4,P5,P6)) |
{ |
return FuncSlot6_<R,P1,P2,P3,P4,P5,P6>::create(func); |
} |
/**************************************************************** |
***** Function Slot 7 |
****************************************************************/ |
template <class R,class P1,class P2,class P3,class P4,class P5,class P6,class P7> |
struct FuncSlot7_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef R RType; |
#else |
typedef typename Trait<R>::type RType; |
#endif |
typedef R (*InFunc)(P1,P2,P3,P4,P5,P6,P7); |
typedef RType (*Func)(P1,P2,P3,P4,P5,P6,P7); |
typedef Slot7<R,P1,P2,P3,P4,P5,P6,P7> SlotType; |
typedef CallDataFunc<typename SlotType::Func,Func> CallData; |
static RType callback(void* data,P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7) |
{ |
return (((CallData*)data)->func)(p1,p2,p3,p4,p5,p6,p7); |
} |
static SlotData* create(InFunc func) |
{ |
SlotData* tmp=manage(new SlotData()); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.func=(Func)func; |
return tmp; |
} |
}; |
#ifndef SIGC_CXX_VOID_RETURN |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template <class P1,class P2,class P3,class P4,class P5,class P6,class P7> |
struct FuncSlot7_<void,P1,P2,P3,P4,P5,P6,P7> |
{ |
typedef void RType; |
typedef void (*InFunc)(P1,P2,P3,P4,P5,P6,P7); |
typedef RType (*Func)(P1,P2,P3,P4,P5,P6,P7); |
typedef Slot7<void,P1,P2,P3,P4,P5,P6,P7> SlotType; |
typedef CallDataFunc<typename SlotType::Func,Func> CallData; |
static RType callback(void* data,P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7) |
{ |
(((CallData*)data)->func)(p1,p2,p3,p4,p5,p6,p7); |
} |
static SlotData* create(InFunc func) |
{ |
SlotData* tmp=manage(new SlotData()); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.func=(Func)func; |
return tmp; |
} |
}; |
#endif |
#endif |
template <class R,class P1,class P2,class P3,class P4,class P5,class P6,class P7> |
inline Slot7<R,P1,P2,P3,P4,P5,P6,P7> |
slot(R (*func)(P1,P2,P3,P4,P5,P6,P7)) |
{ |
return FuncSlot7_<R,P1,P2,P3,P4,P5,P6,P7>::create(func); |
} |
#ifdef SIGC_CXX_NAMESPACES |
} // namespace |
#endif |
#endif // SIGCXX_FUNC_SLOT_H |
/contrib/media/updf/include/sigc++/generator.h |
---|
0,0 → 1,159 |
#ifndef SIGCXX_GENERATOR_H |
#define SIGCXX_GENERATOR_H |
#include <sigc++config.h> |
#include <new> |
#ifdef SIGC_CXX_NAMESPACES |
namespace SigC |
{ |
#endif |
// 0 |
template <class T> |
T* gen() |
{return manage(new T());} |
// 1 |
template <class T,class P1> |
T* gen(const P1& p1) |
{return manage(new T(p1));} |
template <class T,class P1> |
T* gen(P1& p1) |
{return manage(new T(p1));} |
// 2 |
template <class T,class P1,class P2> |
T* gen(const P1& p1,const P2& p2) |
{return manage(new T(p1,p2));} |
template <class T,class P1,class P2> |
T* gen(P1& p1,const P2& p2) |
{return manage(new T(p1,p2));} |
template <class T,class P1,class P2> |
T* gen(const P1& p1,P2& p2) |
{return manage(new T(p1,p2));} |
template <class T,class P1,class P2> |
T* gen(P1& p1,P2& p2) |
{return manage(new T(p1,p2));} |
// 3 |
template <class T,class P1,class P2,class P3> |
T* gen(const P1& p1,const P2& p2,const P3& p3) |
{return manage(new T(p1,p2,p3));} |
template <class T,class P1,class P2,class P3> |
T* gen(P1& p1,const P2& p2,const P3& p3) |
{return manage(new T(p1,p2,p3));} |
template <class T,class P1,class P2,class P3> |
T* gen(const P1& p1,P2& p2,const P3& p3) |
{return manage(new T(p1,p2,p3));} |
template <class T,class P1,class P2,class P3> |
T* gen(const P1& p1,const P2& p2,P3& p3) |
{return manage(new T(p1,p2,p3));} |
template <class T,class P1,class P2,class P3> |
T* gen(const P1& p1,P2& p2,P3& p3) |
{return manage(new T(p1,p2,p3));} |
template <class T,class P1,class P2,class P3> |
T* gen(P1& p1,const P2& p2,P3& p3) |
{return manage(new T(p1,p2,p3));} |
template <class T,class P1,class P2,class P3> |
T* gen(P1& p1,P2& p2,const P3& p3) |
{return manage(new T(p1,p2,p3));} |
template <class T,class P1,class P2,class P3> |
T* gen(P1& p1,P2& p2,P3& p3) |
{return manage(new T(p1,p2,p3));} |
// 4 |
template <class T,class P1,class P2,class P3,class P4> |
T* gen(const P1& p1,const P2& p2,const P3& p3,const P4& p4) |
{return manage(new T(p1,p2,p3,p4));} |
template <class T,class P1,class P2,class P3,class P4> |
T* gen(P1& p1,const P2& p2,const P3& p3,const P4& p4) |
{return manage(new T(p1,p2,p3,p4));} |
template <class T,class P1,class P2,class P3,class P4> |
T* gen(const P1& p1,P2& p2,const P3& p3,const P4& p4) |
{return manage(new T(p1,p2,p3,p4));} |
template <class T,class P1,class P2,class P3,class P4> |
T* gen(const P1& p1,const P2& p2,P3& p3,const P4& p4) |
{return manage(new T(p1,p2,p3,p4));} |
template <class T,class P1,class P2,class P3,class P4> |
T* gen(const P1& p1,const P2& p2,const P3& p3,P4& p4) |
{return manage(new T(p1,p2,p3,p4));} |
template <class T,class P1,class P2,class P3,class P4> |
T* gen(const P1& p1,P2& p2,P3& p3,P4& p4) |
{return manage(new T(p1,p2,p3,p4));} |
template <class T,class P1,class P2,class P3,class P4> |
T* gen(P1& p1,const P2& p2,P3& p3,P4& p4) |
{return manage(new T(p1,p2,p3,p4));} |
template <class T,class P1,class P2,class P3,class P4> |
T* gen(P1& p1,P2& p2,const P3& p3,P4& p4) |
{return manage(new T(p1,p2,p3,p4));} |
template <class T,class P1,class P2,class P3,class P4> |
T* gen(P1& p1,P2& p2,P3& p3,const P4& p4) |
{return manage(new T(p1,p2,p3,p4));} |
template <class T,class P1,class P2,class P3,class P4> |
T* gen(const P1& p1,const P2& p2,P3& p3,P4& p4) |
{return manage(new T(p1,p2,p3,p4));} |
template <class T,class P1,class P2,class P3,class P4> |
T* gen(const P1& p1,P2& p2,const P3& p3,P4& p4) |
{return manage(new T(p1,p2,p3,p4));} |
template <class T,class P1,class P2,class P3,class P4> |
T* gen(const P1& p1,P2& p2,P3& p3,const P4& p4) |
{return manage(new T(p1,p2,p3,p4));} |
template <class T,class P1,class P2,class P3,class P4> |
T* gen(P1& p1,const P2& p2,const P3& p3,P4& p4) |
{return manage(new T(p1,p2,p3,p4));} |
template <class T,class P1,class P2,class P3,class P4> |
T* gen(P1& p1,const P2& p2,P3& p3,const P4& p4) |
{return manage(new T(p1,p2,p3,p4));} |
template <class T,class P1,class P2,class P3,class P4> |
T* gen(P1& p1,P2& p2,const P3& p3,const P4& p4) |
{return manage(new T(p1,p2,p3,p4));} |
template <class T,class P1,class P2,class P3,class P4> |
T* gen(P1& p1,P2& p2,P3& p3,P4& p4) |
{return manage(new T(p1,p2,p3,p4));} |
//From here one we will just generate warnings |
template <class T,class P1,class P2,class P3,class P4,class P5> |
T* gen(P1& p1,P2& p2,P3& p3,P4& p4,P5& p5) |
{return manage(new T(p1,p2,p3,p4,p5));} |
template <class T,class P1,class P2,class P3,class P4,class P5,class P6> |
T* gen(P1& p1,P2& p2,P3& p3,P4& p4,P5& p5,P6& p6) |
{return manage(new T(p1,p2,p3,p4,p5,p6));} |
template <class T,class P1,class P2,class P3,class P4,class P5,class P6,class P7> |
T* gen(P1& p1,P2& p2,P3& p3,P4& p4,P5& p5,P6& p6,P7& p7) |
{return manage(new T(p1,p2,p3,p4,p5,p6,p7));} |
#ifdef SIGC_CXX_NAMESPACES |
} // namespace sigc |
#endif |
#endif |
/contrib/media/updf/include/sigc++/handle.h |
---|
0,0 → 1,113 |
#ifndef SIGCXX_HANDLE_H |
#define SIGCXX_HANDLE_H |
#include <sigc++config.h> |
#ifdef SIGC_CXX_NAMESPACES |
namespace SigC |
{ |
#endif |
// Signiture for Handles |
template <class Obj,class Scope_> |
class Handle |
{ |
protected: |
Scope_ scope_; |
public: |
// access |
Obj* obj() |
{ |
return static_cast<Obj*>(scope_.cache()); |
} |
Obj* obj() const |
{ |
return static_cast<Obj*>(scope_.cache()); |
} |
bool connected() const |
{return (scope_.object()!=0);} |
operator Obj*() |
{return (obj());} |
operator Obj*() const |
{return (obj());} |
Obj& operator*() const |
{return *(obj());} |
Obj* operator->() const |
{return (obj());} |
Scope_& scope() |
{return scope_;} |
const Scope_& scope() const |
{return scope_;} |
void disconnect() |
{scope_.disconnect(0);} |
// copy |
Handle& operator =(Obj* obj) |
{scope_.set(obj,obj,true); return *this;} |
Handle& operator =(Obj& obj) |
{scope_.set(&obj,&obj,false); return *this;} |
#ifndef SIGC_CXX_TEMPLATE_CCTOR |
Handle& operator =(const Handle& handle) |
{ |
Obj *o=handle.obj(); |
scope_.set(o,o,false); |
return *this; |
} |
#endif |
template <class Obj2,class Scope2> |
Handle& operator = (const Handle<Obj2,Scope2>& handle) |
{ |
Obj *o=handle.obj(); |
scope_.set(o,o,false); |
return *this; |
} |
// construct |
Handle():scope_() {} |
Handle(Obj *obj):scope_() {scope_.set(obj,obj,true);} |
Handle(Obj &obj):scope_() {scope_.set(&obj,&obj,false);} |
#ifndef SIGC_CXX_TEMPLATE_CCTOR |
Handle(const Handle& handle) |
:scope_() |
{ |
Obj *o=handle.obj(); |
scope_.set(o,o,false); |
} |
#endif |
template <class Obj2,class Scope2> |
Handle(const Handle<Obj2,Scope2>& handle) |
:scope_() |
{ |
Obj *o=handle.obj(); |
scope_.set(o,o,false); |
} |
}; |
#define HANDLE_CTORS(X,T,P) \ |
public: \ |
X(T *t):Handle<T,P>(t) {} \ |
X(T &t):Handle<T,P>(t) {} \ |
template <class T2,class P2> \ |
X(const Handle<T2,P2> &h):Handle<T,P>(h) {} \ |
X& operator =(T *t) \ |
{return Handle<T,P>::operator=(t);} \ |
X& operator =(T &t) \ |
{return Handle<T,P>::operator=(t);} \ |
template <class T2,class P2> \ |
X& operator =(const Handle<T2,P2> &t) \ |
{return Handle<T,P>::operator=(t);} |
//template <class T> |
// class Ref:public Handle<T,Scopes::RefCount> |
// { |
// HANDLE_CTORS(Ref,T,Scopes::RefCount) |
// }; |
#ifdef SIGC_CXX_NAMESPACES |
} // namespace |
#endif |
#endif |
/contrib/media/updf/include/sigc++/handle_system.h |
---|
0,0 → 1,4 |
#include <sigc++/object.h> |
#include <sigc++/scope.h> |
#include <sigc++/handle.h> |
/contrib/media/updf/include/sigc++/marshal.h |
---|
0,0 → 1,205 |
#ifndef SIGCXX_MARSHALLER_H |
#define SIGCXX_MARSHALLER_H |
#include <sigc++config.h> |
#ifndef SIGC_CXX_PARTIAL_SPEC |
#include <sigc++/slot.h> |
#endif |
#ifdef SIGC_PTHREADS |
#include <sigc++/thread.h> |
#endif |
#ifdef SIGC_CXX_NAMESPACES |
namespace SigC |
{ |
#endif |
/* |
All classes used to marshal return values should have the following |
class SomeMarshal |
{ |
// both typedefs must be defined. |
typedef Type1 InType; |
typedef Type2 OutType; |
public: |
// Return final return code. |
OutType value(); |
// Captures return codes and returns TRUE to stop emittion. |
bool marshal(const InType&); |
SomeMarshal(); |
}; |
It is not necessary for the InType to match the OutType. |
This is to allow for things like list capturing. |
*/ |
/******************************************************************* |
***** Marshal |
*******************************************************************/ |
// A struct that holds an flag for determining |
// if the return value is to be ignored. |
class LIBSIGC_API RetCode |
{ |
public: |
static int check_ignore(); |
static void ignore(); |
}; |
// Basic Marshal class. |
template <typename R> |
class Marshal |
{ |
public: |
typedef R OutType; |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef R InType; |
protected: |
typedef OutType OutType_; |
#else |
typedef Trait<R>::type InType; |
protected: |
typedef InType OutType_; |
#endif |
OutType_ value_; |
public: |
OutType_& value() {return value_;} |
static OutType_ default_value() |
#ifdef SIGC_CXX_INT_CTOR |
{return OutType_();} |
#else |
{OutType_ r; new (&r) OutType_(); return r;} |
#endif |
// This captures return values. Return TRUE to stop emittion process. |
bool marshal(const InType& newval) |
{ |
if (!RetCode::check_ignore()) value_=newval; |
return 0; // continue emittion process |
}; |
Marshal() |
#ifdef SIGC_CXX_INT_CTOR |
:value_() |
{RetCode::check_ignore();} |
#else |
{ |
RetCode::check_ignore(); |
new (&value_) OutType_(); |
} |
#endif |
}; |
#ifdef SIGC_CXX_SPECIALIZE_REFERENCES |
// Basic Marshal class. |
template <typename R> |
class Marshal<R&> |
{ |
public: |
typedef R& OutType; |
typedef R& InType; |
R* value_; |
OutType value() {return value_;} |
static OutType default_value() {return Default;} |
static R Default; |
// This captures return values. Return TRUE to stop emittion process. |
bool marshal(InType newval) |
{ |
if (!RetCode::check_ignore()) value_=&newval; |
return 0; // continue emittion process |
}; |
Marshal() |
:value_(&Default) |
{RetCode::check_ignore();} |
~Marshal() |
{} |
}; |
template <typename T> T Marshal<T&>::Default; |
#endif |
#ifdef SIGC_CXX_PARTIAL_SPEC |
// dummy marshaller for void type. |
template <> |
class Marshal<void> |
{ |
public: |
Marshal() |
{} |
~Marshal() |
{} |
}; |
#endif |
// starts with a fixed value |
template <class R,R initial> |
class FixedMarshal |
{ |
public: |
typedef R OutType; |
typedef R InType; |
R value_; |
OutType& value() {return value_;} |
static OutType default_value() { return initial; } |
bool marshal(const InType& newval) |
{ |
if (!RetCode::check_ignore()) value_=newval; |
return 0; // continue emittion process |
}; |
FixedMarshal() |
:value_(initial) |
{RetCode::check_ignore();} |
~FixedMarshal() |
{} |
}; |
template <class R> |
struct FastMarshal |
{ |
typedef R OutType; |
typedef R InType; |
R value_; |
OutType& value() {return value_;} |
static OutType default_value() |
#ifdef SIGC_CXX_INT_CTOR |
{return R();} |
#else |
{R r; new (&r) R(); return r;} |
#endif |
bool marshal(const InType& newval) |
{ |
value_=newval; |
return 0; // continue emittion process |
}; |
FastMarshal() |
#ifdef SIGC_CXX_INT_CTOR |
:value_() |
{} |
#else |
{new (&value_) R();} |
#endif |
~FastMarshal() |
{} |
}; |
#ifdef SIGC_CXX_NAMESPACES |
} // namespace sigc |
#endif |
#endif |
/contrib/media/updf/include/sigc++/object.h |
---|
0,0 → 1,153 |
// -*- c++ -*- |
/* |
* Copyright 1999 Karl Nelson <kenelson@ece.ucdavis.edu> |
* |
* This library is free software; you can redistribute it and/or |
* modify it under the terms of the GNU Library General Public |
* License as published by the Free Software Foundation; either |
* version 2 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 the GNU |
* Library General Public License for more details. |
* |
* You should have received a copy of the GNU Library General Public |
* License along with this library; if not, write to the Free |
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
*/ |
#ifndef SIGCXX_OBJECT_H |
#define SIGCXX_OBJECT_H |
#include <sigc++config.h> |
#include <sigc++/scope.h> |
#ifdef SIGC_CXX_NAMESPACES |
namespace SigC |
{ |
#endif |
extern int sigc_micro_version; |
extern int sigc_minor_version; |
extern int sigc_major_version; |
class Invalid_; |
class LIBSIGC_API ObjectReferenced |
{ |
friend class Reference; |
friend class Scope; |
friend class Invalid_; |
#ifdef SIGC_CXX_FRIEND_TEMPLATES |
template <class T> |
friend T* manage(T*); |
#endif |
protected: |
// count of current references |
unsigned int obj_count_ :24; |
// indicates object generated through an interface that marks dynamic |
unsigned int obj_dynamic_ :1; |
// indicates the pointed to scope is the owner |
unsigned int obj_owned_ :1; |
// indicates object not will delete when count reachs zero |
unsigned int obj_floating_ :1; |
// indicates the owned scope is surrendering ownership |
unsigned int obj_transfer_ :1; |
// indicates the object is doing a list clean up |
unsigned int obj_invalid_ :1; |
// indicates the object been destroyed |
unsigned int obj_destroyed_ :1; |
// indicates there is a weak reference |
unsigned int obj_weak_ :1; |
/*************************************************************/ |
#ifdef SIGC_CXX_FRIEND_TEMPLATES |
protected: |
#else |
public: |
#endif |
// For the controller and scope |
virtual void set_dynamic(); |
inline void set_sink() {obj_floating_=0;} |
protected: |
inline void register_ref(Reference *) |
{ |
if (obj_transfer_) |
{ |
obj_transfer_=0; |
obj_owned_=0; |
} |
} |
public: |
virtual void reference(); |
virtual void unreference(); |
inline bool is_dynamic() {return obj_dynamic_;} |
inline bool is_floating() {return obj_floating_;} |
ObjectReferenced(); |
virtual ~ObjectReferenced(); |
}; |
class LIBSIGC_API ObjectScoped :public ObjectReferenced |
{ |
friend class Scope; |
typedef ScopeList List_; |
private: |
mutable List_ list_; |
// interface for scopes |
void register_scope(Scope *scope,const Scope *parent=0); |
void unregister_scope(Scope *scope); |
protected: |
// This sets a very weak reference which is removed at next invalid |
void set_weak(); |
public: |
void register_data(ScopeNode* data); |
// inform connections that object wishs to delete |
void invalid(bool destroy=0); |
ObjectScoped(); |
virtual ~ObjectScoped(); |
}; |
// There can only be one Scope_Object per any object |
class LIBSIGC_API Object: public virtual ObjectScoped |
{ |
public: |
Object() {} |
virtual ~Object(); |
}; |
// mark this a managable object |
template <class T> |
inline T* manage(T* t) |
{ |
if (t) t->set_dynamic(); |
return t; |
} |
#ifdef SIGC_CXX_NAMESPACES |
} // namespace |
#endif |
#endif |
/contrib/media/updf/include/sigc++/object_slot.h |
---|
0,0 → 1,818 |
// -*- c++ -*- |
/* This is a generated file, do not edit. Generated from ../sigc++/macros/object_slot.h.m4 */ |
#ifndef SIGCXX_OBJECT_SLOT_H |
#define SIGCXX_OBJECT_SLOT_H |
/* |
SigC::slot() (obj) |
----------------------- |
slot() can be applied to a object method to form a Slot with a |
profile equivelent to the method. At the same time an instance |
of that object must be specified. The object must be derived |
from SigC::Object. |
Sample usage: |
struct A: public SigC::Object |
{ |
void foo(int,int); |
} a; |
Slot2<void,int,int> s=slot(a,&A::foo); |
*/ |
#include <sigc++/slot.h> |
#include <sigc++/scope.h> |
#ifdef SIGC_CXX_NAMESPACES |
namespace SigC |
{ |
#endif |
/**************************************************************** |
***** Object Slot 0 |
****************************************************************/ |
template <class R,class Obj> |
struct ObjectSlot0_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef R RType; |
#else |
typedef typename Trait<R>::type RType; |
#endif |
typedef R (Obj::*InFunc)(); |
typedef RType (Obj::*Func)(); |
typedef Slot0<R> SlotType; |
typedef CallDataObj3<typename SlotType::Func,Obj,Func> CallData; |
static RType callback(void* d) |
{ |
CallData* data=(CallData*)d; |
return ((data->obj)->*(data->func))(); |
} |
static SlotData* create(Obj* obj,InFunc func) |
{ |
if (!obj) return 0; |
SlotData* tmp=manage(new SlotData()); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.obj=obj; |
data.func=(Func)func; |
obj->register_data(tmp->receiver()); |
return tmp; |
} |
}; |
#ifndef SIGC_CXX_VOID_RETURN |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template <class Obj> |
struct ObjectSlot0_<void,Obj> |
{ |
typedef void RType; |
typedef void (Obj::*InFunc)(); |
typedef RType (Obj::*Func)(); |
typedef Slot0<void> SlotType; |
typedef CallDataObj3<typename SlotType::Func,Obj,Func> CallData; |
static RType callback(void* d) |
{ |
CallData* data=(CallData*)d; |
((data->obj)->*(data->func))(); |
} |
static SlotData* create(Obj* obj,InFunc func) |
{ |
if (!obj) return 0; |
SlotData* tmp=manage(new SlotData()); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.obj=obj; |
data.func=(Func)func; |
obj->register_data(tmp->receiver()); |
return tmp; |
} |
}; |
#endif |
#endif |
template <class R,class O,class O2> |
inline Slot0<R> |
slot(O* &obj,R (O2::*func)()) |
{ |
return ObjectSlot0_<R,O2> |
::create(obj,func); |
} |
template <class R,class O,class O2> |
inline Slot0<R> |
slot(O* const &obj,R (O2::*func)()) |
{ |
return ObjectSlot0_<R,O2> |
::create(obj,func); |
} |
template <class R,class O,class O2> |
inline Slot0<R> |
slot(O &obj,R (O2::*func)()) |
{ |
return ObjectSlot0_<R,O2> |
::create(&obj,func); |
} |
/**************************************************************** |
***** Object Slot 1 |
****************************************************************/ |
template <class R,class P1,class Obj> |
struct ObjectSlot1_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef R RType; |
#else |
typedef typename Trait<R>::type RType; |
#endif |
typedef R (Obj::*InFunc)(P1); |
typedef RType (Obj::*Func)(P1); |
typedef Slot1<R,P1> SlotType; |
typedef CallDataObj3<typename SlotType::Func,Obj,Func> CallData; |
static RType callback(void* d,P1 p1) |
{ |
CallData* data=(CallData*)d; |
return ((data->obj)->*(data->func))(p1); |
} |
static SlotData* create(Obj* obj,InFunc func) |
{ |
if (!obj) return 0; |
SlotData* tmp=manage(new SlotData()); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.obj=obj; |
data.func=(Func)func; |
obj->register_data(tmp->receiver()); |
return tmp; |
} |
}; |
#ifndef SIGC_CXX_VOID_RETURN |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template <class P1,class Obj> |
struct ObjectSlot1_<void,P1,Obj> |
{ |
typedef void RType; |
typedef void (Obj::*InFunc)(P1); |
typedef RType (Obj::*Func)(P1); |
typedef Slot1<void,P1> SlotType; |
typedef CallDataObj3<typename SlotType::Func,Obj,Func> CallData; |
static RType callback(void* d,P1 p1) |
{ |
CallData* data=(CallData*)d; |
((data->obj)->*(data->func))(p1); |
} |
static SlotData* create(Obj* obj,InFunc func) |
{ |
if (!obj) return 0; |
SlotData* tmp=manage(new SlotData()); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.obj=obj; |
data.func=(Func)func; |
obj->register_data(tmp->receiver()); |
return tmp; |
} |
}; |
#endif |
#endif |
template <class R,class P1,class O,class O2> |
inline Slot1<R,P1> |
slot(O* &obj,R (O2::*func)(P1)) |
{ |
return ObjectSlot1_<R,P1,O2> |
::create(obj,func); |
} |
template <class R,class P1,class O,class O2> |
inline Slot1<R,P1> |
slot(O* const &obj,R (O2::*func)(P1)) |
{ |
return ObjectSlot1_<R,P1,O2> |
::create(obj,func); |
} |
template <class R,class P1,class O,class O2> |
inline Slot1<R,P1> |
slot(O &obj,R (O2::*func)(P1)) |
{ |
return ObjectSlot1_<R,P1,O2> |
::create(&obj,func); |
} |
/**************************************************************** |
***** Object Slot 2 |
****************************************************************/ |
template <class R,class P1,class P2,class Obj> |
struct ObjectSlot2_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef R RType; |
#else |
typedef typename Trait<R>::type RType; |
#endif |
typedef R (Obj::*InFunc)(P1,P2); |
typedef RType (Obj::*Func)(P1,P2); |
typedef Slot2<R,P1,P2> SlotType; |
typedef CallDataObj3<typename SlotType::Func,Obj,Func> CallData; |
static RType callback(void* d,P1 p1,P2 p2) |
{ |
CallData* data=(CallData*)d; |
return ((data->obj)->*(data->func))(p1,p2); |
} |
static SlotData* create(Obj* obj,InFunc func) |
{ |
if (!obj) return 0; |
SlotData* tmp=manage(new SlotData()); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.obj=obj; |
data.func=(Func)func; |
obj->register_data(tmp->receiver()); |
return tmp; |
} |
}; |
#ifndef SIGC_CXX_VOID_RETURN |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template <class P1,class P2,class Obj> |
struct ObjectSlot2_<void,P1,P2,Obj> |
{ |
typedef void RType; |
typedef void (Obj::*InFunc)(P1,P2); |
typedef RType (Obj::*Func)(P1,P2); |
typedef Slot2<void,P1,P2> SlotType; |
typedef CallDataObj3<typename SlotType::Func,Obj,Func> CallData; |
static RType callback(void* d,P1 p1,P2 p2) |
{ |
CallData* data=(CallData*)d; |
((data->obj)->*(data->func))(p1,p2); |
} |
static SlotData* create(Obj* obj,InFunc func) |
{ |
if (!obj) return 0; |
SlotData* tmp=manage(new SlotData()); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.obj=obj; |
data.func=(Func)func; |
obj->register_data(tmp->receiver()); |
return tmp; |
} |
}; |
#endif |
#endif |
template <class R,class P1,class P2,class O,class O2> |
inline Slot2<R,P1,P2> |
slot(O* &obj,R (O2::*func)(P1,P2)) |
{ |
return ObjectSlot2_<R,P1,P2,O2> |
::create(obj,func); |
} |
template <class R,class P1,class P2,class O,class O2> |
inline Slot2<R,P1,P2> |
slot(O* const &obj,R (O2::*func)(P1,P2)) |
{ |
return ObjectSlot2_<R,P1,P2,O2> |
::create(obj,func); |
} |
template <class R,class P1,class P2,class O,class O2> |
inline Slot2<R,P1,P2> |
slot(O &obj,R (O2::*func)(P1,P2)) |
{ |
return ObjectSlot2_<R,P1,P2,O2> |
::create(&obj,func); |
} |
/**************************************************************** |
***** Object Slot 3 |
****************************************************************/ |
template <class R,class P1,class P2,class P3,class Obj> |
struct ObjectSlot3_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef R RType; |
#else |
typedef typename Trait<R>::type RType; |
#endif |
typedef R (Obj::*InFunc)(P1,P2,P3); |
typedef RType (Obj::*Func)(P1,P2,P3); |
typedef Slot3<R,P1,P2,P3> SlotType; |
typedef CallDataObj3<typename SlotType::Func,Obj,Func> CallData; |
static RType callback(void* d,P1 p1,P2 p2,P3 p3) |
{ |
CallData* data=(CallData*)d; |
return ((data->obj)->*(data->func))(p1,p2,p3); |
} |
static SlotData* create(Obj* obj,InFunc func) |
{ |
if (!obj) return 0; |
SlotData* tmp=manage(new SlotData()); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.obj=obj; |
data.func=(Func)func; |
obj->register_data(tmp->receiver()); |
return tmp; |
} |
}; |
#ifndef SIGC_CXX_VOID_RETURN |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template <class P1,class P2,class P3,class Obj> |
struct ObjectSlot3_<void,P1,P2,P3,Obj> |
{ |
typedef void RType; |
typedef void (Obj::*InFunc)(P1,P2,P3); |
typedef RType (Obj::*Func)(P1,P2,P3); |
typedef Slot3<void,P1,P2,P3> SlotType; |
typedef CallDataObj3<typename SlotType::Func,Obj,Func> CallData; |
static RType callback(void* d,P1 p1,P2 p2,P3 p3) |
{ |
CallData* data=(CallData*)d; |
((data->obj)->*(data->func))(p1,p2,p3); |
} |
static SlotData* create(Obj* obj,InFunc func) |
{ |
if (!obj) return 0; |
SlotData* tmp=manage(new SlotData()); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.obj=obj; |
data.func=(Func)func; |
obj->register_data(tmp->receiver()); |
return tmp; |
} |
}; |
#endif |
#endif |
template <class R,class P1,class P2,class P3,class O,class O2> |
inline Slot3<R,P1,P2,P3> |
slot(O* &obj,R (O2::*func)(P1,P2,P3)) |
{ |
return ObjectSlot3_<R,P1,P2,P3,O2> |
::create(obj,func); |
} |
template <class R,class P1,class P2,class P3,class O,class O2> |
inline Slot3<R,P1,P2,P3> |
slot(O* const &obj,R (O2::*func)(P1,P2,P3)) |
{ |
return ObjectSlot3_<R,P1,P2,P3,O2> |
::create(obj,func); |
} |
template <class R,class P1,class P2,class P3,class O,class O2> |
inline Slot3<R,P1,P2,P3> |
slot(O &obj,R (O2::*func)(P1,P2,P3)) |
{ |
return ObjectSlot3_<R,P1,P2,P3,O2> |
::create(&obj,func); |
} |
/**************************************************************** |
***** Object Slot 4 |
****************************************************************/ |
template <class R,class P1,class P2,class P3,class P4,class Obj> |
struct ObjectSlot4_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef R RType; |
#else |
typedef typename Trait<R>::type RType; |
#endif |
typedef R (Obj::*InFunc)(P1,P2,P3,P4); |
typedef RType (Obj::*Func)(P1,P2,P3,P4); |
typedef Slot4<R,P1,P2,P3,P4> SlotType; |
typedef CallDataObj3<typename SlotType::Func,Obj,Func> CallData; |
static RType callback(void* d,P1 p1,P2 p2,P3 p3,P4 p4) |
{ |
CallData* data=(CallData*)d; |
return ((data->obj)->*(data->func))(p1,p2,p3,p4); |
} |
static SlotData* create(Obj* obj,InFunc func) |
{ |
if (!obj) return 0; |
SlotData* tmp=manage(new SlotData()); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.obj=obj; |
data.func=(Func)func; |
obj->register_data(tmp->receiver()); |
return tmp; |
} |
}; |
#ifndef SIGC_CXX_VOID_RETURN |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template <class P1,class P2,class P3,class P4,class Obj> |
struct ObjectSlot4_<void,P1,P2,P3,P4,Obj> |
{ |
typedef void RType; |
typedef void (Obj::*InFunc)(P1,P2,P3,P4); |
typedef RType (Obj::*Func)(P1,P2,P3,P4); |
typedef Slot4<void,P1,P2,P3,P4> SlotType; |
typedef CallDataObj3<typename SlotType::Func,Obj,Func> CallData; |
static RType callback(void* d,P1 p1,P2 p2,P3 p3,P4 p4) |
{ |
CallData* data=(CallData*)d; |
((data->obj)->*(data->func))(p1,p2,p3,p4); |
} |
static SlotData* create(Obj* obj,InFunc func) |
{ |
if (!obj) return 0; |
SlotData* tmp=manage(new SlotData()); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.obj=obj; |
data.func=(Func)func; |
obj->register_data(tmp->receiver()); |
return tmp; |
} |
}; |
#endif |
#endif |
template <class R,class P1,class P2,class P3,class P4,class O,class O2> |
inline Slot4<R,P1,P2,P3,P4> |
slot(O* &obj,R (O2::*func)(P1,P2,P3,P4)) |
{ |
return ObjectSlot4_<R,P1,P2,P3,P4,O2> |
::create(obj,func); |
} |
template <class R,class P1,class P2,class P3,class P4,class O,class O2> |
inline Slot4<R,P1,P2,P3,P4> |
slot(O* const &obj,R (O2::*func)(P1,P2,P3,P4)) |
{ |
return ObjectSlot4_<R,P1,P2,P3,P4,O2> |
::create(obj,func); |
} |
template <class R,class P1,class P2,class P3,class P4,class O,class O2> |
inline Slot4<R,P1,P2,P3,P4> |
slot(O &obj,R (O2::*func)(P1,P2,P3,P4)) |
{ |
return ObjectSlot4_<R,P1,P2,P3,P4,O2> |
::create(&obj,func); |
} |
/**************************************************************** |
***** Object Slot 5 |
****************************************************************/ |
template <class R,class P1,class P2,class P3,class P4,class P5,class Obj> |
struct ObjectSlot5_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef R RType; |
#else |
typedef typename Trait<R>::type RType; |
#endif |
typedef R (Obj::*InFunc)(P1,P2,P3,P4,P5); |
typedef RType (Obj::*Func)(P1,P2,P3,P4,P5); |
typedef Slot5<R,P1,P2,P3,P4,P5> SlotType; |
typedef CallDataObj3<typename SlotType::Func,Obj,Func> CallData; |
static RType callback(void* d,P1 p1,P2 p2,P3 p3,P4 p4,P5 p5) |
{ |
CallData* data=(CallData*)d; |
return ((data->obj)->*(data->func))(p1,p2,p3,p4,p5); |
} |
static SlotData* create(Obj* obj,InFunc func) |
{ |
if (!obj) return 0; |
SlotData* tmp=manage(new SlotData()); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.obj=obj; |
data.func=(Func)func; |
obj->register_data(tmp->receiver()); |
return tmp; |
} |
}; |
#ifndef SIGC_CXX_VOID_RETURN |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template <class P1,class P2,class P3,class P4,class P5,class Obj> |
struct ObjectSlot5_<void,P1,P2,P3,P4,P5,Obj> |
{ |
typedef void RType; |
typedef void (Obj::*InFunc)(P1,P2,P3,P4,P5); |
typedef RType (Obj::*Func)(P1,P2,P3,P4,P5); |
typedef Slot5<void,P1,P2,P3,P4,P5> SlotType; |
typedef CallDataObj3<typename SlotType::Func,Obj,Func> CallData; |
static RType callback(void* d,P1 p1,P2 p2,P3 p3,P4 p4,P5 p5) |
{ |
CallData* data=(CallData*)d; |
((data->obj)->*(data->func))(p1,p2,p3,p4,p5); |
} |
static SlotData* create(Obj* obj,InFunc func) |
{ |
if (!obj) return 0; |
SlotData* tmp=manage(new SlotData()); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.obj=obj; |
data.func=(Func)func; |
obj->register_data(tmp->receiver()); |
return tmp; |
} |
}; |
#endif |
#endif |
template <class R,class P1,class P2,class P3,class P4,class P5,class O,class O2> |
inline Slot5<R,P1,P2,P3,P4,P5> |
slot(O* &obj,R (O2::*func)(P1,P2,P3,P4,P5)) |
{ |
return ObjectSlot5_<R,P1,P2,P3,P4,P5,O2> |
::create(obj,func); |
} |
template <class R,class P1,class P2,class P3,class P4,class P5,class O,class O2> |
inline Slot5<R,P1,P2,P3,P4,P5> |
slot(O* const &obj,R (O2::*func)(P1,P2,P3,P4,P5)) |
{ |
return ObjectSlot5_<R,P1,P2,P3,P4,P5,O2> |
::create(obj,func); |
} |
template <class R,class P1,class P2,class P3,class P4,class P5,class O,class O2> |
inline Slot5<R,P1,P2,P3,P4,P5> |
slot(O &obj,R (O2::*func)(P1,P2,P3,P4,P5)) |
{ |
return ObjectSlot5_<R,P1,P2,P3,P4,P5,O2> |
::create(&obj,func); |
} |
/**************************************************************** |
***** Object Slot 6 |
****************************************************************/ |
template <class R,class P1,class P2,class P3,class P4,class P5,class P6,class Obj> |
struct ObjectSlot6_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef R RType; |
#else |
typedef typename Trait<R>::type RType; |
#endif |
typedef R (Obj::*InFunc)(P1,P2,P3,P4,P5,P6); |
typedef RType (Obj::*Func)(P1,P2,P3,P4,P5,P6); |
typedef Slot6<R,P1,P2,P3,P4,P5,P6> SlotType; |
typedef CallDataObj3<typename SlotType::Func,Obj,Func> CallData; |
static RType callback(void* d,P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6) |
{ |
CallData* data=(CallData*)d; |
return ((data->obj)->*(data->func))(p1,p2,p3,p4,p5,p6); |
} |
static SlotData* create(Obj* obj,InFunc func) |
{ |
if (!obj) return 0; |
SlotData* tmp=manage(new SlotData()); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.obj=obj; |
data.func=(Func)func; |
obj->register_data(tmp->receiver()); |
return tmp; |
} |
}; |
#ifndef SIGC_CXX_VOID_RETURN |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template <class P1,class P2,class P3,class P4,class P5,class P6,class Obj> |
struct ObjectSlot6_<void,P1,P2,P3,P4,P5,P6,Obj> |
{ |
typedef void RType; |
typedef void (Obj::*InFunc)(P1,P2,P3,P4,P5,P6); |
typedef RType (Obj::*Func)(P1,P2,P3,P4,P5,P6); |
typedef Slot6<void,P1,P2,P3,P4,P5,P6> SlotType; |
typedef CallDataObj3<typename SlotType::Func,Obj,Func> CallData; |
static RType callback(void* d,P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6) |
{ |
CallData* data=(CallData*)d; |
((data->obj)->*(data->func))(p1,p2,p3,p4,p5,p6); |
} |
static SlotData* create(Obj* obj,InFunc func) |
{ |
if (!obj) return 0; |
SlotData* tmp=manage(new SlotData()); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.obj=obj; |
data.func=(Func)func; |
obj->register_data(tmp->receiver()); |
return tmp; |
} |
}; |
#endif |
#endif |
template <class R,class P1,class P2,class P3,class P4,class P5,class P6,class O,class O2> |
inline Slot6<R,P1,P2,P3,P4,P5,P6> |
slot(O* &obj,R (O2::*func)(P1,P2,P3,P4,P5,P6)) |
{ |
return ObjectSlot6_<R,P1,P2,P3,P4,P5,P6,O2> |
::create(obj,func); |
} |
template <class R,class P1,class P2,class P3,class P4,class P5,class P6,class O,class O2> |
inline Slot6<R,P1,P2,P3,P4,P5,P6> |
slot(O* const &obj,R (O2::*func)(P1,P2,P3,P4,P5,P6)) |
{ |
return ObjectSlot6_<R,P1,P2,P3,P4,P5,P6,O2> |
::create(obj,func); |
} |
template <class R,class P1,class P2,class P3,class P4,class P5,class P6,class O,class O2> |
inline Slot6<R,P1,P2,P3,P4,P5,P6> |
slot(O &obj,R (O2::*func)(P1,P2,P3,P4,P5,P6)) |
{ |
return ObjectSlot6_<R,P1,P2,P3,P4,P5,P6,O2> |
::create(&obj,func); |
} |
/**************************************************************** |
***** Object Slot 7 |
****************************************************************/ |
template <class R,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class Obj> |
struct ObjectSlot7_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef R RType; |
#else |
typedef typename Trait<R>::type RType; |
#endif |
typedef R (Obj::*InFunc)(P1,P2,P3,P4,P5,P6,P7); |
typedef RType (Obj::*Func)(P1,P2,P3,P4,P5,P6,P7); |
typedef Slot7<R,P1,P2,P3,P4,P5,P6,P7> SlotType; |
typedef CallDataObj3<typename SlotType::Func,Obj,Func> CallData; |
static RType callback(void* d,P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7) |
{ |
CallData* data=(CallData*)d; |
return ((data->obj)->*(data->func))(p1,p2,p3,p4,p5,p6,p7); |
} |
static SlotData* create(Obj* obj,InFunc func) |
{ |
if (!obj) return 0; |
SlotData* tmp=manage(new SlotData()); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.obj=obj; |
data.func=(Func)func; |
obj->register_data(tmp->receiver()); |
return tmp; |
} |
}; |
#ifndef SIGC_CXX_VOID_RETURN |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template <class P1,class P2,class P3,class P4,class P5,class P6,class P7,class Obj> |
struct ObjectSlot7_<void,P1,P2,P3,P4,P5,P6,P7,Obj> |
{ |
typedef void RType; |
typedef void (Obj::*InFunc)(P1,P2,P3,P4,P5,P6,P7); |
typedef RType (Obj::*Func)(P1,P2,P3,P4,P5,P6,P7); |
typedef Slot7<void,P1,P2,P3,P4,P5,P6,P7> SlotType; |
typedef CallDataObj3<typename SlotType::Func,Obj,Func> CallData; |
static RType callback(void* d,P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7) |
{ |
CallData* data=(CallData*)d; |
((data->obj)->*(data->func))(p1,p2,p3,p4,p5,p6,p7); |
} |
static SlotData* create(Obj* obj,InFunc func) |
{ |
if (!obj) return 0; |
SlotData* tmp=manage(new SlotData()); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.obj=obj; |
data.func=(Func)func; |
obj->register_data(tmp->receiver()); |
return tmp; |
} |
}; |
#endif |
#endif |
template <class R,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class O,class O2> |
inline Slot7<R,P1,P2,P3,P4,P5,P6,P7> |
slot(O* &obj,R (O2::*func)(P1,P2,P3,P4,P5,P6,P7)) |
{ |
return ObjectSlot7_<R,P1,P2,P3,P4,P5,P6,P7,O2> |
::create(obj,func); |
} |
template <class R,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class O,class O2> |
inline Slot7<R,P1,P2,P3,P4,P5,P6,P7> |
slot(O* const &obj,R (O2::*func)(P1,P2,P3,P4,P5,P6,P7)) |
{ |
return ObjectSlot7_<R,P1,P2,P3,P4,P5,P6,P7,O2> |
::create(obj,func); |
} |
template <class R,class P1,class P2,class P3,class P4,class P5,class P6,class P7,class O,class O2> |
inline Slot7<R,P1,P2,P3,P4,P5,P6,P7> |
slot(O &obj,R (O2::*func)(P1,P2,P3,P4,P5,P6,P7)) |
{ |
return ObjectSlot7_<R,P1,P2,P3,P4,P5,P6,P7,O2> |
::create(&obj,func); |
} |
#ifdef SIGC_CXX_NAMESPACES |
} // namespace |
#endif |
#endif |
/contrib/media/updf/include/sigc++/retbind.h |
---|
0,0 → 1,848 |
// -*- c++ -*- |
/* This is a generated file, do not edit. Generated from ../sigc++/macros/retbind.h.m4 */ |
/* This was also shamelessly copied, hacked, munched, and carefully |
* tweaked from KNelson's original bind.h.m4 |
* CJN 3.22.00 |
*/ |
#ifndef SIGCXX_RETBIND_H |
#define SIGCXX_RETBIND_H |
/* |
SigC::retbind |
------------- |
retbind() alters a Slot by fixing the return value to certain values |
Return value fixing ignores any slot return value. The slot is |
destroyed in the process and a new one is created, so references |
holding onto the slot will no longer be valid. |
Typecasting may be necessary to match arguments between the |
slot and the binding return value. Types must be an exact match. |
To insure the proper type, the type can be explicitly specified |
on template instantation. |
Simple Sample usage: |
void f(int,int); |
Slot2<void,int,int> s1=slot(f); |
Slot1<int,int,int> s2=retbind(s1,1); // s1 is invalid |
cout << "s2: " << s2(2,1) << endl; |
Type specified usage: |
struct A {}; |
struct B :public A {}; |
B* b; |
Slot1<void> s1; |
Slot0<A*> s2=retbind<A*>(s1,b); // B* must be told to match A* |
*/ |
#include <sigc++/adaptor.h> |
#include <sigc++/scope.h> |
#ifdef SIGC_CXX_NAMESPACES |
namespace SigC |
{ |
#endif |
/**************************************************************** |
***** Adaptor RetBind Slot 0 arguments |
****************************************************************/ |
template <class Ret,class R> |
struct AdaptorRetBindSlot0: public AdaptorSlot_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef Ret RType; |
#else |
typedef typename Trait<Ret>::type RType; |
#endif |
typedef Slot0<Ret> SlotType; |
typedef Slot0<R> InSlotType; |
struct Node:public AdaptorNode |
{ |
Ret ret_; |
}; |
typedef CallDataObj2<typename SlotType::Func,Node> CallData; |
static RType callback(void* d) |
{ |
CallData* data=(CallData*)d; |
Node* node=data->obj; |
((typename InSlotType::Callback&)(node->data_))(); |
return node->ret_; |
} |
static SlotData* create(SlotData *s,Ret ret) |
{ |
SlotData* tmp=(SlotData*)s; |
Node *node=new Node(); |
copy_callback(tmp,node); |
node->ret_ = ret; |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.obj=node; |
return tmp; |
} |
}; |
#ifndef SIGC_CXX_VOID_RETURN |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template <class Ret> |
struct AdaptorRetBindSlot0 |
<Ret,void> : public AdaptorSlot_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef Ret RType; |
#else |
typedef typename Trait<Ret>::type RType; |
#endif |
typedef Slot0<Ret> SlotType; |
typedef Slot0<void> InSlotType; |
struct Node:public AdaptorNode |
{ |
Ret ret_; |
}; |
typedef CallDataObj2<typename SlotType::Func,Node> CallData; |
static RType callback(void* d) |
{ |
CallData* data=(CallData*)d; |
Node* node=data->obj; |
((typename InSlotType::Callback&)(node->data_))(); |
return node->ret_; |
} |
static SlotData* create(SlotData *s,Ret ret) |
{ |
SlotData* tmp=(SlotData*)s; |
Node *node=new Node(); |
copy_callback(tmp,node); |
node->ret_ = ret; |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.obj=node; |
return tmp; |
} |
}; |
#endif |
#endif |
template <class Ret, |
class R> |
Slot0<Ret> |
retbind(const Slot0<R> &s, |
Ret ret) |
{return AdaptorRetBindSlot0<Ret,R>::create(s.data(),ret); |
} |
/**************************************************************** |
***** Adaptor RetBind Slot 1 arguments |
****************************************************************/ |
template <class Ret,class R, |
class P1> |
struct AdaptorRetBindSlot1: public AdaptorSlot_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef Ret RType; |
#else |
typedef typename Trait<Ret>::type RType; |
#endif |
typedef Slot1<Ret,P1> SlotType; |
typedef Slot1<R,P1> InSlotType; |
struct Node:public AdaptorNode |
{ |
Ret ret_; |
}; |
typedef CallDataObj2<typename SlotType::Func,Node> CallData; |
static RType callback(void* d,P1 p1) |
{ |
CallData* data=(CallData*)d; |
Node* node=data->obj; |
((typename InSlotType::Callback&)(node->data_))(p1); |
return node->ret_; |
} |
static SlotData* create(SlotData *s,Ret ret) |
{ |
SlotData* tmp=(SlotData*)s; |
Node *node=new Node(); |
copy_callback(tmp,node); |
node->ret_ = ret; |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.obj=node; |
return tmp; |
} |
}; |
#ifndef SIGC_CXX_VOID_RETURN |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template <class Ret,class P1> |
struct AdaptorRetBindSlot1 |
<Ret,void, |
P1> : public AdaptorSlot_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef Ret RType; |
#else |
typedef typename Trait<Ret>::type RType; |
#endif |
typedef Slot1<Ret,P1> SlotType; |
typedef Slot1<void,P1> InSlotType; |
struct Node:public AdaptorNode |
{ |
Ret ret_; |
}; |
typedef CallDataObj2<typename SlotType::Func,Node> CallData; |
static RType callback(void* d,P1 p1) |
{ |
CallData* data=(CallData*)d; |
Node* node=data->obj; |
((typename InSlotType::Callback&)(node->data_))(p1); |
return node->ret_; |
} |
static SlotData* create(SlotData *s,Ret ret) |
{ |
SlotData* tmp=(SlotData*)s; |
Node *node=new Node(); |
copy_callback(tmp,node); |
node->ret_ = ret; |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.obj=node; |
return tmp; |
} |
}; |
#endif |
#endif |
template <class Ret, |
class R, |
class P1> |
Slot1<Ret,P1> |
retbind(const Slot1<R,P1> &s, |
Ret ret) |
{return AdaptorRetBindSlot1<Ret,R, |
P1>::create(s.data(),ret); |
} |
/**************************************************************** |
***** Adaptor RetBind Slot 2 arguments |
****************************************************************/ |
template <class Ret,class R, |
class P1,class P2> |
struct AdaptorRetBindSlot2: public AdaptorSlot_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef Ret RType; |
#else |
typedef typename Trait<Ret>::type RType; |
#endif |
typedef Slot2<Ret,P1,P2> SlotType; |
typedef Slot2<R,P1,P2> InSlotType; |
struct Node:public AdaptorNode |
{ |
Ret ret_; |
}; |
typedef CallDataObj2<typename SlotType::Func,Node> CallData; |
static RType callback(void* d,P1 p1,P2 p2) |
{ |
CallData* data=(CallData*)d; |
Node* node=data->obj; |
((typename InSlotType::Callback&)(node->data_))(p1,p2); |
return node->ret_; |
} |
static SlotData* create(SlotData *s,Ret ret) |
{ |
SlotData* tmp=(SlotData*)s; |
Node *node=new Node(); |
copy_callback(tmp,node); |
node->ret_ = ret; |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.obj=node; |
return tmp; |
} |
}; |
#ifndef SIGC_CXX_VOID_RETURN |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template <class Ret,class P1,class P2> |
struct AdaptorRetBindSlot2 |
<Ret,void, |
P1,P2> : public AdaptorSlot_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef Ret RType; |
#else |
typedef typename Trait<Ret>::type RType; |
#endif |
typedef Slot2<Ret,P1,P2> SlotType; |
typedef Slot2<void,P1,P2> InSlotType; |
struct Node:public AdaptorNode |
{ |
Ret ret_; |
}; |
typedef CallDataObj2<typename SlotType::Func,Node> CallData; |
static RType callback(void* d,P1 p1,P2 p2) |
{ |
CallData* data=(CallData*)d; |
Node* node=data->obj; |
((typename InSlotType::Callback&)(node->data_))(p1,p2); |
return node->ret_; |
} |
static SlotData* create(SlotData *s,Ret ret) |
{ |
SlotData* tmp=(SlotData*)s; |
Node *node=new Node(); |
copy_callback(tmp,node); |
node->ret_ = ret; |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.obj=node; |
return tmp; |
} |
}; |
#endif |
#endif |
template <class Ret, |
class R, |
class P1,class P2> |
Slot2<Ret,P1,P2> |
retbind(const Slot2<R,P1,P2> &s, |
Ret ret) |
{return AdaptorRetBindSlot2<Ret,R, |
P1,P2>::create(s.data(),ret); |
} |
/**************************************************************** |
***** Adaptor RetBind Slot 3 arguments |
****************************************************************/ |
template <class Ret,class R, |
class P1,class P2,class P3> |
struct AdaptorRetBindSlot3: public AdaptorSlot_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef Ret RType; |
#else |
typedef typename Trait<Ret>::type RType; |
#endif |
typedef Slot3<Ret,P1,P2,P3> SlotType; |
typedef Slot3<R,P1,P2,P3> InSlotType; |
struct Node:public AdaptorNode |
{ |
Ret ret_; |
}; |
typedef CallDataObj2<typename SlotType::Func,Node> CallData; |
static RType callback(void* d,P1 p1,P2 p2,P3 p3) |
{ |
CallData* data=(CallData*)d; |
Node* node=data->obj; |
((typename InSlotType::Callback&)(node->data_))(p1,p2,p3); |
return node->ret_; |
} |
static SlotData* create(SlotData *s,Ret ret) |
{ |
SlotData* tmp=(SlotData*)s; |
Node *node=new Node(); |
copy_callback(tmp,node); |
node->ret_ = ret; |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.obj=node; |
return tmp; |
} |
}; |
#ifndef SIGC_CXX_VOID_RETURN |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template <class Ret,class P1,class P2,class P3> |
struct AdaptorRetBindSlot3 |
<Ret,void, |
P1,P2,P3> : public AdaptorSlot_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef Ret RType; |
#else |
typedef typename Trait<Ret>::type RType; |
#endif |
typedef Slot3<Ret,P1,P2,P3> SlotType; |
typedef Slot3<void,P1,P2,P3> InSlotType; |
struct Node:public AdaptorNode |
{ |
Ret ret_; |
}; |
typedef CallDataObj2<typename SlotType::Func,Node> CallData; |
static RType callback(void* d,P1 p1,P2 p2,P3 p3) |
{ |
CallData* data=(CallData*)d; |
Node* node=data->obj; |
((typename InSlotType::Callback&)(node->data_))(p1,p2,p3); |
return node->ret_; |
} |
static SlotData* create(SlotData *s,Ret ret) |
{ |
SlotData* tmp=(SlotData*)s; |
Node *node=new Node(); |
copy_callback(tmp,node); |
node->ret_ = ret; |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.obj=node; |
return tmp; |
} |
}; |
#endif |
#endif |
template <class Ret, |
class R, |
class P1,class P2,class P3> |
Slot3<Ret,P1,P2,P3> |
retbind(const Slot3<R,P1,P2,P3> &s, |
Ret ret) |
{return AdaptorRetBindSlot3<Ret,R, |
P1,P2,P3>::create(s.data(),ret); |
} |
/**************************************************************** |
***** Adaptor RetBind Slot 4 arguments |
****************************************************************/ |
template <class Ret,class R, |
class P1,class P2,class P3,class P4> |
struct AdaptorRetBindSlot4: public AdaptorSlot_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef Ret RType; |
#else |
typedef typename Trait<Ret>::type RType; |
#endif |
typedef Slot4<Ret,P1,P2,P3,P4> SlotType; |
typedef Slot4<R,P1,P2,P3,P4> InSlotType; |
struct Node:public AdaptorNode |
{ |
Ret ret_; |
}; |
typedef CallDataObj2<typename SlotType::Func,Node> CallData; |
static RType callback(void* d,P1 p1,P2 p2,P3 p3,P4 p4) |
{ |
CallData* data=(CallData*)d; |
Node* node=data->obj; |
((typename InSlotType::Callback&)(node->data_))(p1,p2,p3,p4); |
return node->ret_; |
} |
static SlotData* create(SlotData *s,Ret ret) |
{ |
SlotData* tmp=(SlotData*)s; |
Node *node=new Node(); |
copy_callback(tmp,node); |
node->ret_ = ret; |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.obj=node; |
return tmp; |
} |
}; |
#ifndef SIGC_CXX_VOID_RETURN |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template <class Ret,class P1,class P2,class P3,class P4> |
struct AdaptorRetBindSlot4 |
<Ret,void, |
P1,P2,P3,P4> : public AdaptorSlot_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef Ret RType; |
#else |
typedef typename Trait<Ret>::type RType; |
#endif |
typedef Slot4<Ret,P1,P2,P3,P4> SlotType; |
typedef Slot4<void,P1,P2,P3,P4> InSlotType; |
struct Node:public AdaptorNode |
{ |
Ret ret_; |
}; |
typedef CallDataObj2<typename SlotType::Func,Node> CallData; |
static RType callback(void* d,P1 p1,P2 p2,P3 p3,P4 p4) |
{ |
CallData* data=(CallData*)d; |
Node* node=data->obj; |
((typename InSlotType::Callback&)(node->data_))(p1,p2,p3,p4); |
return node->ret_; |
} |
static SlotData* create(SlotData *s,Ret ret) |
{ |
SlotData* tmp=(SlotData*)s; |
Node *node=new Node(); |
copy_callback(tmp,node); |
node->ret_ = ret; |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.obj=node; |
return tmp; |
} |
}; |
#endif |
#endif |
template <class Ret, |
class R, |
class P1,class P2,class P3,class P4> |
Slot4<Ret,P1,P2,P3,P4> |
retbind(const Slot4<R,P1,P2,P3,P4> &s, |
Ret ret) |
{return AdaptorRetBindSlot4<Ret,R, |
P1,P2,P3,P4>::create(s.data(),ret); |
} |
/**************************************************************** |
***** Adaptor RetBind Slot 5 arguments |
****************************************************************/ |
template <class Ret,class R, |
class P1,class P2,class P3,class P4,class P5> |
struct AdaptorRetBindSlot5: public AdaptorSlot_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef Ret RType; |
#else |
typedef typename Trait<Ret>::type RType; |
#endif |
typedef Slot5<Ret,P1,P2,P3,P4,P5> SlotType; |
typedef Slot5<R,P1,P2,P3,P4,P5> InSlotType; |
struct Node:public AdaptorNode |
{ |
Ret ret_; |
}; |
typedef CallDataObj2<typename SlotType::Func,Node> CallData; |
static RType callback(void* d,P1 p1,P2 p2,P3 p3,P4 p4,P5 p5) |
{ |
CallData* data=(CallData*)d; |
Node* node=data->obj; |
((typename InSlotType::Callback&)(node->data_))(p1,p2,p3,p4,p5); |
return node->ret_; |
} |
static SlotData* create(SlotData *s,Ret ret) |
{ |
SlotData* tmp=(SlotData*)s; |
Node *node=new Node(); |
copy_callback(tmp,node); |
node->ret_ = ret; |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.obj=node; |
return tmp; |
} |
}; |
#ifndef SIGC_CXX_VOID_RETURN |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template <class Ret,class P1,class P2,class P3,class P4,class P5> |
struct AdaptorRetBindSlot5 |
<Ret,void, |
P1,P2,P3,P4,P5> : public AdaptorSlot_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef Ret RType; |
#else |
typedef typename Trait<Ret>::type RType; |
#endif |
typedef Slot5<Ret,P1,P2,P3,P4,P5> SlotType; |
typedef Slot5<void,P1,P2,P3,P4,P5> InSlotType; |
struct Node:public AdaptorNode |
{ |
Ret ret_; |
}; |
typedef CallDataObj2<typename SlotType::Func,Node> CallData; |
static RType callback(void* d,P1 p1,P2 p2,P3 p3,P4 p4,P5 p5) |
{ |
CallData* data=(CallData*)d; |
Node* node=data->obj; |
((typename InSlotType::Callback&)(node->data_))(p1,p2,p3,p4,p5); |
return node->ret_; |
} |
static SlotData* create(SlotData *s,Ret ret) |
{ |
SlotData* tmp=(SlotData*)s; |
Node *node=new Node(); |
copy_callback(tmp,node); |
node->ret_ = ret; |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.obj=node; |
return tmp; |
} |
}; |
#endif |
#endif |
template <class Ret, |
class R, |
class P1,class P2,class P3,class P4,class P5> |
Slot5<Ret,P1,P2,P3,P4,P5> |
retbind(const Slot5<R,P1,P2,P3,P4,P5> &s, |
Ret ret) |
{return AdaptorRetBindSlot5<Ret,R, |
P1,P2,P3,P4,P5>::create(s.data(),ret); |
} |
/**************************************************************** |
***** Adaptor RetBind Slot 6 arguments |
****************************************************************/ |
template <class Ret,class R, |
class P1,class P2,class P3,class P4,class P5,class P6> |
struct AdaptorRetBindSlot6: public AdaptorSlot_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef Ret RType; |
#else |
typedef typename Trait<Ret>::type RType; |
#endif |
typedef Slot6<Ret,P1,P2,P3,P4,P5,P6> SlotType; |
typedef Slot6<R,P1,P2,P3,P4,P5,P6> InSlotType; |
struct Node:public AdaptorNode |
{ |
Ret ret_; |
}; |
typedef CallDataObj2<typename SlotType::Func,Node> CallData; |
static RType callback(void* d,P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6) |
{ |
CallData* data=(CallData*)d; |
Node* node=data->obj; |
((typename InSlotType::Callback&)(node->data_))(p1,p2,p3,p4,p5,p6); |
return node->ret_; |
} |
static SlotData* create(SlotData *s,Ret ret) |
{ |
SlotData* tmp=(SlotData*)s; |
Node *node=new Node(); |
copy_callback(tmp,node); |
node->ret_ = ret; |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.obj=node; |
return tmp; |
} |
}; |
#ifndef SIGC_CXX_VOID_RETURN |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template <class Ret,class P1,class P2,class P3,class P4,class P5,class P6> |
struct AdaptorRetBindSlot6 |
<Ret,void, |
P1,P2,P3,P4,P5,P6> : public AdaptorSlot_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef Ret RType; |
#else |
typedef typename Trait<Ret>::type RType; |
#endif |
typedef Slot6<Ret,P1,P2,P3,P4,P5,P6> SlotType; |
typedef Slot6<void,P1,P2,P3,P4,P5,P6> InSlotType; |
struct Node:public AdaptorNode |
{ |
Ret ret_; |
}; |
typedef CallDataObj2<typename SlotType::Func,Node> CallData; |
static RType callback(void* d,P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6) |
{ |
CallData* data=(CallData*)d; |
Node* node=data->obj; |
((typename InSlotType::Callback&)(node->data_))(p1,p2,p3,p4,p5,p6); |
return node->ret_; |
} |
static SlotData* create(SlotData *s,Ret ret) |
{ |
SlotData* tmp=(SlotData*)s; |
Node *node=new Node(); |
copy_callback(tmp,node); |
node->ret_ = ret; |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.obj=node; |
return tmp; |
} |
}; |
#endif |
#endif |
template <class Ret, |
class R, |
class P1,class P2,class P3,class P4,class P5,class P6> |
Slot6<Ret,P1,P2,P3,P4,P5,P6> |
retbind(const Slot6<R,P1,P2,P3,P4,P5,P6> &s, |
Ret ret) |
{return AdaptorRetBindSlot6<Ret,R, |
P1,P2,P3,P4,P5,P6>::create(s.data(),ret); |
} |
/**************************************************************** |
***** Adaptor RetBind Slot 7 arguments |
****************************************************************/ |
template <class Ret,class R, |
class P1,class P2,class P3,class P4,class P5,class P6,class P7> |
struct AdaptorRetBindSlot7: public AdaptorSlot_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef Ret RType; |
#else |
typedef typename Trait<Ret>::type RType; |
#endif |
typedef Slot7<Ret,P1,P2,P3,P4,P5,P6,P7> SlotType; |
typedef Slot7<R,P1,P2,P3,P4,P5,P6,P7> InSlotType; |
struct Node:public AdaptorNode |
{ |
Ret ret_; |
}; |
typedef CallDataObj2<typename SlotType::Func,Node> CallData; |
static RType callback(void* d,P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7) |
{ |
CallData* data=(CallData*)d; |
Node* node=data->obj; |
((typename InSlotType::Callback&)(node->data_))(p1,p2,p3,p4,p5,p6,p7); |
return node->ret_; |
} |
static SlotData* create(SlotData *s,Ret ret) |
{ |
SlotData* tmp=(SlotData*)s; |
Node *node=new Node(); |
copy_callback(tmp,node); |
node->ret_ = ret; |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.obj=node; |
return tmp; |
} |
}; |
#ifndef SIGC_CXX_VOID_RETURN |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template <class Ret,class P1,class P2,class P3,class P4,class P5,class P6,class P7> |
struct AdaptorRetBindSlot7 |
<Ret,void, |
P1,P2,P3,P4,P5,P6,P7> : public AdaptorSlot_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef Ret RType; |
#else |
typedef typename Trait<Ret>::type RType; |
#endif |
typedef Slot7<Ret,P1,P2,P3,P4,P5,P6,P7> SlotType; |
typedef Slot7<void,P1,P2,P3,P4,P5,P6,P7> InSlotType; |
struct Node:public AdaptorNode |
{ |
Ret ret_; |
}; |
typedef CallDataObj2<typename SlotType::Func,Node> CallData; |
static RType callback(void* d,P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7) |
{ |
CallData* data=(CallData*)d; |
Node* node=data->obj; |
((typename InSlotType::Callback&)(node->data_))(p1,p2,p3,p4,p5,p6,p7); |
return node->ret_; |
} |
static SlotData* create(SlotData *s,Ret ret) |
{ |
SlotData* tmp=(SlotData*)s; |
Node *node=new Node(); |
copy_callback(tmp,node); |
node->ret_ = ret; |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.obj=node; |
return tmp; |
} |
}; |
#endif |
#endif |
template <class Ret, |
class R, |
class P1,class P2,class P3,class P4,class P5,class P6,class P7> |
Slot7<Ret,P1,P2,P3,P4,P5,P6,P7> |
retbind(const Slot7<R,P1,P2,P3,P4,P5,P6,P7> &s, |
Ret ret) |
{return AdaptorRetBindSlot7<Ret,R, |
P1,P2,P3,P4,P5,P6,P7>::create(s.data(),ret); |
} |
#ifdef SIGC_CXX_NAMESPACES |
} // namespace |
#endif |
#endif |
/contrib/media/updf/include/sigc++/rettype.h |
---|
0,0 → 1,715 |
// -*- c++ -*- |
/* This is a generated file, do not edit. Generated from ../sigc++/macros/rettype.h.m4 */ |
#ifndef SIGCXX_RETTYPE_H |
#define SIGCXX_RETTYPE_H |
/* |
SigC::rettype |
------------- |
rettype() alters a Slot by changing the return type. |
Only allowed conversions or conversions to void can properly |
be implemented. The type must always be specified as a |
template parameter. |
Simple Sample usage: |
int f(int); |
Slot1<void,int> s1=rettype<void>(slot(&f)); |
Slot1<float,int> s2=rettype<float>(slot(&f)); |
*/ |
#include <sigc++/adaptor.h> |
#ifdef SIGC_CXX_NAMESPACES |
namespace SigC |
{ |
#endif |
/**************************************************************** |
***** Adaptor Rettype Slot 0 |
****************************************************************/ |
template <class R1, |
class R2> |
struct AdaptorRettypeSlot0_ |
: public AdaptorSlot_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef R1 RType; |
#else |
typedef typename Trait<R1>::type RType; |
#endif |
typedef Slot0<R1> SlotType; |
typedef Slot0<R2> InSlotType; |
typedef AdaptorNode Node; |
typedef CallDataObj2<typename SlotType::Func,Node> CallData; |
static RType callback(void* d) |
{ |
CallData* data=(CallData*)d; |
Node* node=data->obj; |
return RType(((typename InSlotType::Callback&)(node->data_))()); |
} |
static SlotData* create(SlotData *s) |
{ |
SlotData* tmp=(SlotData*)s; |
Node *node=new Node(); |
copy_callback(tmp,node); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.obj=node; |
return tmp; |
} |
}; |
#ifndef SIGC_CXX_VOID_RETURN |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template < |
class R2> |
struct AdaptorRettypeSlot0_ |
<void, |
R2> |
: public AdaptorSlot_ |
{ |
typedef void RType; |
typedef Slot0<void> SlotType; |
typedef Slot0<R2> InSlotType; |
typedef AdaptorNode Node; |
typedef CallDataObj2<typename SlotType::Func,Node> CallData; |
static RType callback(void* d) |
{ |
CallData* data=(CallData*)d; |
Node* node=data->obj; |
((typename InSlotType::Callback&)(node->data_))(); |
} |
static SlotData* create(SlotData *s) |
{ |
SlotData* tmp=(SlotData*)s; |
Node *node=new Node(); |
copy_callback(tmp,node); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.obj=node; |
return tmp; |
} |
}; |
#endif |
#endif |
template <class R1,class R2> |
Slot0<R1> |
rettype(const Slot0<R2> &s) |
{return AdaptorRettypeSlot0_<R1,R2>::create(s.obj()); |
} |
/**************************************************************** |
***** Adaptor Rettype Slot 1 |
****************************************************************/ |
template <class R1, |
class P1, |
class R2> |
struct AdaptorRettypeSlot1_ |
: public AdaptorSlot_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef R1 RType; |
#else |
typedef typename Trait<R1>::type RType; |
#endif |
typedef Slot1<R1,P1> SlotType; |
typedef Slot1<R2,P1> InSlotType; |
typedef AdaptorNode Node; |
typedef CallDataObj2<typename SlotType::Func,Node> CallData; |
static RType callback(void* d,P1 p1) |
{ |
CallData* data=(CallData*)d; |
Node* node=data->obj; |
return RType(((typename InSlotType::Callback&)(node->data_))(p1)); |
} |
static SlotData* create(SlotData *s) |
{ |
SlotData* tmp=(SlotData*)s; |
Node *node=new Node(); |
copy_callback(tmp,node); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.obj=node; |
return tmp; |
} |
}; |
#ifndef SIGC_CXX_VOID_RETURN |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template < |
class P1, |
class R2> |
struct AdaptorRettypeSlot1_ |
<void, |
P1, |
R2> |
: public AdaptorSlot_ |
{ |
typedef void RType; |
typedef Slot1<void,P1> SlotType; |
typedef Slot1<R2,P1> InSlotType; |
typedef AdaptorNode Node; |
typedef CallDataObj2<typename SlotType::Func,Node> CallData; |
static RType callback(void* d,P1 p1) |
{ |
CallData* data=(CallData*)d; |
Node* node=data->obj; |
((typename InSlotType::Callback&)(node->data_))(p1); |
} |
static SlotData* create(SlotData *s) |
{ |
SlotData* tmp=(SlotData*)s; |
Node *node=new Node(); |
copy_callback(tmp,node); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.obj=node; |
return tmp; |
} |
}; |
#endif |
#endif |
template <class R1,class R2,class P1> |
Slot1<R1,P1> |
rettype(const Slot1<R2,P1> &s) |
{return AdaptorRettypeSlot1_<R1, |
P1,R2>::create(s.obj()); |
} |
/**************************************************************** |
***** Adaptor Rettype Slot 2 |
****************************************************************/ |
template <class R1, |
class P1,class P2, |
class R2> |
struct AdaptorRettypeSlot2_ |
: public AdaptorSlot_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef R1 RType; |
#else |
typedef typename Trait<R1>::type RType; |
#endif |
typedef Slot2<R1,P1,P2> SlotType; |
typedef Slot2<R2,P1,P2> InSlotType; |
typedef AdaptorNode Node; |
typedef CallDataObj2<typename SlotType::Func,Node> CallData; |
static RType callback(void* d,P1 p1,P2 p2) |
{ |
CallData* data=(CallData*)d; |
Node* node=data->obj; |
return RType(((typename InSlotType::Callback&)(node->data_))(p1,p2)); |
} |
static SlotData* create(SlotData *s) |
{ |
SlotData* tmp=(SlotData*)s; |
Node *node=new Node(); |
copy_callback(tmp,node); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.obj=node; |
return tmp; |
} |
}; |
#ifndef SIGC_CXX_VOID_RETURN |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template < |
class P1,class P2, |
class R2> |
struct AdaptorRettypeSlot2_ |
<void, |
P1,P2, |
R2> |
: public AdaptorSlot_ |
{ |
typedef void RType; |
typedef Slot2<void,P1,P2> SlotType; |
typedef Slot2<R2,P1,P2> InSlotType; |
typedef AdaptorNode Node; |
typedef CallDataObj2<typename SlotType::Func,Node> CallData; |
static RType callback(void* d,P1 p1,P2 p2) |
{ |
CallData* data=(CallData*)d; |
Node* node=data->obj; |
((typename InSlotType::Callback&)(node->data_))(p1,p2); |
} |
static SlotData* create(SlotData *s) |
{ |
SlotData* tmp=(SlotData*)s; |
Node *node=new Node(); |
copy_callback(tmp,node); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.obj=node; |
return tmp; |
} |
}; |
#endif |
#endif |
template <class R1,class R2,class P1,class P2> |
Slot2<R1,P1,P2> |
rettype(const Slot2<R2,P1,P2> &s) |
{return AdaptorRettypeSlot2_<R1, |
P1,P2,R2>::create(s.obj()); |
} |
/**************************************************************** |
***** Adaptor Rettype Slot 3 |
****************************************************************/ |
template <class R1, |
class P1,class P2,class P3, |
class R2> |
struct AdaptorRettypeSlot3_ |
: public AdaptorSlot_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef R1 RType; |
#else |
typedef typename Trait<R1>::type RType; |
#endif |
typedef Slot3<R1,P1,P2,P3> SlotType; |
typedef Slot3<R2,P1,P2,P3> InSlotType; |
typedef AdaptorNode Node; |
typedef CallDataObj2<typename SlotType::Func,Node> CallData; |
static RType callback(void* d,P1 p1,P2 p2,P3 p3) |
{ |
CallData* data=(CallData*)d; |
Node* node=data->obj; |
return RType(((typename InSlotType::Callback&)(node->data_))(p1,p2,p3)); |
} |
static SlotData* create(SlotData *s) |
{ |
SlotData* tmp=(SlotData*)s; |
Node *node=new Node(); |
copy_callback(tmp,node); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.obj=node; |
return tmp; |
} |
}; |
#ifndef SIGC_CXX_VOID_RETURN |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template < |
class P1,class P2,class P3, |
class R2> |
struct AdaptorRettypeSlot3_ |
<void, |
P1,P2,P3, |
R2> |
: public AdaptorSlot_ |
{ |
typedef void RType; |
typedef Slot3<void,P1,P2,P3> SlotType; |
typedef Slot3<R2,P1,P2,P3> InSlotType; |
typedef AdaptorNode Node; |
typedef CallDataObj2<typename SlotType::Func,Node> CallData; |
static RType callback(void* d,P1 p1,P2 p2,P3 p3) |
{ |
CallData* data=(CallData*)d; |
Node* node=data->obj; |
((typename InSlotType::Callback&)(node->data_))(p1,p2,p3); |
} |
static SlotData* create(SlotData *s) |
{ |
SlotData* tmp=(SlotData*)s; |
Node *node=new Node(); |
copy_callback(tmp,node); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.obj=node; |
return tmp; |
} |
}; |
#endif |
#endif |
template <class R1,class R2,class P1,class P2,class P3> |
Slot3<R1,P1,P2,P3> |
rettype(const Slot3<R2,P1,P2,P3> &s) |
{return AdaptorRettypeSlot3_<R1, |
P1,P2,P3,R2>::create(s.obj()); |
} |
/**************************************************************** |
***** Adaptor Rettype Slot 4 |
****************************************************************/ |
template <class R1, |
class P1,class P2,class P3,class P4, |
class R2> |
struct AdaptorRettypeSlot4_ |
: public AdaptorSlot_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef R1 RType; |
#else |
typedef typename Trait<R1>::type RType; |
#endif |
typedef Slot4<R1,P1,P2,P3,P4> SlotType; |
typedef Slot4<R2,P1,P2,P3,P4> InSlotType; |
typedef AdaptorNode Node; |
typedef CallDataObj2<typename SlotType::Func,Node> CallData; |
static RType callback(void* d,P1 p1,P2 p2,P3 p3,P4 p4) |
{ |
CallData* data=(CallData*)d; |
Node* node=data->obj; |
return RType(((typename InSlotType::Callback&)(node->data_))(p1,p2,p3,p4)); |
} |
static SlotData* create(SlotData *s) |
{ |
SlotData* tmp=(SlotData*)s; |
Node *node=new Node(); |
copy_callback(tmp,node); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.obj=node; |
return tmp; |
} |
}; |
#ifndef SIGC_CXX_VOID_RETURN |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template < |
class P1,class P2,class P3,class P4, |
class R2> |
struct AdaptorRettypeSlot4_ |
<void, |
P1,P2,P3,P4, |
R2> |
: public AdaptorSlot_ |
{ |
typedef void RType; |
typedef Slot4<void,P1,P2,P3,P4> SlotType; |
typedef Slot4<R2,P1,P2,P3,P4> InSlotType; |
typedef AdaptorNode Node; |
typedef CallDataObj2<typename SlotType::Func,Node> CallData; |
static RType callback(void* d,P1 p1,P2 p2,P3 p3,P4 p4) |
{ |
CallData* data=(CallData*)d; |
Node* node=data->obj; |
((typename InSlotType::Callback&)(node->data_))(p1,p2,p3,p4); |
} |
static SlotData* create(SlotData *s) |
{ |
SlotData* tmp=(SlotData*)s; |
Node *node=new Node(); |
copy_callback(tmp,node); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.obj=node; |
return tmp; |
} |
}; |
#endif |
#endif |
template <class R1,class R2,class P1,class P2,class P3,class P4> |
Slot4<R1,P1,P2,P3,P4> |
rettype(const Slot4<R2,P1,P2,P3,P4> &s) |
{return AdaptorRettypeSlot4_<R1, |
P1,P2,P3,P4,R2>::create(s.obj()); |
} |
/**************************************************************** |
***** Adaptor Rettype Slot 5 |
****************************************************************/ |
template <class R1, |
class P1,class P2,class P3,class P4,class P5, |
class R2> |
struct AdaptorRettypeSlot5_ |
: public AdaptorSlot_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef R1 RType; |
#else |
typedef typename Trait<R1>::type RType; |
#endif |
typedef Slot5<R1,P1,P2,P3,P4,P5> SlotType; |
typedef Slot5<R2,P1,P2,P3,P4,P5> InSlotType; |
typedef AdaptorNode Node; |
typedef CallDataObj2<typename SlotType::Func,Node> CallData; |
static RType callback(void* d,P1 p1,P2 p2,P3 p3,P4 p4,P5 p5) |
{ |
CallData* data=(CallData*)d; |
Node* node=data->obj; |
return RType(((typename InSlotType::Callback&)(node->data_))(p1,p2,p3,p4,p5)); |
} |
static SlotData* create(SlotData *s) |
{ |
SlotData* tmp=(SlotData*)s; |
Node *node=new Node(); |
copy_callback(tmp,node); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.obj=node; |
return tmp; |
} |
}; |
#ifndef SIGC_CXX_VOID_RETURN |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template < |
class P1,class P2,class P3,class P4,class P5, |
class R2> |
struct AdaptorRettypeSlot5_ |
<void, |
P1,P2,P3,P4,P5, |
R2> |
: public AdaptorSlot_ |
{ |
typedef void RType; |
typedef Slot5<void,P1,P2,P3,P4,P5> SlotType; |
typedef Slot5<R2,P1,P2,P3,P4,P5> InSlotType; |
typedef AdaptorNode Node; |
typedef CallDataObj2<typename SlotType::Func,Node> CallData; |
static RType callback(void* d,P1 p1,P2 p2,P3 p3,P4 p4,P5 p5) |
{ |
CallData* data=(CallData*)d; |
Node* node=data->obj; |
((typename InSlotType::Callback&)(node->data_))(p1,p2,p3,p4,p5); |
} |
static SlotData* create(SlotData *s) |
{ |
SlotData* tmp=(SlotData*)s; |
Node *node=new Node(); |
copy_callback(tmp,node); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.obj=node; |
return tmp; |
} |
}; |
#endif |
#endif |
template <class R1,class R2,class P1,class P2,class P3,class P4,class P5> |
Slot5<R1,P1,P2,P3,P4,P5> |
rettype(const Slot5<R2,P1,P2,P3,P4,P5> &s) |
{return AdaptorRettypeSlot5_<R1, |
P1,P2,P3,P4,P5,R2>::create(s.obj()); |
} |
/**************************************************************** |
***** Adaptor Rettype Slot 6 |
****************************************************************/ |
template <class R1, |
class P1,class P2,class P3,class P4,class P5,class P6, |
class R2> |
struct AdaptorRettypeSlot6_ |
: public AdaptorSlot_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef R1 RType; |
#else |
typedef typename Trait<R1>::type RType; |
#endif |
typedef Slot6<R1,P1,P2,P3,P4,P5,P6> SlotType; |
typedef Slot6<R2,P1,P2,P3,P4,P5,P6> InSlotType; |
typedef AdaptorNode Node; |
typedef CallDataObj2<typename SlotType::Func,Node> CallData; |
static RType callback(void* d,P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6) |
{ |
CallData* data=(CallData*)d; |
Node* node=data->obj; |
return RType(((typename InSlotType::Callback&)(node->data_))(p1,p2,p3,p4,p5,p6)); |
} |
static SlotData* create(SlotData *s) |
{ |
SlotData* tmp=(SlotData*)s; |
Node *node=new Node(); |
copy_callback(tmp,node); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.obj=node; |
return tmp; |
} |
}; |
#ifndef SIGC_CXX_VOID_RETURN |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template < |
class P1,class P2,class P3,class P4,class P5,class P6, |
class R2> |
struct AdaptorRettypeSlot6_ |
<void, |
P1,P2,P3,P4,P5,P6, |
R2> |
: public AdaptorSlot_ |
{ |
typedef void RType; |
typedef Slot6<void,P1,P2,P3,P4,P5,P6> SlotType; |
typedef Slot6<R2,P1,P2,P3,P4,P5,P6> InSlotType; |
typedef AdaptorNode Node; |
typedef CallDataObj2<typename SlotType::Func,Node> CallData; |
static RType callback(void* d,P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6) |
{ |
CallData* data=(CallData*)d; |
Node* node=data->obj; |
((typename InSlotType::Callback&)(node->data_))(p1,p2,p3,p4,p5,p6); |
} |
static SlotData* create(SlotData *s) |
{ |
SlotData* tmp=(SlotData*)s; |
Node *node=new Node(); |
copy_callback(tmp,node); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.obj=node; |
return tmp; |
} |
}; |
#endif |
#endif |
template <class R1,class R2,class P1,class P2,class P3,class P4,class P5,class P6> |
Slot6<R1,P1,P2,P3,P4,P5,P6> |
rettype(const Slot6<R2,P1,P2,P3,P4,P5,P6> &s) |
{return AdaptorRettypeSlot6_<R1, |
P1,P2,P3,P4,P5,P6,R2>::create(s.obj()); |
} |
/**************************************************************** |
***** Adaptor Rettype Slot 7 |
****************************************************************/ |
template <class R1, |
class P1,class P2,class P3,class P4,class P5,class P6,class P7, |
class R2> |
struct AdaptorRettypeSlot7_ |
: public AdaptorSlot_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef R1 RType; |
#else |
typedef typename Trait<R1>::type RType; |
#endif |
typedef Slot7<R1,P1,P2,P3,P4,P5,P6,P7> SlotType; |
typedef Slot7<R2,P1,P2,P3,P4,P5,P6,P7> InSlotType; |
typedef AdaptorNode Node; |
typedef CallDataObj2<typename SlotType::Func,Node> CallData; |
static RType callback(void* d,P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7) |
{ |
CallData* data=(CallData*)d; |
Node* node=data->obj; |
return RType(((typename InSlotType::Callback&)(node->data_))(p1,p2,p3,p4,p5,p6,p7)); |
} |
static SlotData* create(SlotData *s) |
{ |
SlotData* tmp=(SlotData*)s; |
Node *node=new Node(); |
copy_callback(tmp,node); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.obj=node; |
return tmp; |
} |
}; |
#ifndef SIGC_CXX_VOID_RETURN |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template < |
class P1,class P2,class P3,class P4,class P5,class P6,class P7, |
class R2> |
struct AdaptorRettypeSlot7_ |
<void, |
P1,P2,P3,P4,P5,P6,P7, |
R2> |
: public AdaptorSlot_ |
{ |
typedef void RType; |
typedef Slot7<void,P1,P2,P3,P4,P5,P6,P7> SlotType; |
typedef Slot7<R2,P1,P2,P3,P4,P5,P6,P7> InSlotType; |
typedef AdaptorNode Node; |
typedef CallDataObj2<typename SlotType::Func,Node> CallData; |
static RType callback(void* d,P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,P7 p7) |
{ |
CallData* data=(CallData*)d; |
Node* node=data->obj; |
((typename InSlotType::Callback&)(node->data_))(p1,p2,p3,p4,p5,p6,p7); |
} |
static SlotData* create(SlotData *s) |
{ |
SlotData* tmp=(SlotData*)s; |
Node *node=new Node(); |
copy_callback(tmp,node); |
CallData &data=reinterpret_cast<CallData&>(tmp->data_); |
data.callback=&callback; |
data.obj=node; |
return tmp; |
} |
}; |
#endif |
#endif |
template <class R1,class R2,class P1,class P2,class P3,class P4,class P5,class P6,class P7> |
Slot7<R1,P1,P2,P3,P4,P5,P6,P7> |
rettype(const Slot7<R2,P1,P2,P3,P4,P5,P6,P7> &s) |
{return AdaptorRettypeSlot7_<R1, |
P1,P2,P3,P4,P5,P6,P7,R2>::create(s.obj()); |
} |
#ifdef SIGC_CXX_NAMESPACES |
} // namespace |
#endif |
#endif |
/contrib/media/updf/include/sigc++/scope.h |
---|
0,0 → 1,292 |
// -*- c++ -*- |
/* |
* Copyright 1999 Karl Nelson <kenelson@ece.ucdavis.edu> |
* |
* This library is free software; you can redistribute it and/or |
* modify it under the terms of the GNU Library General Public |
* License as published by the Free Software Foundation; either |
* version 2 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 the GNU |
* Library General Public License for more details. |
* |
* You should have received a copy of the GNU Library General Public |
* License along with this library; if not, write to the Free |
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
*/ |
#ifndef SIGCXX_SCOPE_H |
#define SIGCXX_SCOPE_H |
#include <sigc++config.h> |
#ifdef SIGC_CXX_NAMESPACES |
namespace SigC |
{ |
#endif |
struct LIBSIGC_API ScopeNode |
{ |
mutable ScopeNode *prev_; |
mutable ScopeNode *next_; |
// removes self from list |
void remove_self(); |
// Called to inform the item that it is erased |
virtual void erase(); |
// inform scopes that invalid requested. |
virtual void disconnect(bool destroy=0); |
ScopeNode() |
#ifdef LIBSIGC_WIN32 |
{prev_=next_=this;} |
#else |
:prev_(this),next_(this) {} |
#endif |
virtual ~ScopeNode(); |
private: |
ScopeNode& operator=(const ScopeNode&); |
ScopeNode(const ScopeNode&); |
}; |
struct LIBSIGC_API DataNode: public ScopeNode |
{ |
virtual void erase(); |
virtual ~DataNode(); |
}; |
/******************************************************************* |
***** Basis Scope |
*******************************************************************/ |
class ObjectScoped; |
class ObjectReferenced; |
class Object; |
class Scope; |
class LIBSIGC_API Reference |
{ |
protected: |
mutable ObjectReferenced* obj_; |
mutable void* cache_; |
public: |
void set_sink(); |
void init(ObjectReferenced* obj); |
void set(ObjectReferenced* obj,void* cache=0,bool ptr=false); |
Reference& operator=(ObjectReferenced *obj) { set(obj); return *this; } |
Reference& operator=(ObjectReferenced &obj) { set(&obj); return *this; } |
Reference& operator=(const Reference& ref) { set(ref.obj_); return *this; }; |
ObjectReferenced* object() const {return obj_;} |
void* cache() const {return cache_;} |
Reference():obj_(0) {} |
Reference(ObjectReferenced &obj) |
{init(&obj);} |
Reference(const Reference& ref) |
{init(ref.obj_);} |
~Reference(); |
}; |
class LIBSIGC_API Scope:public ScopeNode |
{ |
friend class ObjectScoped; |
Scope& operator=(const Scope& scope); |
Scope(const Scope& scope); |
protected: |
void set(ObjectScoped* obj,void* cache,bool ptr); |
mutable ObjectScoped* obj_; |
mutable void* cache_; |
virtual void on_connect()=0; |
virtual void erase(); |
void register_scope(ObjectScoped *); |
void register_scope(const Scope *parent=0); |
void unregister_scope(); |
public: |
void reference(); |
void unreference(); |
void set_sink(); |
ObjectScoped* object() const {return (ObjectScoped*)(obj_);} |
void* cache() const {return cache_;} |
// Inform object it should invalidate its list. |
void invalid(); |
Scope():obj_(0),cache_(0) {} |
virtual ~Scope(); |
}; |
/****************************************************** |
**** Common Scopes |
******************************************************* |
Available Scopes: |
Uncounted - non-reference |
Limit - Limits the lifetime of object to this scope |
Sinks object. |
Extend - Extends the lifetime of the object to this scope |
Sinks object. |
LimitOwned - Conditionally limits the lifetime of object |
Sinks object. |
FuncRef - Extends the lifetime, without sink |
(intended for functions) |
Reference - Extends the lifetime, with sink |
AutoPtr - Shorthand for auto_ptr like scope. |
RefCount - Shorthand for ref_ptr like scope. |
******************************************************/ |
struct Scopes |
{ |
class LIBSIGC_API Uncounted:public Scope |
{ |
Uncounted& operator=(const Uncounted&); |
Uncounted(const Uncounted&); |
public: |
virtual void disconnect(bool level=0); |
Uncounted():Scope() {} |
virtual ~Uncounted(); |
}; |
class LIBSIGC_API Extend:public Scope |
{ |
public: |
Extend& operator=(const Extend&); |
Extend(const Extend&); |
protected: |
virtual void on_connect(); |
virtual void erase(); |
public: |
virtual void disconnect(bool level=0); |
void set(ObjectScoped* obj,void* cache,bool ptr); |
Extend():Scope() {} |
virtual ~Extend(); |
}; |
class LIBSIGC_API Limit:public Scope |
{ |
Limit& operator=(const Limit&); |
Limit(const Limit&); |
protected: |
virtual void on_connect(); |
virtual void erase(); |
public: |
virtual void disconnect(bool level=0); |
void set(ObjectScoped* obj,void* cache,bool ptr); |
Limit():Scope() {} |
virtual ~Limit(); |
}; |
typedef Extend RefCount; |
typedef Reference Lock; |
}; |
/************************************************************* |
***** Lists |
*************************************************************/ |
// Stub for building polylists |
// Iterator skeleton |
struct LIBSIGC_API ScopeIterator_ |
{ |
typedef ScopeNode NodeType; |
private: |
NodeType *node_; |
public: |
inline NodeType* node() {return node_;} |
inline const NodeType* node() const {return node_;} |
inline NodeType& operator*() |
{return *node_; |
} |
inline const NodeType& operator*() const |
{return *node_; |
} |
inline bool operator==(const ScopeIterator_& i) const |
{return node_==i.node_; |
} |
inline bool operator!=(const ScopeIterator_& i) const |
{return node_!=i.node_; |
} |
inline ScopeIterator_& operator++() |
{ |
if (node_) |
node_=(NodeType*)node_->next_; |
return *this; |
} |
ScopeIterator_ operator++(int) |
{ |
ScopeIterator_ tmp=*this; |
++*this; |
return tmp; |
} |
ScopeIterator_& operator= (const ScopeIterator_& i) |
{ |
node_=i.node_; |
return *this; |
} |
ScopeIterator_(const ScopeIterator_ &n):node_(n.node_) {} |
ScopeIterator_(NodeType *n):node_(n) {} |
ScopeIterator_():node_(0) {} |
}; |
class LIBSIGC_API ScopeList |
{ |
public: |
typedef ScopeNode NodeType; |
typedef ScopeIterator_ Iterator; |
ScopeNode node_; |
inline Iterator begin() {return Iterator(node_.next_);} |
inline Iterator end() {return Iterator(&node_);} |
// insert item directly on list |
Iterator insert_direct(Iterator pos,NodeType *n); |
Iterator erase(Iterator pos); |
void erase(Iterator start,Iterator stop) |
{ while (start!=stop) start=erase(start); } |
void swap_elements(Iterator p1,Iterator p2); |
void clear() |
{ erase(begin(),end()); } |
bool empty() const {return node_.next_==&node_;} |
ScopeList():node_() {} |
~ScopeList() { clear(); } |
private: |
ScopeList(const ScopeList&); |
}; |
#ifdef SIGC_CXX_NAMESPACES |
} // namespace sigc |
#endif |
#endif |
/contrib/media/updf/include/sigc++/sigc++config.h |
---|
0,0 → 1,15 |
#ifndef _SIGC_CONFIG_H_ |
#define _SIGC_CONFIG_H_ |
#define SIGC_MAJOR_VERSION 0 |
#define SIGC_MINOR_VERSION 8 |
#define SIGC_MICRO_VERSION 2 |
#define SIGC_CXX_PARTIAL_SPEC 1 /**/ |
#define SIGC_CXX_MEMBER_FUNC_TEMPLATES 1 /**/ |
#define SIGC_CXX_MEMBER_CLASS_TEMPLATES 1 /**/ |
#define SIGC_CXX_MUTABLE 1 /**/ |
#define SIGC_CXX_TEMPLATE_CCTOR 1 |
#define LIBSIGC_API |
#endif |
/contrib/media/updf/include/sigc++/signal_system.h |
---|
0,0 → 1,36 |
/************************************************************************* |
***** A Signal Framework for C++ |
************************************************************************** |
Copyright 1998-1999 Karl Nelson <kenelson@ece.ucdavis.edu> |
Based off of ideas from Gtk-- signal system by Tero Pulkkinen. |
This library is free software; you can redistribute it and/or |
modify it under the terms of the GNU Library General Public |
License as published by the Free Software Foundation; either |
version 2 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 the GNU |
Library General Public License for more details. |
You should have received a copy of the GNU Library General Public |
License along with this library; if not, write to the Free |
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
*************************************************************************/ |
#ifndef SIGCXX_SIGNAL_SYSTEM_H |
#define SIGCXX_SIGNAL_SYSTEM_H |
#include <sigc++/slot.h> |
#include <sigc++/object_slot.h> |
#include <sigc++/func_slot.h> |
#include <sigc++/basic_signal.h> |
#if 0 |
#include <sigc++/signals.h> |
#endif |
#endif |
/contrib/media/updf/include/sigc++/slot.h |
---|
0,0 → 1,1036 |
// -*- c++ -*- |
/* This is a generated file, do not edit. Generated from ../sigc++/macros/slot.h.m4 */ |
#ifndef SIGCXX_SLOT_H |
#define SIGCXX_SLOT_H |
/* |
This file just gives the basic definition of Slots. |
Callback# is the 4 byte data necessary for representing all |
callback types. |
CallData is a specific interpretation of the Callback data. |
Slot_ is a pimple on SlotData containing an Object for |
holding its referencees, a Dependency that removes the slot |
when its caller or receiver die, and a Callback. |
Slot is a handle to a Slot_. |
*/ |
#include <sigc++config.h> |
#include <sigc++/type.h> |
#include <sigc++/object.h> |
#include <sigc++/handle.h> |
#ifdef SIGC_CXX_NAMESPACES |
namespace SigC |
{ |
#endif |
// Base node for a polymorphic list of "extra" data needed |
// by various slots. |
struct LIBSIGC_API SlotNode |
{ |
void *next_; |
SlotNode(); |
virtual ~SlotNode()=0; |
}; |
struct LIBSIGC_API SlotIterator_ |
{ |
typedef SlotNode NodeType; |
typedef SlotIterator_ Iterator; |
NodeType *node_; |
NodeType* node() {return node_;} |
const NodeType* node() const {return node_;} |
NodeType& operator*() |
{return *node_; |
} |
const NodeType& operator*() const |
{return *node_; |
} |
bool operator==(const Iterator& i) const |
{return node_==i.node_; |
} |
bool operator!=(const Iterator& i) const |
{return node_!=i.node_; |
} |
Iterator& operator++() |
{ |
if (node_) |
node_=(NodeType*)node_->next_; |
return *this; |
} |
Iterator operator++(int) |
{Iterator tmp=*this; |
++*this; |
return tmp; |
} |
Iterator& operator= (const Iterator& i) |
{ |
node_=i.node_; |
return *this; |
} |
SlotIterator_():node_(0) {} |
SlotIterator_(NodeType *node):node_(node) {} |
}; |
// This is a list for storing internal data for slots |
struct LIBSIGC_API SlotList_ |
{ |
typedef SlotNode NodeType; |
typedef SlotIterator_ Iterator; |
NodeType* head_; |
Iterator begin() {return ((NodeType*)head_);} |
Iterator end() {return Iterator();} |
const Iterator begin() const {return ((NodeType*)head_);} |
const Iterator end() const {return Iterator();} |
// this is best used at the begining of list. |
Iterator insert_direct(Iterator pos,NodeType *n); |
void clear(); |
bool empty() const {return head_==0;} |
SlotList_():head_(0) |
{} |
~SlotList_() |
{clear();} |
private: |
SlotList_(const SlotList_&); |
}; |
struct SlotData; |
// SlotDependent is an internal of SlotData used to unreference the |
// Slot when either the sender or receiver have gone away |
struct LIBSIGC_API SlotDependent:public ScopeNode |
{ |
struct LIBSIGC_API Dep: public ScopeNode |
{ |
SlotData *parent; |
virtual void erase(); |
Dep() {} |
virtual ~Dep(); |
} dep; |
ScopeNode* receiver() {return &dep;} |
ScopeNode* sender() {return this;} |
SlotData* parent() {return dep.parent;} |
bool connected() |
{return (next_!=this);} |
virtual void erase(); |
void set_parent(SlotData *s) |
{dep.parent=s;} |
SlotDependent(SlotData &s) |
{dep.parent=&s;} |
SlotDependent() |
{} |
virtual ~SlotDependent(); |
}; |
// common data to all callbacks. |
struct Callback_ |
{ |
// callback function |
void* (*func_)(void*); |
struct O; |
struct C1 |
{ |
void* (*f1)(void*); |
}; |
struct C2 |
{ |
O* o; |
void (O::*v)(void); |
}; |
// Object pointer or function pointer |
union {C1 a1; C2 a2;}; |
}; |
// All slots have the same base |
struct LIBSIGC_API SlotData:public ObjectScoped |
{ |
typedef SlotList_ List; |
SlotDependent dep_; |
ScopeNode* receiver() {return dep_.receiver();} |
ScopeNode* sender() {return dep_.sender();} |
// Called from signals to tell slot object it is connected |
// invalidates list and sets weak reference |
void connect(); |
List list_; |
Callback_ data_; |
Callback_& callback() {return data_;} |
SlotData() |
{dep_.set_parent(this);} |
virtual ~SlotData(); |
}; |
typedef Scopes::Extend SlotExtend; |
#ifdef LIBSIGC_MSC |
#pragma warning(disable: 4231) |
LIBSIGC_TMPL template class LIBSIGC_API Handle<SlotData,SlotExtend>; |
#endif |
class LIBSIGC_API Connection:protected Handle<SlotData,SlotExtend> |
{ |
typedef Handle<SlotData,SlotExtend> Base; |
public: |
// hides virtual method |
void disconnect() {if (obj()) obj()->invalid();} |
bool connected() {return Base::connected ();} |
Connection():Base() {} |
Connection(SlotData *s):Base(s) {} |
Connection(const Connection& s):Base(s) { } |
~Connection() {} |
}; |
// possible casts of Callback |
template <class C,class F> |
struct CallDataFunc |
{ |
C callback; |
F func; |
}; |
template <class C,class O> |
struct CallDataObj2 |
{ |
C callback; |
O *obj; |
}; |
template <class C,class O,class F> |
struct CallDataObj3 |
{ |
C callback; |
O* obj; |
F func; |
}; |
// from Abstract_Slots we build abstract slots |
// with various lengths of arguments |
// A slot is not concrete til it has a call |
/**************************************************************** |
***** Abstract Slot 0 |
****************************************************************/ |
template <class R> |
struct Callback0:public Callback_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef R RType; |
#else |
typedef Trait<R>::type RType; |
#endif |
typedef RType (*Func)(void*); |
inline RType call() |
{return ((Func)(func_))((void*)this);} |
inline RType operator()() |
{return ((Func)(func_))((void*)this);} |
}; |
template <class R> |
class Slot0 |
:public Handle<SlotData,SlotExtend> |
{ |
public: |
typedef Handle<SlotData,SlotExtend> Base; |
typedef Callback0<R> Callback; |
typedef typename Callback::RType RType; |
typedef RType (*Func)(void*); |
SlotData* data() const {return (SlotData*)(scope_.object());} |
Slot0() {} |
Slot0(SlotData *s):Base(s) {} |
Slot0(const Slot0& s):Base(s.obj()) {} |
inline RType call() |
{ |
if (connected()) |
return ((Callback&)(data()->callback())).call(); |
return RType(); |
} |
inline RType operator()() |
{ |
if (connected()) |
return ((Callback&)(data()->callback())).call(); |
return RType(); |
} |
}; |
#ifndef SIGC_CXX_VOID_RETURN |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template <> |
struct Callback0<void>:public Callback_ |
{ |
typedef void RType; |
typedef RType (*Func)(void*); |
inline RType call() |
{((Func)(func_))((void*)this);} |
inline RType operator()() |
{((Func)(func_))((void*)this);} |
}; |
template <> |
class Slot0<void> |
:public Handle<SlotData,SlotExtend> |
{ |
public: |
typedef Handle<SlotData,SlotExtend> Base; |
typedef Callback0<void> Callback; |
typedef Callback::RType RType; |
typedef RType (*Func)(void*); |
SlotData* data() const {return (SlotData*)(scope_.object());} |
Slot0() {} |
Slot0(SlotData *s):Base(s) {} |
Slot0(const Slot0& s):Base(s.obj()) {} |
inline RType call() |
{ |
if (connected()) |
((Callback&)(data()->callback())).call(); |
} |
inline RType operator()() |
{ |
if (connected()) |
((Callback&)(data()->callback())).call(); |
} |
}; |
#endif |
#endif |
/**************************************************************** |
***** Abstract Slot 1 |
****************************************************************/ |
template <class R,class P1> |
struct Callback1:public Callback_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef R RType; |
#else |
typedef Trait<R>::type RType; |
#endif |
typedef RType (*Func)(void*,P1); |
inline RType call(typename Trait<P1>::ref p1) |
{return ((Func)(func_))((void*)this,p1);} |
inline RType operator()(typename Trait<P1>::ref p1) |
{return ((Func)(func_))((void*)this,p1);} |
}; |
template <class R,class P1> |
class Slot1 |
:public Handle<SlotData,SlotExtend> |
{ |
public: |
typedef Handle<SlotData,SlotExtend> Base; |
typedef Callback1<R,P1> Callback; |
typedef typename Callback::RType RType; |
typedef RType (*Func)(void*,P1); |
SlotData* data() const {return (SlotData*)(scope_.object());} |
Slot1() {} |
Slot1(SlotData *s):Base(s) {} |
Slot1(const Slot1& s):Base(s.obj()) {} |
inline RType call(typename Trait<P1>::ref p1) |
{ |
if (connected()) |
return ((Callback&)(data()->callback())).call(p1); |
return RType(); |
} |
inline RType operator()(typename Trait<P1>::ref p1) |
{ |
if (connected()) |
return ((Callback&)(data()->callback())).call(p1); |
return RType(); |
} |
}; |
#ifndef SIGC_CXX_VOID_RETURN |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template <class P1> |
struct Callback1<void,P1>:public Callback_ |
{ |
typedef void RType; |
typedef RType (*Func)(void*,P1); |
inline RType call(typename Trait<P1>::ref p1) |
{((Func)(func_))((void*)this,p1);} |
inline RType operator()(typename Trait<P1>::ref p1) |
{((Func)(func_))((void*)this,p1);} |
}; |
template <class P1> |
class Slot1<void,P1> |
:public Handle<SlotData,SlotExtend> |
{ |
public: |
typedef Handle<SlotData,SlotExtend> Base; |
typedef Callback1<void,P1> Callback; |
typedef typename Callback::RType RType; |
typedef RType (*Func)(void*,P1); |
SlotData* data() const {return (SlotData*)(scope_.object());} |
Slot1() {} |
Slot1(SlotData *s):Base(s) {} |
Slot1(const Slot1& s):Base(s.obj()) {} |
inline RType call(typename Trait<P1>::ref p1) |
{ |
if (connected()) |
((Callback&)(data()->callback())).call(p1); |
} |
inline RType operator()(typename Trait<P1>::ref p1) |
{ |
if (connected()) |
((Callback&)(data()->callback())).call(p1); |
} |
}; |
#endif |
#endif |
/**************************************************************** |
***** Abstract Slot 2 |
****************************************************************/ |
template <class R,class P1,class P2> |
struct Callback2:public Callback_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef R RType; |
#else |
typedef Trait<R>::type RType; |
#endif |
typedef RType (*Func)(void*,P1,P2); |
inline RType call(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2) |
{return ((Func)(func_))((void*)this,p1,p2);} |
inline RType operator()(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2) |
{return ((Func)(func_))((void*)this,p1,p2);} |
}; |
template <class R,class P1,class P2> |
class Slot2 |
:public Handle<SlotData,SlotExtend> |
{ |
public: |
typedef Handle<SlotData,SlotExtend> Base; |
typedef Callback2<R,P1,P2> Callback; |
typedef typename Callback::RType RType; |
typedef RType (*Func)(void*,P1,P2); |
SlotData* data() const {return (SlotData*)(scope_.object());} |
Slot2() {} |
Slot2(SlotData *s):Base(s) {} |
Slot2(const Slot2& s):Base(s.obj()) {} |
inline RType call(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2) |
{ |
if (connected()) |
return ((Callback&)(data()->callback())).call(p1,p2); |
return RType(); |
} |
inline RType operator()(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2) |
{ |
if (connected()) |
return ((Callback&)(data()->callback())).call(p1,p2); |
return RType(); |
} |
}; |
#ifndef SIGC_CXX_VOID_RETURN |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template <class P1,class P2> |
struct Callback2<void,P1,P2>:public Callback_ |
{ |
typedef void RType; |
typedef RType (*Func)(void*,P1,P2); |
inline RType call(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2) |
{((Func)(func_))((void*)this,p1,p2);} |
inline RType operator()(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2) |
{((Func)(func_))((void*)this,p1,p2);} |
}; |
template <class P1,class P2> |
class Slot2<void,P1,P2> |
:public Handle<SlotData,SlotExtend> |
{ |
public: |
typedef Handle<SlotData,SlotExtend> Base; |
typedef Callback2<void,P1,P2> Callback; |
typedef typename Callback::RType RType; |
typedef RType (*Func)(void*,P1,P2); |
SlotData* data() const {return (SlotData*)(scope_.object());} |
Slot2() {} |
Slot2(SlotData *s):Base(s) {} |
Slot2(const Slot2& s):Base(s.obj()) {} |
inline RType call(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2) |
{ |
if (connected()) |
((Callback&)(data()->callback())).call(p1,p2); |
} |
inline RType operator()(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2) |
{ |
if (connected()) |
((Callback&)(data()->callback())).call(p1,p2); |
} |
}; |
#endif |
#endif |
/**************************************************************** |
***** Abstract Slot 3 |
****************************************************************/ |
template <class R,class P1,class P2,class P3> |
struct Callback3:public Callback_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef R RType; |
#else |
typedef Trait<R>::type RType; |
#endif |
typedef RType (*Func)(void*,P1,P2,P3); |
inline RType call(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3) |
{return ((Func)(func_))((void*)this,p1,p2,p3);} |
inline RType operator()(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3) |
{return ((Func)(func_))((void*)this,p1,p2,p3);} |
}; |
template <class R,class P1,class P2,class P3> |
class Slot3 |
:public Handle<SlotData,SlotExtend> |
{ |
public: |
typedef Handle<SlotData,SlotExtend> Base; |
typedef Callback3<R,P1,P2,P3> Callback; |
typedef typename Callback::RType RType; |
typedef RType (*Func)(void*,P1,P2,P3); |
SlotData* data() const {return (SlotData*)(scope_.object());} |
Slot3() {} |
Slot3(SlotData *s):Base(s) {} |
Slot3(const Slot3& s):Base(s.obj()) {} |
inline RType call(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3) |
{ |
if (connected()) |
return ((Callback&)(data()->callback())).call(p1,p2,p3); |
return RType(); |
} |
inline RType operator()(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3) |
{ |
if (connected()) |
return ((Callback&)(data()->callback())).call(p1,p2,p3); |
return RType(); |
} |
}; |
#ifndef SIGC_CXX_VOID_RETURN |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template <class P1,class P2,class P3> |
struct Callback3<void,P1,P2,P3>:public Callback_ |
{ |
typedef void RType; |
typedef RType (*Func)(void*,P1,P2,P3); |
inline RType call(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3) |
{((Func)(func_))((void*)this,p1,p2,p3);} |
inline RType operator()(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3) |
{((Func)(func_))((void*)this,p1,p2,p3);} |
}; |
template <class P1,class P2,class P3> |
class Slot3<void,P1,P2,P3> |
:public Handle<SlotData,SlotExtend> |
{ |
public: |
typedef Handle<SlotData,SlotExtend> Base; |
typedef Callback3<void,P1,P2,P3> Callback; |
typedef typename Callback::RType RType; |
typedef RType (*Func)(void*,P1,P2,P3); |
SlotData* data() const {return (SlotData*)(scope_.object());} |
Slot3() {} |
Slot3(SlotData *s):Base(s) {} |
Slot3(const Slot3& s):Base(s.obj()) {} |
inline RType call(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3) |
{ |
if (connected()) |
((Callback&)(data()->callback())).call(p1,p2,p3); |
} |
inline RType operator()(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3) |
{ |
if (connected()) |
((Callback&)(data()->callback())).call(p1,p2,p3); |
} |
}; |
#endif |
#endif |
/**************************************************************** |
***** Abstract Slot 4 |
****************************************************************/ |
template <class R,class P1,class P2,class P3,class P4> |
struct Callback4:public Callback_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef R RType; |
#else |
typedef Trait<R>::type RType; |
#endif |
typedef RType (*Func)(void*,P1,P2,P3,P4); |
inline RType call(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3,typename Trait<P4>::ref p4) |
{return ((Func)(func_))((void*)this,p1,p2,p3,p4);} |
inline RType operator()(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3,typename Trait<P4>::ref p4) |
{return ((Func)(func_))((void*)this,p1,p2,p3,p4);} |
}; |
template <class R,class P1,class P2,class P3,class P4> |
class Slot4 |
:public Handle<SlotData,SlotExtend> |
{ |
public: |
typedef Handle<SlotData,SlotExtend> Base; |
typedef Callback4<R,P1,P2,P3,P4> Callback; |
typedef typename Callback::RType RType; |
typedef RType (*Func)(void*,P1,P2,P3,P4); |
SlotData* data() const {return (SlotData*)(scope_.object());} |
Slot4() {} |
Slot4(SlotData *s):Base(s) {} |
Slot4(const Slot4& s):Base(s.obj()) {} |
inline RType call(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3,typename Trait<P4>::ref p4) |
{ |
if (connected()) |
return ((Callback&)(data()->callback())).call(p1,p2,p3,p4); |
return RType(); |
} |
inline RType operator()(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3,typename Trait<P4>::ref p4) |
{ |
if (connected()) |
return ((Callback&)(data()->callback())).call(p1,p2,p3,p4); |
return RType(); |
} |
}; |
#ifndef SIGC_CXX_VOID_RETURN |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template <class P1,class P2,class P3,class P4> |
struct Callback4<void,P1,P2,P3,P4>:public Callback_ |
{ |
typedef void RType; |
typedef RType (*Func)(void*,P1,P2,P3,P4); |
inline RType call(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3,typename Trait<P4>::ref p4) |
{((Func)(func_))((void*)this,p1,p2,p3,p4);} |
inline RType operator()(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3,typename Trait<P4>::ref p4) |
{((Func)(func_))((void*)this,p1,p2,p3,p4);} |
}; |
template <class P1,class P2,class P3,class P4> |
class Slot4<void,P1,P2,P3,P4> |
:public Handle<SlotData,SlotExtend> |
{ |
public: |
typedef Handle<SlotData,SlotExtend> Base; |
typedef Callback4<void,P1,P2,P3,P4> Callback; |
typedef typename Callback::RType RType; |
typedef RType (*Func)(void*,P1,P2,P3,P4); |
SlotData* data() const {return (SlotData*)(scope_.object());} |
Slot4() {} |
Slot4(SlotData *s):Base(s) {} |
Slot4(const Slot4& s):Base(s.obj()) {} |
inline RType call(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3,typename Trait<P4>::ref p4) |
{ |
if (connected()) |
((Callback&)(data()->callback())).call(p1,p2,p3,p4); |
} |
inline RType operator()(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3,typename Trait<P4>::ref p4) |
{ |
if (connected()) |
((Callback&)(data()->callback())).call(p1,p2,p3,p4); |
} |
}; |
#endif |
#endif |
/**************************************************************** |
***** Abstract Slot 5 |
****************************************************************/ |
template <class R,class P1,class P2,class P3,class P4,class P5> |
struct Callback5:public Callback_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef R RType; |
#else |
typedef Trait<R>::type RType; |
#endif |
typedef RType (*Func)(void*,P1,P2,P3,P4,P5); |
inline RType call(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3,typename Trait<P4>::ref p4,typename Trait<P5>::ref p5) |
{return ((Func)(func_))((void*)this,p1,p2,p3,p4,p5);} |
inline RType operator()(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3,typename Trait<P4>::ref p4,typename Trait<P5>::ref p5) |
{return ((Func)(func_))((void*)this,p1,p2,p3,p4,p5);} |
}; |
template <class R,class P1,class P2,class P3,class P4,class P5> |
class Slot5 |
:public Handle<SlotData,SlotExtend> |
{ |
public: |
typedef Handle<SlotData,SlotExtend> Base; |
typedef Callback5<R,P1,P2,P3,P4,P5> Callback; |
typedef typename Callback::RType RType; |
typedef RType (*Func)(void*,P1,P2,P3,P4,P5); |
SlotData* data() const {return (SlotData*)(scope_.object());} |
Slot5() {} |
Slot5(SlotData *s):Base(s) {} |
Slot5(const Slot5& s):Base(s.obj()) {} |
inline RType call(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3,typename Trait<P4>::ref p4,typename Trait<P5>::ref p5) |
{ |
if (connected()) |
return ((Callback&)(data()->callback())).call(p1,p2,p3,p4,p5); |
return RType(); |
} |
inline RType operator()(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3,typename Trait<P4>::ref p4,typename Trait<P5>::ref p5) |
{ |
if (connected()) |
return ((Callback&)(data()->callback())).call(p1,p2,p3,p4,p5); |
return RType(); |
} |
}; |
#ifndef SIGC_CXX_VOID_RETURN |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template <class P1,class P2,class P3,class P4,class P5> |
struct Callback5<void,P1,P2,P3,P4,P5>:public Callback_ |
{ |
typedef void RType; |
typedef RType (*Func)(void*,P1,P2,P3,P4,P5); |
inline RType call(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3,typename Trait<P4>::ref p4,typename Trait<P5>::ref p5) |
{((Func)(func_))((void*)this,p1,p2,p3,p4,p5);} |
inline RType operator()(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3,typename Trait<P4>::ref p4,typename Trait<P5>::ref p5) |
{((Func)(func_))((void*)this,p1,p2,p3,p4,p5);} |
}; |
template <class P1,class P2,class P3,class P4,class P5> |
class Slot5<void,P1,P2,P3,P4,P5> |
:public Handle<SlotData,SlotExtend> |
{ |
public: |
typedef Handle<SlotData,SlotExtend> Base; |
typedef Callback5<void,P1,P2,P3,P4,P5> Callback; |
typedef typename Callback::RType RType; |
typedef RType (*Func)(void*,P1,P2,P3,P4,P5); |
SlotData* data() const {return (SlotData*)(scope_.object());} |
Slot5() {} |
Slot5(SlotData *s):Base(s) {} |
Slot5(const Slot5& s):Base(s.obj()) {} |
inline RType call(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3,typename Trait<P4>::ref p4,typename Trait<P5>::ref p5) |
{ |
if (connected()) |
((Callback&)(data()->callback())).call(p1,p2,p3,p4,p5); |
} |
inline RType operator()(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3,typename Trait<P4>::ref p4,typename Trait<P5>::ref p5) |
{ |
if (connected()) |
((Callback&)(data()->callback())).call(p1,p2,p3,p4,p5); |
} |
}; |
#endif |
#endif |
/**************************************************************** |
***** Abstract Slot 6 |
****************************************************************/ |
template <class R,class P1,class P2,class P3,class P4,class P5,class P6> |
struct Callback6:public Callback_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef R RType; |
#else |
typedef Trait<R>::type RType; |
#endif |
typedef RType (*Func)(void*,P1,P2,P3,P4,P5,P6); |
inline RType call(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3,typename Trait<P4>::ref p4,typename Trait<P5>::ref p5,typename Trait<P6>::ref p6) |
{return ((Func)(func_))((void*)this,p1,p2,p3,p4,p5,p6);} |
inline RType operator()(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3,typename Trait<P4>::ref p4,typename Trait<P5>::ref p5,typename Trait<P6>::ref p6) |
{return ((Func)(func_))((void*)this,p1,p2,p3,p4,p5,p6);} |
}; |
template <class R,class P1,class P2,class P3,class P4,class P5,class P6> |
class Slot6 |
:public Handle<SlotData,SlotExtend> |
{ |
public: |
typedef Handle<SlotData,SlotExtend> Base; |
typedef Callback6<R,P1,P2,P3,P4,P5,P6> Callback; |
typedef typename Callback::RType RType; |
typedef RType (*Func)(void*,P1,P2,P3,P4,P5,P6); |
SlotData* data() const {return (SlotData*)(scope_.object());} |
Slot6() {} |
Slot6(SlotData *s):Base(s) {} |
Slot6(const Slot6& s):Base(s.obj()) {} |
inline RType call(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3,typename Trait<P4>::ref p4,typename Trait<P5>::ref p5,typename Trait<P6>::ref p6) |
{ |
if (connected()) |
return ((Callback&)(data()->callback())).call(p1,p2,p3,p4,p5,p6); |
return RType(); |
} |
inline RType operator()(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3,typename Trait<P4>::ref p4,typename Trait<P5>::ref p5,typename Trait<P6>::ref p6) |
{ |
if (connected()) |
return ((Callback&)(data()->callback())).call(p1,p2,p3,p4,p5,p6); |
return RType(); |
} |
}; |
#ifndef SIGC_CXX_VOID_RETURN |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template <class P1,class P2,class P3,class P4,class P5,class P6> |
struct Callback6<void,P1,P2,P3,P4,P5,P6>:public Callback_ |
{ |
typedef void RType; |
typedef RType (*Func)(void*,P1,P2,P3,P4,P5,P6); |
inline RType call(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3,typename Trait<P4>::ref p4,typename Trait<P5>::ref p5,typename Trait<P6>::ref p6) |
{((Func)(func_))((void*)this,p1,p2,p3,p4,p5,p6);} |
inline RType operator()(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3,typename Trait<P4>::ref p4,typename Trait<P5>::ref p5,typename Trait<P6>::ref p6) |
{((Func)(func_))((void*)this,p1,p2,p3,p4,p5,p6);} |
}; |
template <class P1,class P2,class P3,class P4,class P5,class P6> |
class Slot6<void,P1,P2,P3,P4,P5,P6> |
:public Handle<SlotData,SlotExtend> |
{ |
public: |
typedef Handle<SlotData,SlotExtend> Base; |
typedef Callback6<void,P1,P2,P3,P4,P5,P6> Callback; |
typedef typename Callback::RType RType; |
typedef RType (*Func)(void*,P1,P2,P3,P4,P5,P6); |
SlotData* data() const {return (SlotData*)(scope_.object());} |
Slot6() {} |
Slot6(SlotData *s):Base(s) {} |
Slot6(const Slot6& s):Base(s.obj()) {} |
inline RType call(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3,typename Trait<P4>::ref p4,typename Trait<P5>::ref p5,typename Trait<P6>::ref p6) |
{ |
if (connected()) |
((Callback&)(data()->callback())).call(p1,p2,p3,p4,p5,p6); |
} |
inline RType operator()(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3,typename Trait<P4>::ref p4,typename Trait<P5>::ref p5,typename Trait<P6>::ref p6) |
{ |
if (connected()) |
((Callback&)(data()->callback())).call(p1,p2,p3,p4,p5,p6); |
} |
}; |
#endif |
#endif |
/**************************************************************** |
***** Abstract Slot 7 |
****************************************************************/ |
template <class R,class P1,class P2,class P3,class P4,class P5,class P6,class P7> |
struct Callback7:public Callback_ |
{ |
#ifdef SIGC_CXX_PARTIAL_SPEC |
typedef R RType; |
#else |
typedef Trait<R>::type RType; |
#endif |
typedef RType (*Func)(void*,P1,P2,P3,P4,P5,P6,P7); |
inline RType call(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3,typename Trait<P4>::ref p4,typename Trait<P5>::ref p5,typename Trait<P6>::ref p6,typename Trait<P7>::ref p7) |
{return ((Func)(func_))((void*)this,p1,p2,p3,p4,p5,p6,p7);} |
inline RType operator()(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3,typename Trait<P4>::ref p4,typename Trait<P5>::ref p5,typename Trait<P6>::ref p6,typename Trait<P7>::ref p7) |
{return ((Func)(func_))((void*)this,p1,p2,p3,p4,p5,p6,p7);} |
}; |
template <class R,class P1,class P2,class P3,class P4,class P5,class P6,class P7> |
class Slot7 |
:public Handle<SlotData,SlotExtend> |
{ |
public: |
typedef Handle<SlotData,SlotExtend> Base; |
typedef Callback7<R,P1,P2,P3,P4,P5,P6,P7> Callback; |
typedef typename Callback::RType RType; |
typedef RType (*Func)(void*,P1,P2,P3,P4,P5,P6,P7); |
SlotData* data() const {return (SlotData*)(scope_.object());} |
Slot7() {} |
Slot7(SlotData *s):Base(s) {} |
Slot7(const Slot7& s):Base(s.obj()) {} |
inline RType call(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3,typename Trait<P4>::ref p4,typename Trait<P5>::ref p5,typename Trait<P6>::ref p6,typename Trait<P7>::ref p7) |
{ |
if (connected()) |
return ((Callback&)(data()->callback())).call(p1,p2,p3,p4,p5,p6,p7); |
return RType(); |
} |
inline RType operator()(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3,typename Trait<P4>::ref p4,typename Trait<P5>::ref p5,typename Trait<P6>::ref p6,typename Trait<P7>::ref p7) |
{ |
if (connected()) |
return ((Callback&)(data()->callback())).call(p1,p2,p3,p4,p5,p6,p7); |
return RType(); |
} |
}; |
#ifndef SIGC_CXX_VOID_RETURN |
#ifdef SIGC_CXX_PARTIAL_SPEC |
template <class P1,class P2,class P3,class P4,class P5,class P6,class P7> |
struct Callback7<void,P1,P2,P3,P4,P5,P6,P7>:public Callback_ |
{ |
typedef void RType; |
typedef RType (*Func)(void*,P1,P2,P3,P4,P5,P6,P7); |
inline RType call(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3,typename Trait<P4>::ref p4,typename Trait<P5>::ref p5,typename Trait<P6>::ref p6,typename Trait<P7>::ref p7) |
{((Func)(func_))((void*)this,p1,p2,p3,p4,p5,p6,p7);} |
inline RType operator()(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3,typename Trait<P4>::ref p4,typename Trait<P5>::ref p5,typename Trait<P6>::ref p6,typename Trait<P7>::ref p7) |
{((Func)(func_))((void*)this,p1,p2,p3,p4,p5,p6,p7);} |
}; |
template <class P1,class P2,class P3,class P4,class P5,class P6,class P7> |
class Slot7<void,P1,P2,P3,P4,P5,P6,P7> |
:public Handle<SlotData,SlotExtend> |
{ |
public: |
typedef Handle<SlotData,SlotExtend> Base; |
typedef Callback7<void,P1,P2,P3,P4,P5,P6,P7> Callback; |
typedef typename Callback::RType RType; |
typedef RType (*Func)(void*,P1,P2,P3,P4,P5,P6,P7); |
SlotData* data() const {return (SlotData*)(scope_.object());} |
Slot7() {} |
Slot7(SlotData *s):Base(s) {} |
Slot7(const Slot7& s):Base(s.obj()) {} |
inline RType call(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3,typename Trait<P4>::ref p4,typename Trait<P5>::ref p5,typename Trait<P6>::ref p6,typename Trait<P7>::ref p7) |
{ |
if (connected()) |
((Callback&)(data()->callback())).call(p1,p2,p3,p4,p5,p6,p7); |
} |
inline RType operator()(typename Trait<P1>::ref p1,typename Trait<P2>::ref p2,typename Trait<P3>::ref p3,typename Trait<P4>::ref p4,typename Trait<P5>::ref p5,typename Trait<P6>::ref p6,typename Trait<P7>::ref p7) |
{ |
if (connected()) |
((Callback&)(data()->callback())).call(p1,p2,p3,p4,p5,p6,p7); |
} |
}; |
#endif |
#endif |
#ifdef SIGC_CXX_NAMESPACES |
} // namespace |
#endif |
#endif // SIGCXX_SLOT_H |
/contrib/media/updf/include/sigc++/thread.h |
---|
0,0 → 1,242 |
// -*- c++ -*- |
/* |
* Copyright 1999 Karl Nelson <kenelson@ece.ucdavis.edu> |
* |
* This library is free software; you can redistribute it and/or |
* modify it under the terms of the GNU Library General Public |
* License as published by the Free Software Foundation; either |
* version 2 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 the GNU |
* Library General Public License for more details. |
* |
* You should have received a copy of the GNU Library General Public |
* License along with this library; if not, write to the Free |
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
*/ |
#ifndef SIGCXX_THREAD_H |
#define SIGCXX_THREAD_H |
#include <sigc++config.h> |
#ifdef SIGC_PTHREADS |
#ifdef SIGC_THREAD_IMPL |
#include <pthread.h> |
#else |
#include <time.h> |
#endif |
#ifdef SIGC_CXX_NAMESPACES |
namespace SigC |
{ |
namespace Threads |
{ |
#else |
#define Threads |
#endif |
#ifdef SIGC_THREAD_IMPL |
#ifdef SIGC_PTHREAD_DCE |
struct CondAttr { pthread_condattr_t impl_;}; |
struct MutexAttr { pthread_mutexattr_t impl_;}; |
struct ThreadAttr { pthread_attr_t impl_;}; |
#else |
struct CondAttr { pthread_condattr_t* impl_;}; |
struct MutexAttr { pthread_mutexattr_t* impl_;}; |
struct ThreadAttr { pthread_attr_t* impl_;}; |
#endif |
typedef pthread_mutex_t MutexImpl; |
typedef pthread_cond_t CondImpl; |
typedef pthread_key_t KeyImpl; |
typedef pthread_t ThreadImpl; |
#else |
class CondAttr {unsigned char dummy[SIGC_PTHREAD_COND_ATTR];}; |
class CondImpl {unsigned char dummy[SIGC_PTHREAD_COND_IMPL];}; |
class MutexAttr {unsigned char dummy[SIGC_PTHREAD_MUTEX_ATTR];}; |
class MutexImpl {unsigned char dummy[SIGC_PTHREAD_MUTEX_IMPL];}; |
class ThreadAttr {unsigned char dummy[SIGC_PTHREAD_THREAD_ATTR];}; |
class ThreadImpl {unsigned char dummy[SIGC_PTHREAD_THREAD_IMPL];}; |
class KeyImpl {unsigned char dummy[SIGC_PTHREAD_KEY_IMPL];}; |
#endif |
// Mutual Exclusion |
class Mutex |
{ |
typedef MutexImpl Impl; |
private: |
Impl mutex_; |
int destroy(); |
public: |
static MutexAttr Default; |
#ifdef SIGC_THREAD_IMPL |
operator Impl* () {return (Impl*)(&mutex_);} |
#endif |
Mutex(const MutexAttr attr=Default); |
// (needs work) |
~Mutex(); |
int lock(); |
int trylock(); |
int unlock(); |
}; |
// A lazy way to unlock at end of scope |
struct MLock |
{ |
Mutex &mutex_; |
MLock(Mutex& mutex):mutex_(mutex) {mutex_.lock();} |
~MLock() {mutex_.unlock();} |
}; |
// Condition Variable |
struct Condition |
{ |
typedef CondImpl Impl; |
private: |
Impl cond_; |
int destroy(); |
public: |
static CondAttr Default; |
#ifdef SIGC_THREAD_IMPL |
operator Impl* () {return (Impl*)(&cond_);} |
#endif |
Condition(const CondAttr &attr=Default); |
~Condition(); |
// restarts exactly one thread hung on condition |
int signal(); |
// restarts all threads waiting on condition |
int broadcast(); |
// unlocks a mutex while waiting on a condition, then reaquires lock. |
int wait(Mutex &m); |
// unlocks a mutex while waiting on a condition, then reaquires lock |
// with a fixed maximum duration. |
int wait(Mutex &m,struct timespec* spec); |
}; |
// Integer Semaphore |
struct Semaphore |
{ |
int value_; |
Condition sig_; |
Mutex access_; |
void up(); |
void down(); |
Semaphore(int value=1); |
~Semaphore(); |
}; |
struct Private_ |
{ |
KeyImpl key_; |
void* get(); |
void set(void *value); |
void create(void (*dtor)(void*)); |
void destroy(); |
}; |
// Private is a thread split static. |
template <class T> |
class Private : private Private_ |
{ |
private: |
static void dtor(void* v) |
{ |
T* obj=(T*)v; |
delete obj; |
} |
public: |
T& operator =(const T& t) |
{return (((T&)*this)=t);} |
operator T& () |
{ |
T *value=(T*)get(); |
if (!value) |
set((void*)(value=new T())); |
return *(value); |
} |
Private() { create(&dtor); } |
~Private() { destroy(); } |
}; |
// int needs to initialized |
template <> |
class Private<int> : private Private_ |
{ |
private: |
static void dtor(void* v) |
{ |
int* obj=(int*)v; |
delete obj; |
} |
public: |
int& operator =(const int& t) |
{return (((int&)*this)=t);} |
operator int& () |
{ |
int *value=(int*)get(); |
if (!value) |
set((void*)(value=new int(0))); |
return *(value); |
} |
Private() { create(&dtor); } |
~Private() { destroy(); } |
}; |
struct Thread |
{ |
protected: |
typedef ThreadImpl Impl; |
Impl thread_; |
void* arg_; |
ThreadAttr attr_; |
static void* call_main_(void* obj); |
public: |
#ifdef SIGC_THREAD_IMPL |
operator Impl* () {return &thread_;} |
#endif |
virtual void* main(void*)=0; |
int detach(); |
static ThreadAttr Default; |
// arg is for passing extra data to main, but never pass a |
// local variable or address of local variable. Arg must |
// be available throughout life of program. |
int start(void* arg=0); |
Thread(const ThreadAttr &attr=Default); |
virtual ~Thread(); |
}; |
#ifdef SIGC_CXX_NAMESPACES |
} /* namespace Threads */ |
} /* namespace SigC */ |
#endif |
#endif /* SIGC_PTHREADS */ |
#endif /* SIGCXX_THREAD_H */ |
/contrib/media/updf/include/sigc++/type.h |
---|
0,0 → 1,63 |
// -*- c++ -*- |
/* |
* Copyright 1999 Karl Nelson <kenelson@ece.ucdavis.edu> |
* |
* This library is free software; you can redistribute it and/or |
* modify it under the terms of the GNU Library General Public |
* License as published by the Free Software Foundation; either |
* version 2 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 the GNU |
* Library General Public License for more details. |
* |
* You should have received a copy of the GNU Library General Public |
* License along with this library; if not, write to the Free |
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
*/ |
#ifndef SIGCXX_TYPE_H |
#define SIGCXX_TYPE_H |
#include <sigc++config.h> |
#ifdef SIGC_CXX_NAMESPACES |
namespace SigC |
{ |
#endif |
/* some classes for making parameter passing easier */ |
#ifdef SIGC_CXX_SPECIALIZE_REFERENCES |
template <typename T> |
struct Trait |
{ |
typedef const T& ref; |
typedef T type; |
}; |
template <typename T> |
struct Trait<T&> |
{ |
typedef T& ref; |
typedef T& type; |
}; |
#else |
template <typename T> |
struct Trait |
{ |
typedef T ref; // VC++ does not support reference typedef |
typedef T type; |
}; |
#endif |
template <> |
struct Trait<void>:public Trait<int> |
{}; |
#ifdef SIGC_CXX_NAMESPACES |
} |
#endif |
#endif |