Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   Related Pages  

System.h

00001 //
00002 // OpenVRML
00003 //
00004 // Copyright (C) 1998  Chris Morley
00005 // 
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License, or (at your option) any later version.
00010 // 
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // Lesser General Public License for more details.
00015 // 
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019 // 
00020 
00021 # ifndef SYSTEM_H
00022 #   define SYSTEM_H
00023 //
00024 //  System dependent utilities class
00025 //
00026 
00027 #   include <stddef.h>
00028 #   include <string>
00029 #   include "common.h"
00030 
00031 namespace OpenVRML {
00032 
00033     class MFString;
00034 
00035     class OPENVRML_SCOPE System {
00036     public:
00037         virtual double time();
00038         virtual void error(const char *, ...);
00039         virtual void warn(const char *, ...);
00040         virtual void inform(const char *, ...);
00041         virtual void debug(const char *, ...);
00042 #   ifdef macintosh
00043         virtual bool loadUrl(char *url, int np, char **parameters );
00044 #   else
00045         virtual bool loadUrl(const std::string & url,
00046                              const MFString & parameters);
00047 #   endif
00048         virtual int connectSocket( const char *host, int port );
00049         virtual const char *httpHost(const char *url, int *port);
00050         virtual const char *httpFetch( const char *url );
00051         virtual void removeFile( const char *fn );
00052     };
00053 
00054     extern OPENVRML_SCOPE System * theSystem;
00055 }
00056 
00057 #endif // SYSTEM_H