ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/FeepingCreaturism/Jargon.cpp
Revision: 196
Committed: 2004-08-27T19:31:26-07:00 (20 years, 9 months ago) by Douglas Thrift
File size: 952 byte(s)
Log Message:
Meep!

File Contents

# User Rev Content
1 Douglas Thrift 196 // Feeping Creaturism
2     //
3     // Douglas Thrift
4     //
5     // $Id$
6    
7     #include "Jargon.hpp"
8    
9     Jargon::Jargon(const std::string& path)
10     {
11     std::vector<std::string> args(1, "FeepingCreaturism");
12    
13     args.push_back(path);
14     args.push_back("FeepingCreaturism.xsl");
15    
16     redi::pstreambuf pin("/usr/local/bin/Xalan", args, std::ios_base::in);
17     ios::StreamBufInputAdapter adaptor(pin);
18     ext::Handle<xml::Document> document(xml::Parse(adaptor));
19     ext::Handle<xml::Node> jargon(*document/"Jargon");
20    
21     word = *jargon/"Word";
22     pronunciation = *jargon/"Pronunciation";
23     grammar = *jargon/"Grammar";
24     definition = *jargon/"Definition";
25     }
26    
27     std::ostream& operator<<(std::ostream& sout, const Jargon& jargon)
28     {
29     ios::StreamBufOutputAdapter adaptor(*sout.rdbuf());
30    
31     sout << jargon.word << '\n' << jargon.pronunciation << '\n'
32     << jargon.grammar << '\n' << jargon.definition.GetSize() << '\n';
33    
34     /* ios::PrintWriter writer(adaptor);
35    
36     writer << jargon.definition << '\n';*/
37    
38     return sout;
39     }

Properties

Name Value
svn:eol-style native
svn:keywords Id