source: trunk/lib/Node.cc @ 23

Last change on this file since 23 was 23, checked in by Peter Johansson, 16 years ago

added print functionality

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 812 bytes
Line 
1// $Id: Node.cc 23 2006-01-02 08:14:57Z peter $
2
3#include "Node.h"
4#include "utility.h"
5
6#include <ctime>
7#include <fstream>
8#include <iostream>
9#include <sstream>
10
11namespace theplu{
12namespace svnstat{
13
14  std::string Node::name(void) const
15  {
16    std::stringstream ss(path_);
17    std::string name;
18    while (getline(ss,name,'/')) {}
19    return name;
20  }
21
22
23  void Node::print_footer(std::ostream& os) const
24  {
25    os << "</body>\n" 
26       << "</html>";
27  }
28
29
30  void Node::print_header(std::ostream& os) const
31  {
32    os << "<html>\n"
33       << "<head>\n"
34       << "<title> svnstat " << name() << "\n"
35       << "</head>\n"
36       << "<body bgcolor='FFFBFB'\n";
37  }
38
39
40  bool Node::subversion_controlled(void) const
41  {
42    std::string system_call = "svn proplist " + path_ + ">&/dev/null";
43    return !system(system_call.c_str());
44  }
45
46}} // end of namespace svnstat and namespace theplu
Note: See TracBrowser for help on using the repository browser.