#include <iostream>
#include <string>
#include <istream>
#include <ostream>
#include "JLang/JTemplate.hh"
#include "JLang/JTypeList.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"
 
Go to the source code of this file.
 | 
| int  | main (int argc, char **argv) | 
|   | 
Example program to test JLANG::JTemplate class. 
- Author
 - mdejong 
 
Definition in file JTemplate.cc.
 
◆ main()
      
        
          | int main  | 
          ( | 
          int  | 
          argc,  | 
        
        
           | 
           | 
          char **  | 
          argv  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Definition at line 44 of file JTemplate.cc.
   52     JParser<> zap(
"Example program to test object referencing.");
 
   58   catch(
const exception &error) {
 
   59     FATAL(error.what() << endl);
 
   66     JTemplate<string> object;
 
   68     object = string(
"aap");
 
   70     object.set(
string(
"noot"));            
 
   73     object.get<
string>() += 
" says ";      
 
   76     object->append(
"\"hello world\"");     
 
   78     cout << 
object << endl;
 
   83       public JTemplate<JTYPELIST<std::string, float, int>::typelist>
 
   88     object.get<
string>() = 
"abc";          
 
   89     object.get<
int>()    = -1;             
 
   90     object.get<
float>()  = -0.99;          
 
   93     object.set(
string(
"aap noot mies"));   
 
   94     object.set<
true>(
"hello world");       
 
   99     cout << 
object << endl;
 
  103     JTemplate<JTYPELIST<__C__, __B__, __A__>::typelist> object;
 
  105     object.get<__A__>() = 
"a";             
 
  106     object.get<__B__>() = 
"b";             
 
  107     object.get<__C__>() = 
"c";             
 
  109     cout << 
object.get<__C__>()            
 
  111          << 
object.get<__A__, true>()