diff options
Diffstat (limited to 'modules/CIAO/CCF/Example/CodeGenerationKit/Indentation')
-rw-r--r-- | modules/CIAO/CCF/Example/CodeGenerationKit/Indentation/IDL/indent_idl.cpp | 25 | ||||
-rw-r--r-- | modules/CIAO/CCF/Example/CodeGenerationKit/Indentation/XML/indent_xml.cpp | 32 |
2 files changed, 57 insertions, 0 deletions
diff --git a/modules/CIAO/CCF/Example/CodeGenerationKit/Indentation/IDL/indent_idl.cpp b/modules/CIAO/CCF/Example/CodeGenerationKit/Indentation/IDL/indent_idl.cpp new file mode 100644 index 00000000000..ce0c5eb103c --- /dev/null +++ b/modules/CIAO/CCF/Example/CodeGenerationKit/Indentation/IDL/indent_idl.cpp @@ -0,0 +1,25 @@ +// file : CCF/Example/CodeGenerationKit/Indentation/IDL/indent_idl.cpp +// author : Boris Kolpackov <boris@dre.vanderbilt.edu> +// cvs-id : $Id$ + +#include "CCF/CodeGenerationKit/IndentationIDL.hpp" +#include "CCF/CodeGenerationKit/IndentationImplanter.hpp" + +#include <iostream> + +using std::cout; +using std::endl; + +int +main () +{ + Indentation::Implanter<Indentation::IDL> guard (cout); + + cout << "const string s = \"Hello \\\"world;\";"; + cout << "const char c1 = \'\\\'\';"; + cout << "const char c2 = \';\';"; + + cout << "interface I {" + << "void foo ();" + << "};"; +} diff --git a/modules/CIAO/CCF/Example/CodeGenerationKit/Indentation/XML/indent_xml.cpp b/modules/CIAO/CCF/Example/CodeGenerationKit/Indentation/XML/indent_xml.cpp new file mode 100644 index 00000000000..f244249c69b --- /dev/null +++ b/modules/CIAO/CCF/Example/CodeGenerationKit/Indentation/XML/indent_xml.cpp @@ -0,0 +1,32 @@ +// file : CCF/Example/CodeGenerationKit/Indentation/IDL/indent_idl.cpp +// author : Boris Kolpackov <boris@dre.vanderbilt.edu> +// cvs-id : $Id$ + +#include "CCF/CodeGenerationKit/IndentationXML.hpp" +#include "CCF/CodeGenerationKit/IndentationImplanter.hpp" + +#include <iostream> + +using std::cout; +using std::endl; + +int +main () +{ + Indentation::Implanter<Indentation::XML> guard (cout); + + cout << "<?xml version=\"1.0\"?>" << endl; + cout << "<!DOCTYPE corbacomponent SYSYEM \"corbacomponent.dtd\">" << endl << endl; + + cout << "<atag>whatever</atag>" << endl; + + cout << "<open>" << endl; + cout << "<openother>" << endl; + cout << "<openother \nlabel=\"<<<<<<<<<>><>\">" << endl; + cout << "text" << endl; + cout << "<taginitself/>" << endl; + cout << "</openother>" << endl; + cout << "</openother>" << endl; + cout << "</open>" << endl; + +} |