Main Page   Modules   Alphabetical List   Data Structures   File List   Data Fields   Globals  

value.h

Go to the documentation of this file.
00001  /*
00002   * plint/data/value.h : values data structure
00003   * 
00004   * Time-stamp: <2002-10-07 06:15:30 gseba>
00005   * 
00006   * Copyright (C) Sebastian Glita, email: gseba@users.sourceforge.net
00007   * 
00008   * This file is part of plint.
00009   * 
00010   * plint is free software; you can  redistribute it and/or modify it under the
00011   * terms of the  GNU General Public License as published  by the Free Software
00012   * Foundation; either version 2, or (at your option) any later version.
00013   *
00014   * plint  is distributed  in the  hope  that it  will be  useful, but  WITHOUT
00015   * ANY  WARRANTY; without  even  the implied  warranty  of MERCHANTABILITY  or
00016   * FITNESS FOR A  PARTICULAR PURPOSE.  See the GNU  General Public License for
00017   * more details.
00018   * 
00019   * You should  have received a  copy of the  GNU General Public  License along
00020   * with  plint; see  the file  COPYING.  If  not, write  to the  Free Software
00021   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA USA.
00022   *
00023   */
00024 
00025 #ifndef PLINT_DATA_TYPE_H
00026 #error Dont include me directly, but through data/type.h
00027 #endif
00028 
00055 struct _plint_val
00056 {
00057   plint_typ_t typ;              
00058   plint_val_t val;              
00060 #define PLINT_PTR_NEW(__typ__, __val__...)              \
00061 ({                                                      \
00062   plint_ptr_t __p;                                      \
00063   typeof(__p->val.__typ__) __tmp = __val__;             \
00064   __p = plint_ptr_new(PLINT_##__typ__);                 \
00065   __p->val.__typ__ = __tmp;                             \
00066   __p;                                                  \
00067 })                                                      \
00068 
00069   struct _plint_gc_chunk _gc;
00070 
00071 };
00072 
00083 __BEGIN_DECLS
00084 
00085 plint_ptr_t plint_val_new(plint_typ_t TYPE, plint_val_t VALUE);
00086 plint_ptr_t plint_val_def(plint_ptr_t VALUE);
00087 plint_num_t plint_val_len(plint_ptr_t VALUE);
00088 void plint_val_inc(plint_ptr_t VALUE);
00089 void plint_val_dec(plint_ptr_t VALUE);
00090 
00091 void plint_ptr_fre(plint_ptr_t VALUE);
00092 
00093 plint_ptr_t plint_ptr_new(plint_typ_t TYPE);
00094 plint_ptr_t plint_ptr_cpy(plint_ptr_t SOURCE);
00095 inline plint_ptr_t plint_ptr_dup(plint_ptr_t SOURCE);
00096 
00097 __END_DECLS
00098 

Generated on Thu Jan 9 19:02:39 2003 for plint by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002