CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

imap/services.h

Go to the documentation of this file.
00001 /*
00002     Copyright (C) 2001 by Norman Kraemer
00003 
00004     This library is free software; you can redistribute it and/or
00005     modify it under the terms of the GNU Library General Public
00006     License as published by the Free Software Foundation; either
00007     version 2 of the License, or (at your option) any later version.
00008 
00009     This library is distributed in the hope that it will be useful,
00010     but WITHOUT ANY WARRANTY; without even the implied warranty of
00011     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012     Library General Public License for more details.
00013 
00014     You should have received a copy of the GNU Library General Public
00015     License along with this library; if not, write to the Free
00016     Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00017 */
00018 
00019 #ifndef __CS_IMAP_SYNTAXSERVICE_H__
00020 #define __CS_IMAP_SYNTAXSERVICE_H__
00021 
00026 #include "csutil/scf.h"
00027 #include "csutil/ref.h"
00028 #include "ivideo/graph3d.h"
00029 
00030 class csShaderVariable;
00031 class csMatrix3;
00032 class csVector3;
00033 class csVector2;
00034 class csColor;
00035 class csBox3;
00036 class csGradient;
00037 struct csAlphaMode;
00038 struct iEngine;
00039 struct iSector;
00040 struct iMaterialWrapper;
00041 struct iThingFactoryState;
00042 struct iLoaderContext;
00043 struct iDocumentNode;
00044 struct iString;
00045 struct iStringSet;
00046 
00049 
00050 #define CSTEX_UV 1  
00051 
00052 #define CSTEX_V1 2  
00053 
00054 #define CSTEX_V2 4  
00055 
00056 #define CSTEX_UV_SHIFT 8 
00057 
00059 SCF_VERSION (iSyntaxService, 1, 3, 3);
00060 
00065 struct iSyntaxService : public iBase
00066 {
00081   virtual bool ParseBool (iDocumentNode* node, bool& result,
00082         bool def_result) = 0;
00083   
00087   virtual bool ParseMatrix (iDocumentNode* node, csMatrix3 &m) = 0;
00088 
00092   virtual bool ParseVector (iDocumentNode* node, csVector3 &v) = 0;
00093 
00097   virtual bool ParseBox (iDocumentNode* node, csBox3 &v) = 0;
00098 
00102   virtual bool ParseColor (iDocumentNode* node, csColor &c) = 0;
00103 
00107   virtual bool ParseMixmode (iDocumentNode* node, uint &mixmode) = 0;
00108 
00115   virtual bool HandlePortalParameter (
00116         iDocumentNode* child, iLoaderContext* ldr_context,
00117         uint32 &flags, bool &mirror, bool &warp, int& msv,
00118         csMatrix3 &m, csVector3 &before, csVector3 &after,
00119         iString* destSector, bool& handled) = 0;
00120 
00124   virtual bool ParseGradient (iDocumentNode* node,
00125                               csGradient& gradient) = 0;
00126 
00130   virtual bool ParseShaderParam (iDocumentNode* node,
00131                                  csShaderVariable* var) = 0;
00132                             
00136   virtual void ReportError (const char* msgid, iDocumentNode* errornode,
00137         const char* msg, ...) CS_GNUC_PRINTF(4,5) = 0;
00138 
00143   virtual void ReportBadToken (iDocumentNode* badtokennode) = 0;
00144 
00148   virtual void Report (const char* msgid, int severity, 
00149     iDocumentNode* errornode, const char* msg, ...) CS_GNUC_PRINTF(5,6) = 0;
00150   
00154   virtual bool ParseAlphaMode (iDocumentNode* node, iStringSet* strings,
00155     csAlphaMode& alphaMode) = 0;
00156     
00166   virtual bool ParseZMode (iDocumentNode* node, csZBufMode& zmode,
00167     bool allowZmesh = false) = 0;
00168 };
00169 
00172 #endif // __CS_IMAP_SYNTAXSERVICE_H__
00173 

Generated for Crystal Space by doxygen 1.2.18