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 G_BEGIN_DECLS
00036 
00037 typedef struct _CRString CRString ;
00038 
00039 /**
00040  *This is a ship implementation of string based on GString.
00041  *Actually, the aim of CRString is to store the parsing location
00042  *(line,column,byte offset) at which a given string has been parsed
00043  *in the input CSS.
00044  *So this class has a gstring field of type GString that users can
00045  *freely manipulate, and also a CRParginLocation type where the
00046  *parsing location is store. If you don't want to deal with parsing
00047  *location stuffs, then use GString instead. If we were in C++ for example,
00048  *CRString would just inherit GString and just add accessors to
00049  *the CRParsingLocation data ... but we are not and we still have
00050  *to provide the parsing location information.
00051  */
00052 struct _CRString {
00053         /**
00054          *The GString where all the string
00055          *operation happen.
00056          */
00057         GString *stryng ;
00058         /**
00059          *The parsing location storage area.
00060          */
00061         CRParsingLocation location ;
00062 } ;
00063 
00064 CRString * cr_string_new (void) ;
00065 
00066 CRString  *cr_string_new_from_string (const gchar * a_string) ;
00067 CRString * cr_string_new_from_gstring (GString *a_string) ;
00068 CRString *cr_string_dup (CRString *a_this) ;
00069 gchar *cr_string_dup2 (CRString *a_this) ;
00070 const gchar *cr_string_peek_raw_str (CRString *a_this) ;
00071 gint cr_string_peek_raw_str_len (CRString *a_this) ;
00072 void cr_string_destroy (CRString *a_this) ;
00073 
00074 G_END_DECLS
00075 
00076 #endif 

Generated on Thu Mar 9 19:18:50 2006 for Libcroco by  doxygen 1.4.6