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

java_tag.h

Go to the documentation of this file.
00001 #ifndef java_tag_h
00002 #define java_tag_h
00003 
00004 #include "config.h"
00005 
00006 #ifdef HAVE_IXLIB
00007 
00008 #undef PACKAGE
00009 #undef VERSION
00010 
00011 #include <ixlib_javascript.hh>
00012 
00013 #undef PACKAGE
00014 #undef VERSION
00015 
00016 using namespace ixion;
00017 using namespace javascript;
00018 
00019 #include "tag.h"
00020 
00021 struct SimpleLine : public Line
00022 {
00023   bool valid;
00024   std::string error;
00025 
00026   SimpleLine( std::string lexed_line );
00027   SimpleLine() : Line(), valid( false) {}
00028   SimpleLine( Line const &line ) : Line(line), valid( true ) {}
00029 
00030   bool is_valid() const { return valid; }
00031   std::string get_error() const { return error; }
00032   void rebuilt();
00033 };
00034 
00035 class SimpleTag : public Tag
00036 {
00037 public:
00038   SimpleTag( SimpleLine line, bool no_warning_check = false )
00039     : Tag( line, no_warning_check ) {}
00040 
00041   SimpleTag( std::string tag, bool no_warning_check = true )
00042     : Tag( tag, no_warning_check ) {}
00043 
00044   SimpleTag() : Tag() {}
00045   
00046   bool is_valid() const { return !Tag::operator!(); }
00047 
00048   SimpleLine get_line() const { return Tag::get_line(); }
00049 };
00050 
00051 class JavaLine : public value_with_methods
00052 {
00053 private:
00054   typedef value_with_methods super;
00055 
00056   SimpleLine line;
00057 
00058 public:
00059   JavaLine() {}
00060 
00061   JavaLine( const std::string line ) 
00062     : line( line ) {}
00063 
00064   JavaLine( const SimpleLine line )
00065     : line( line ) {}
00066 
00067   value_type getType() const { return VT_BUILTIN; }
00068   
00069   ref<value> duplicate() { return this; }
00070   
00071   ref<value> lookup( std::string const &identifier );
00072   ref<value> callMethod( std::string const &identifier, parameter_list const &parameters );  
00073 
00074   SimpleLine get_line() const { return line; }
00075 };
00076 
00077 class JavaTag : public value_with_methods
00078 {
00079 private:
00080   typedef value_with_methods super;
00081 
00082   SimpleTag tag;
00083 
00084 public:
00085   JavaTag() {}
00086   JavaTag( const SimpleLine line )
00087     : tag( line ) {}
00088 
00089   JavaTag( const std::string line )
00090     : tag( line ) {}
00091 
00092 
00093   value_type getType() const { return VT_BUILTIN; }
00094   ref<value> duplicate() { return this; }
00095   ref<value> lookup( std::string const &identifier );
00096   ref<value> callMethod( std::string const &identifier, parameter_list const &parameters );
00097 
00098   SimpleLine get_line() const { return tag.get_line(); }
00099   SimpleTag  get_tag() const { return tag; }
00100 };
00101 
00102 class JavaLineConstructor : public value
00103 {
00104 public:
00105   value_type getType() const { return VT_TYPE; }
00106 
00107   ref<value> duplicate(){ return this; }
00108   ref<value> construct( parameter_list const &parameters );
00109 };
00110 
00111 class JavaTagConstructor : public value
00112 {
00113 public:
00114   value_type getType() const { return VT_TYPE; }
00115 
00116   ref<value> duplicate(){ return this; }
00117   ref<value> construct( parameter_list const &parameters );
00118 };
00119 
00120 #endif
00121 
00122 #endif

Generated on Tue Nov 20 02:19:52 2001 for Leo<HTML> by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001