Main Page | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

cr-string.h

Go to the documentation of this file.
00001 /* -*- Mode: C; indent-tabs-mode:nil; c-basic-offset: 8-*- */
00002 
00003 /*
00004  * This file is part of The Croco Library
00005  *
00006  * This program is free software; you can redistribute it and/or
00007  * modify it under the terms of version 2.1 of the GNU Lesser General Public
00008  * License as published by the Free Software Foundation.
00009  *
00010  * This program 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
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU Lesser General Public License
00016  * along with this program; if not, write to the Free Software
00017  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00018  * USA
00019  * 
00020  * See COPYRIGHTS file for copyright information.
00021  */
00022 
00023 /**
00024  *@file
00025  *Declaration file of the #CRString class.
00026  */
00027 
00028 #ifndef __CR_STRING_H__
00029 #define __CR_STRING_H__
00030 
00031 #include <glib.h>
00032 #include "cr-utils.h"
00033 #include "cr-parsing-location.h"
00034 
00035 typedef struct _CRString CRString ;
00036 
00037 /**
00038  *This is a ship implementation of string based on GString.
00039  *Actually, the aim of CRString is to store the parsing location
00040  *(line,column,byte offset) at which a given string has been parsed
00041  *in the input CSS.
00042  *So this class has a gstring field of type GString that users can
00043  *freely manipulate, and also a CRParginLocation type where the
00044  *parsing location is store. If you don't want to deal with parsing
00045  *location stuffs, then use GString instead. If we were in C++ for example,
00046  *CRString would just inherit GString and just add accessors to
00047  *the CRParsingLocation data ... but we are not and we still have
00048  *to provide the parsing location information.
00049  */
00050 struct _CRString {
00051         /**
00052          *The GString where all the string
00053          *operation happen.
00054          */
00055         GString *stryng ;
00056         /**
00057          *The parsing location storage area.
00058          */
00059         CRParsingLocation location ;
00060 } ;
00061 
00062 CRString * cr_string_new (void) ;
00063 
00064 CRString  *cr_string_new_from_string (const gchar * a_string) ;
00065 CRString * cr_string_new_from_gstring (GString *a_string) ;
00066 CRString *cr_string_dup (CRString *a_this) ;
00067 gchar *cr_string_dup2 (CRString *a_this) ;
00068 const gchar *cr_string_peek_raw_str (CRString *a_this) ;
00069 gint cr_string_peek_raw_str_len (CRString *a_this) ;
00070 void cr_string_destroy (CRString *a_this) ;
00071 
00072 #endif 

Generated on Fri Oct 29 08:29:12 2004 for Libcroco by  doxygen 1.3.9.1