Main Page   Class Hierarchy   Compound List   Header Files   Compound Members  


This is the verbatim text of the ddgstr.h include file.
    Copyright (C) 1997, 1998, 1999, 2000 by Alex Pfaffe
        (Digital Dawn Graphics Inc)
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Library General Public
    License as published by the Free Software Foundation; either
    version 2 of the License, or (at your option) any later version.
    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    Library General Public License for more details.
    You should have received a copy of the GNU Library General Public
    License along with this library; if not, write to the Free
    Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#ifndef _ddgStr_Class_
#define _ddgStr_Class_

#include "util/ddg.h"
class WEXP ddgStr
        bool _assign( const char *b, int size);
        char *s;
        unsigned int l;
        ddgStr(const char *ss, int size = 0);
        ddgStr(const int s);
        ddgStr(const ddgStr *str) { s = NULL; assign(str->s); }
        ddgStr(const ddgStr &str) { s = NULL; assign(str.s); }
        bool assign( const char * b );
        bool assign( const ddgStr * str ) { return assign(str->s); }
        inline operator char *() { return s; }
        inline operator const char *() { return s; }
        inline operator ddgStr *() { return this; }
        ddgStr& operator  +=( const ddgStr& s);
        unsigned int length(void)
                return l;
        static unsigned int length( const char *s)
                char *p = (char *)s;
                while( *p ) { p++;}
                return p-s;
        static bool equal(const char * a, const char *b)
                while(*a && *b && *a == *b) { a++; b++; }
                if (!*a && !*b)
                        return true;
                return false;
        inline bool equal( const char *b) { return equal(s,b);}
        static float stof( const char * s);
        static int stoi( const char * s);
        char *findChar( const char target );

WEXP ostream& WFEXP operator << ( ostream&s, const ddgStr v );
WEXP ostream& WFEXP operator << ( ostream&s, const ddgStr* v );
WEXP istream& WFEXP operator >> ( istream& s, ddgStr& v);
#endif // DDGSTREAM


Generated at Sun Sep 17 19:27:56 2000 for Digital Dawn Graphics Toolkit by doxygen 0.49-991205 written by Dimitri van Heesch, © 1997-1999