Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

/ray/src/vm/functype.h

Go to the documentation of this file.
00001 /*
00002  * vm/functype.h
00003  * 
00004  * VM function type. 
00005  * 
00006  * Copyright (c) 2004 by Wolfgang Wieser ] wwieser (a) gmx <*> de [ 
00007  * 
00008  * This file may be distributed and/or modified under the terms of the 
00009  * GNU General Public License version 2 as published by the Free Software 
00010  * Foundation. (See COPYING.GPL for details.)
00011  * 
00012  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00013  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00014  * 
00015  */
00016 
00017 #ifndef _VM_FUNCTYPE_H_
00018 #define _VM_FUNCTYPE_H_ 1
00019 
00027 #include <vm/vmconfig.h>    /* MUST be first */
00028 #include <lib/tl/tlstring.h>
00029 
00030 
00031 namespace VM
00032 {
00033 
00044 struct _packed_ FuncType
00045 {
00046     enum ID
00047     {
00048         Unknown=0,  
00049         Function,   
00050         Method,     
00051         VMethod,    
00052     };
00053     
00054     ID id : 8;       
00055     uint8 exported;  
00056     
00058     inline FuncType() : id(Unknown),exported(0) {}
00060     inline FuncType(ID _id,uint8 _exported) : id(_id),exported(_exported) {}
00062     inline FuncType(const FuncType &vt) : id(vt.id),exported(vt.exported) {}
00064     inline ~FuncType() {}
00065     
00067     inline FuncType &operator=(const FuncType &vt)
00068         {  id=vt.id;  exported=vt.exported;  return(*this);  }
00069     
00071     inline bool operator==(const FuncType &ft) const
00072         {  return(id==ft.id && exported==ft.exported);  }
00074     inline bool operator!=(const FuncType &ft) const
00075         {  return(id!=ft.id || exported!=ft.exported);  }
00076     
00078     TLString TypeString() const;
00079 };
00080 
00081 }  // end of namespace VM
00082 
00083 #endif  /* _VM_FUNCTYPE_H_ */

Generated on Sat Feb 19 22:33:46 2005 for Ray by doxygen 1.3.5