Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

chars_seq_private.H

Go to the documentation of this file.
00001 // Copyright (C) 2001, Compaq Computer Corporation
00002 // 
00003 // This file is part of Vesta.
00004 // 
00005 // Vesta is free software; you can redistribute it and/or
00006 // modify it under the terms of the GNU Lesser General Public
00007 // License as published by the Free Software Foundation; either
00008 // version 2.1 of the License, or (at your option) any later version.
00009 // 
00010 // Vesta is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013 // Lesser General Public License for more details.
00014 // 
00015 // You should have received a copy of the GNU Lesser General Public
00016 // License along with Vesta; if not, write to the Free Software
00017 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018 
00019 // Last modified on Tue Mar 22 14:16:37 EST 2005 by ken@xorian.net
00020 //      modified on Thu Feb  2 09:23:22 PST 1995 by levin
00021 
00022 #ifndef _chars_seq_private
00023 #define _chars_seq_private
00024 
00025 
00026 class chars_seq_impl {
00027   friend class SRPC;
00028   friend class SRPC_impl;
00029 public:
00030   // Because of type-system breaches needed for storage management, the
00031   // actual data is not defined as part of the class, but rather as a
00032   // separately allocated piece of storage of type "rep".
00033   enum stg_type { grow, full, manual };
00034   struct header {
00035     stg_type storage;
00036     int len;            // sequence length
00037     char *bodies;       // start of string bodies
00038     char *limit;        // one past last byte in buffer (i.e., end of bodies)
00039   };
00040   struct rep {
00041     header h;
00042     char *base;         // sequence[0], ...
00043   };
00044 
00045   static rep *allocate_buffer(int len_hint = 10, int bytes = 0);
00046 
00047   static void expand(rep *&p, int len_hint, int min_body_add);
00048 
00049 };
00050 
00051 #endif  /* _chars_seq_private */

Generated on Mon May 8 00:48:56 2006 for Vesta by  doxygen 1.4.2