mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-11 08:40:44 +00:00
New file.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@978 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
3ead61ed5e
commit
5b2c1a0fa6
4 changed files with 364 additions and 0 deletions
111
Headers/gnustep/base/x-basics.h.in
Normal file
111
Headers/gnustep/base/x-basics.h.in
Normal file
|
@ -0,0 +1,111 @@
|
|||
/* Basic functions for @XX@ structures.
|
||||
* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||
*
|
||||
* Author: Albin L. Jones <Albin.L.Jones@Dartmouth.EDU>
|
||||
* Created: Mon Dec 11 01:24:48 EST 1995
|
||||
* Updated: Sat Feb 10 09:56:21 EST 1996
|
||||
* Serial: 96.02.10.01
|
||||
*
|
||||
* This file is part of the GNU Objective C Class Library.
|
||||
*
|
||||
* 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 __@XX@_xx_h_OBJECTS_INCLUDE
|
||||
#define __@XX@_xx_h_OBJECTS_INCLUDE 1
|
||||
|
||||
/**** Included Headers *******************************************************/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <objects/allocs.h>
|
||||
#include <objects/number.h>
|
||||
#include <objects/magic.h>
|
||||
|
||||
/**** Type, Constant, and Macro Definitions **********************************/
|
||||
|
||||
#define __@XX@__ 1
|
||||
|
||||
/**** Function Implementations ***********************************************/
|
||||
|
||||
/** Magic **/
|
||||
|
||||
/* Returns XX's magic number. */
|
||||
int objects_@XX@_magic (objects_@XX@_t *xx);
|
||||
|
||||
/** Allocs **/
|
||||
|
||||
/* Returns the allocs used to create and maintain XX. */
|
||||
objects_allocs_t objects_@XX@_allocs (objects_@XX@_t *xx);
|
||||
|
||||
/** Names **/
|
||||
|
||||
/* Returns the name that was given to XX. */
|
||||
const char *objects_@XX@_name (objects_@XX@_t *xx);
|
||||
|
||||
/* Gives XX a name. Space is allocated, and the contents of the
|
||||
* NUL-terminated NAME are copied. Deallocating XX frees up the
|
||||
* space. I.e., it is not the responsibility of the programmer to
|
||||
* keep track of space allocated for this procedure. */
|
||||
const char *objects_@XX@_set_name (objects_@XX@_t *xx, const char *name);
|
||||
|
||||
/* Takes away XX's name. */
|
||||
void objects_@XX@_unset_name (objects_@XX@_t *xx);
|
||||
|
||||
/** Number **/
|
||||
|
||||
/* Returns the (process-wide) unique number given to the Libfn
|
||||
* structure XX. See <objects/number.h> for more info. */
|
||||
size_t objects_@XX@_serial_number (objects_@XX@_t *xx);
|
||||
|
||||
/* Gives XX a new (process-wide) unique number. Numbers are not
|
||||
* reused. See <objects/number.h> for more info. */
|
||||
size_t _objects_@XX@_set_serial_number (objects_@XX@_t *xx);
|
||||
|
||||
/** Extras **/
|
||||
|
||||
/* Sets the callbacks associated with XX's ``extra''. NOTE: This must
|
||||
* be done before calling `objects_@XX@_set_extra()', as these callbacks
|
||||
* are used in that routine. */
|
||||
objects_callbacks_t objects_@XX@_set_extra_callbacks (objects_@XX@_t *xx, objects_callbacks_t callbacks);
|
||||
|
||||
/* Returns the callbacks associated with XX's ``extra''. */
|
||||
objects_callbacks_t objects_@XX@_extra_callbacks (objects_@XX@_t *xx, objects_callbacks_t callbacks);
|
||||
|
||||
/* Returns XX's ``extra'', a little extra space that each Libobjects
|
||||
* structure carries around with it. Its use is
|
||||
* implementation-dependent. */
|
||||
const void *objects_@XX@_extra (objects_@XX@_t *xx);
|
||||
|
||||
/* Sets XX's ``extra'', a little extra space that each Libobjets structure
|
||||
* carries around with it. Its use is implementation-dependent. */
|
||||
const void *objects_@XX@_set_extra (objects_@XX@_t *xx, const void *extra);
|
||||
|
||||
/* Resets XX's ``extra''. */
|
||||
void objects_@XX@_unset_extra (objects_@XX@_t *xx);
|
||||
|
||||
/** Low-level Creation and Destruction **/
|
||||
|
||||
/* Handles the universal, low-level allocation of Libobjects structures. */
|
||||
objects_@XX@_t *_objects_@XX@_alloc_with_allocs (objects_allocs_t allocs);
|
||||
|
||||
/* Handles the universal, low-level deallocation of Libobjects structures. */
|
||||
void _objects_@XX@_dealloc (objects_@XX@_t *xx);
|
||||
|
||||
/* Handles the low-level copying of Libobjects structures. */
|
||||
objects_@XX@_t *_objects_@XX@_copy_with_allocs (objects_@XX@_t *xx, objects_allocs_t allocs);
|
||||
|
||||
#endif /* __@XX@_xx_h_OBJECTS_INCLUDE */
|
||||
|
71
Headers/gnustep/base/x-callbacks.h.in
Normal file
71
Headers/gnustep/base/x-callbacks.h.in
Normal file
|
@ -0,0 +1,71 @@
|
|||
/* Getting callbacks from @YY@ structures.
|
||||
* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||
*
|
||||
* Author: Albin L. Jones <Albin.L.Jones@Dartmouth.EDU>
|
||||
* Created: Mon Dec 11 03:41:00 EST 1995
|
||||
* Updated: Sat Feb 10 10:21:13 EST 1996
|
||||
* Serial: 96.02.10.01
|
||||
*
|
||||
* This file is part of the GNU Objective C Class Library.
|
||||
*
|
||||
* 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 __@YY@_yy_h_OBJECTS_INCLUDE
|
||||
#define __@YY@_yy_h_OBJECTS_INCLUDE 1
|
||||
|
||||
/**** Included Headers *******************************************************/
|
||||
|
||||
#include <objects/callbacks.h>
|
||||
#include <objects/@YY@.h>
|
||||
|
||||
/**** Type, Constant, and Macro Definitions **********************************/
|
||||
|
||||
#define __@YY@__ 1
|
||||
|
||||
/**** Function Implementations ***********************************************/
|
||||
|
||||
#ifdef __map__
|
||||
|
||||
/** Callbacks **/
|
||||
|
||||
/* Returns the callbacks associated with YY's keys. */
|
||||
objects_callbacks_t objects_@YY@_key_callbacks (objects_@YY@_t *yy);
|
||||
|
||||
/* Returns the ``bogus'' marker associated with YY's keys. */
|
||||
const void *objects_@YY@_not_a_key_marker (objects_@YY@_t *yy);
|
||||
|
||||
/* Returns the callbacks associated with YY's values. */
|
||||
objects_callbacks_t
|
||||
objects_@YY@_value_callbacks (objects_@YY@_t *yy);
|
||||
|
||||
/* Returns the ``bogus'' marker associated with YY's values. */
|
||||
const void *objects_@YY@_not_a_value_marker (objects_@YY@_t *yy);
|
||||
|
||||
#else /* !__map__ */
|
||||
|
||||
/** Callbacks **/
|
||||
|
||||
/* Returns the callbacks associated with YY's elements. */
|
||||
objects_callbacks_t objects_@YY@_element_callbacks (objects_@YY@_t *yy);
|
||||
|
||||
/* Returns the ``bogus'' marker associated with YY's elements. */
|
||||
const void *objects_@YY@_not_an_element_marker (objects_@YY@_t *yy);
|
||||
|
||||
#endif /* __map__ */
|
||||
|
||||
#endif /* __@YY@_yy_h_OBJECTS_INCLUDE */
|
||||
|
111
Source/objects/x-basics.h.in
Normal file
111
Source/objects/x-basics.h.in
Normal file
|
@ -0,0 +1,111 @@
|
|||
/* Basic functions for @XX@ structures.
|
||||
* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||
*
|
||||
* Author: Albin L. Jones <Albin.L.Jones@Dartmouth.EDU>
|
||||
* Created: Mon Dec 11 01:24:48 EST 1995
|
||||
* Updated: Sat Feb 10 09:56:21 EST 1996
|
||||
* Serial: 96.02.10.01
|
||||
*
|
||||
* This file is part of the GNU Objective C Class Library.
|
||||
*
|
||||
* 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 __@XX@_xx_h_OBJECTS_INCLUDE
|
||||
#define __@XX@_xx_h_OBJECTS_INCLUDE 1
|
||||
|
||||
/**** Included Headers *******************************************************/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <objects/allocs.h>
|
||||
#include <objects/number.h>
|
||||
#include <objects/magic.h>
|
||||
|
||||
/**** Type, Constant, and Macro Definitions **********************************/
|
||||
|
||||
#define __@XX@__ 1
|
||||
|
||||
/**** Function Implementations ***********************************************/
|
||||
|
||||
/** Magic **/
|
||||
|
||||
/* Returns XX's magic number. */
|
||||
int objects_@XX@_magic (objects_@XX@_t *xx);
|
||||
|
||||
/** Allocs **/
|
||||
|
||||
/* Returns the allocs used to create and maintain XX. */
|
||||
objects_allocs_t objects_@XX@_allocs (objects_@XX@_t *xx);
|
||||
|
||||
/** Names **/
|
||||
|
||||
/* Returns the name that was given to XX. */
|
||||
const char *objects_@XX@_name (objects_@XX@_t *xx);
|
||||
|
||||
/* Gives XX a name. Space is allocated, and the contents of the
|
||||
* NUL-terminated NAME are copied. Deallocating XX frees up the
|
||||
* space. I.e., it is not the responsibility of the programmer to
|
||||
* keep track of space allocated for this procedure. */
|
||||
const char *objects_@XX@_set_name (objects_@XX@_t *xx, const char *name);
|
||||
|
||||
/* Takes away XX's name. */
|
||||
void objects_@XX@_unset_name (objects_@XX@_t *xx);
|
||||
|
||||
/** Number **/
|
||||
|
||||
/* Returns the (process-wide) unique number given to the Libfn
|
||||
* structure XX. See <objects/number.h> for more info. */
|
||||
size_t objects_@XX@_serial_number (objects_@XX@_t *xx);
|
||||
|
||||
/* Gives XX a new (process-wide) unique number. Numbers are not
|
||||
* reused. See <objects/number.h> for more info. */
|
||||
size_t _objects_@XX@_set_serial_number (objects_@XX@_t *xx);
|
||||
|
||||
/** Extras **/
|
||||
|
||||
/* Sets the callbacks associated with XX's ``extra''. NOTE: This must
|
||||
* be done before calling `objects_@XX@_set_extra()', as these callbacks
|
||||
* are used in that routine. */
|
||||
objects_callbacks_t objects_@XX@_set_extra_callbacks (objects_@XX@_t *xx, objects_callbacks_t callbacks);
|
||||
|
||||
/* Returns the callbacks associated with XX's ``extra''. */
|
||||
objects_callbacks_t objects_@XX@_extra_callbacks (objects_@XX@_t *xx, objects_callbacks_t callbacks);
|
||||
|
||||
/* Returns XX's ``extra'', a little extra space that each Libobjects
|
||||
* structure carries around with it. Its use is
|
||||
* implementation-dependent. */
|
||||
const void *objects_@XX@_extra (objects_@XX@_t *xx);
|
||||
|
||||
/* Sets XX's ``extra'', a little extra space that each Libobjets structure
|
||||
* carries around with it. Its use is implementation-dependent. */
|
||||
const void *objects_@XX@_set_extra (objects_@XX@_t *xx, const void *extra);
|
||||
|
||||
/* Resets XX's ``extra''. */
|
||||
void objects_@XX@_unset_extra (objects_@XX@_t *xx);
|
||||
|
||||
/** Low-level Creation and Destruction **/
|
||||
|
||||
/* Handles the universal, low-level allocation of Libobjects structures. */
|
||||
objects_@XX@_t *_objects_@XX@_alloc_with_allocs (objects_allocs_t allocs);
|
||||
|
||||
/* Handles the universal, low-level deallocation of Libobjects structures. */
|
||||
void _objects_@XX@_dealloc (objects_@XX@_t *xx);
|
||||
|
||||
/* Handles the low-level copying of Libobjects structures. */
|
||||
objects_@XX@_t *_objects_@XX@_copy_with_allocs (objects_@XX@_t *xx, objects_allocs_t allocs);
|
||||
|
||||
#endif /* __@XX@_xx_h_OBJECTS_INCLUDE */
|
||||
|
71
Source/objects/x-callbacks.h.in
Normal file
71
Source/objects/x-callbacks.h.in
Normal file
|
@ -0,0 +1,71 @@
|
|||
/* Getting callbacks from @YY@ structures.
|
||||
* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||
*
|
||||
* Author: Albin L. Jones <Albin.L.Jones@Dartmouth.EDU>
|
||||
* Created: Mon Dec 11 03:41:00 EST 1995
|
||||
* Updated: Sat Feb 10 10:21:13 EST 1996
|
||||
* Serial: 96.02.10.01
|
||||
*
|
||||
* This file is part of the GNU Objective C Class Library.
|
||||
*
|
||||
* 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 __@YY@_yy_h_OBJECTS_INCLUDE
|
||||
#define __@YY@_yy_h_OBJECTS_INCLUDE 1
|
||||
|
||||
/**** Included Headers *******************************************************/
|
||||
|
||||
#include <objects/callbacks.h>
|
||||
#include <objects/@YY@.h>
|
||||
|
||||
/**** Type, Constant, and Macro Definitions **********************************/
|
||||
|
||||
#define __@YY@__ 1
|
||||
|
||||
/**** Function Implementations ***********************************************/
|
||||
|
||||
#ifdef __map__
|
||||
|
||||
/** Callbacks **/
|
||||
|
||||
/* Returns the callbacks associated with YY's keys. */
|
||||
objects_callbacks_t objects_@YY@_key_callbacks (objects_@YY@_t *yy);
|
||||
|
||||
/* Returns the ``bogus'' marker associated with YY's keys. */
|
||||
const void *objects_@YY@_not_a_key_marker (objects_@YY@_t *yy);
|
||||
|
||||
/* Returns the callbacks associated with YY's values. */
|
||||
objects_callbacks_t
|
||||
objects_@YY@_value_callbacks (objects_@YY@_t *yy);
|
||||
|
||||
/* Returns the ``bogus'' marker associated with YY's values. */
|
||||
const void *objects_@YY@_not_a_value_marker (objects_@YY@_t *yy);
|
||||
|
||||
#else /* !__map__ */
|
||||
|
||||
/** Callbacks **/
|
||||
|
||||
/* Returns the callbacks associated with YY's elements. */
|
||||
objects_callbacks_t objects_@YY@_element_callbacks (objects_@YY@_t *yy);
|
||||
|
||||
/* Returns the ``bogus'' marker associated with YY's elements. */
|
||||
const void *objects_@YY@_not_an_element_marker (objects_@YY@_t *yy);
|
||||
|
||||
#endif /* __map__ */
|
||||
|
||||
#endif /* __@YY@_yy_h_OBJECTS_INCLUDE */
|
||||
|
Loading…
Reference in a new issue