Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

MNRopeSubstring.h

Go to the documentation of this file.
00001 /* 00002 * Copyright (c) 1997 00003 * Silicon Graphics Computer Systems, Inc. 00004 * 00005 * Permission to use, copy, modify, distribute and sell this software 00006 * and its documentation for any purpose is hereby granted without fee, 00007 * provided that the above copyright notice appear in all copies and 00008 * that both that copyright notice and this permission notice appear 00009 * in supporting documentation. Silicon Graphics makes no 00010 * representations about the suitability of this software for any 00011 * purpose. It is provided "as is" without express or implied warranty. 00012 * 00013 * Heavily modified by KOM/Darmstadt University of Technology, 2000 00014 */ 00015 #ifndef _R_SUBSTRING_H 00016 #define _R_SUBSTRING_H 00017 00018 #include <sys/types.h> 00019 00020 #include "MNRopeCharProducer.h" 00021 #include "MNRopeFunction.h" 00022 00027 class MNRopeRep; 00028 00029 // Substring results are usually represented using just 00030 // concatenation nodes. But in the case of very long flat ropes 00031 // or ropes with a functional representation that isn't practical. 00032 // In that case, we represent the __result as a special case of 00033 // RopeFunction, whose char_producer points back to the rope itself. 00034 // In all cases except repeated substring operations and 00035 // deallocation, we treat the __result as a RopeFunction. 00036 00037 struct MNRopeSubstring 00038 : public MNRopeFunction 00039 , public MNRopeCharProducer 00040 { 00041 public: 00042 // XXX this whole class should be rewritten. 00043 MNRopeRep* _M_base; // not 0 00044 size_t _M_start; 00045 00046 virtual void operator()( size_t __start_pos, 00047 size_t __req_len, 00048 uchar_t* __buffer); 00049 00050 MNRopeSubstring( MNRopeRep* __b, 00051 size_t __s, 00052 size_t __l ); 00053 00054 virtual ~MNRopeSubstring(); 00055 }; 00056 00058 00059 #endif /* _R_SUBSTRING_H */ 00060

Generated on Sun Mar 6 13:35:49 2005 for Komssys by doxygen 1.3.8