Changeset 99

Show
Ignore:
Timestamp:
12/20/07 08:29:30 (4 years ago)
Author:
ecn
Message:
  • rename swct namespace to ht
  • make all exceptions children of BaseException?
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/hightest/src/graph/Graph.cpp

    r57 r99  
    99#include <vector> 
    1010 
    11 using namespace swct; 
     11using namespace ht; 
    1212using namespace graph; 
    1313using namespace utils; 
     
    3030} 
    3131 
    32 Node * swct::graph::Graph::construct(const options::Config *c)  
     32Node * ht::graph::Graph::construct(const options::Config *c)  
    3333{ 
    3434    string how; 
  • trunk/hightest/src/graph/Graph.h

    r96 r99  
    11// -*- c++ -*- 
    2 #ifndef SWCT_GRAPH_GRAPH_H 
    3 #define SWCT_GRAPH_GRAPH_H 
     2#ifndef HT_GRAPH_GRAPH_H 
     3#define HT_GRAPH_GRAPH_H 
    44 
    55#include <hightest/config.h> 
    66#include <graph/Node.h> 
    77 
    8 namespace swct { 
     8namespace ht { 
    99    namespace options { class Config; } 
    1010    namespace graph { 
  • trunk/hightest/src/graph/Node.cpp

    r2 r99  
    11#include <graph/Node.h> 
    22 
    3 using namespace swct; 
     3using namespace ht; 
    44using namespace graph; 
    55 
  • trunk/hightest/src/graph/Node.h

    r95 r99  
    11// -*- c++ -*- 
    2 #ifndef SWCT_GRAPH_NODE_H 
    3 #define SWCT_GRAPH_NODE_H 
     2#ifndef HT_GRAPH_NODE_H 
     3#define HT_GRAPH_NODE_H 
    44 
    55#include "hightest/config.h" 
     
    88#include <vector> 
    99 
    10 namespace swct { 
     10namespace ht { 
    1111    namespace options { class Config; } 
    1212    namespace graph { 
  • trunk/hightest/src/graph/NodeBase.cpp

    r79 r99  
    33#include <options/Config.h> 
    44 
    5 using namespace swct; 
     5using namespace ht; 
    66using namespace options; 
    77using namespace graph; 
     
    1010void inline doNothing() {} 
    1111 
    12 swct::graph::NodeBase::~NodeBase()  
     12ht::graph::NodeBase::~NodeBase()  
    1313{ 
    1414} 
    1515 
    16 const string & swct::graph::NodeBase::name() const 
     16const string & ht::graph::NodeBase::name() const 
    1717{ 
    1818    return name_; 
    1919} 
    2020 
    21 void swct::graph::NodeBase::configure(const options::Config * c) 
     21void ht::graph::NodeBase::configure(const options::Config * c) 
    2222{ 
    2323    c->attribute("id") >> name_; 
     
    2626} 
    2727 
    28 void swct::graph::NodeBase::configured() 
     28void ht::graph::NodeBase::configured() 
    2929{ 
    3030} 
    3131 
    32 void swct::graph::NodeBase::start() 
     32void ht::graph::NodeBase::start() 
    3333{ 
    3434} 
    3535 
    36 void swct::graph::NodeBase::stop() 
     36void ht::graph::NodeBase::stop() 
    3737{ 
    3838} 
    3939 
    40 void swct::graph::NodeBase::connect(swct::graph::Node *) 
     40void ht::graph::NodeBase::connect(ht::graph::Node *) 
    4141{ 
    4242} 
    4343 
    44 void swct::graph::NodeBase::disconnect(swct::graph::Node *) 
     44void ht::graph::NodeBase::disconnect(ht::graph::Node *) 
    4545{ 
    4646} 
  • trunk/hightest/src/graph/NodeBase.h

    r95 r99  
    11// -*- c++ -*- 
    2 #ifndef SWCT_GRAPH_NODEBASE_H_ 
    3 #define SWCT_GRAPH_NODEBASE_H_ 
     2#ifndef HT_GRAPH_NODEBASE_H_ 
     3#define HT_GRAPH_NODEBASE_H_ 
    44 
    55#include "hightest/config.h" 
     
    77#include <graph/Node.h> 
    88 
    9 namespace swct { 
     9namespace ht { 
    1010    namespace options { class Config; } 
    1111    namespace graph { 
  • trunk/hightest/src/graph/example/CommentsOnly.cpp

    r73 r99  
    55using namespace std; 
    66 
    7 namespace swct { 
     7namespace ht { 
    88    namespace example { 
    99        bool CommentsOnly::test(const WordBuffer & buf) { 
  • trunk/hightest/src/graph/example/CommentsOnly.h

    r84 r99  
    1 #ifndef SWCT_EXAMPLE_COMMENTS_ONLY_H_ 
    2 #define SWCT_EXAMPLE_COMMENTS_ONLY_H_ 
     1#ifndef HT_EXAMPLE_COMMENTS_ONLY_H_ 
     2#define HT_EXAMPLE_COMMENTS_ONLY_H_ 
    33 
    44#include <graph/example/WordFilter.h> 
    55 
    6 namespace swct { 
     6namespace ht { 
    77    namespace example { 
    88        /** A WordFilter that allows only C/C++ comments through */ 
  • trunk/hightest/src/graph/example/FileReader.cpp

    r84 r99  
    33#include <iostream> 
    44 
    5 using namespace swct::graph; 
    6 using namespace swct::options; 
     5using namespace ht::graph; 
     6using namespace ht::options; 
    77 
    8 namespace swct { 
     8namespace ht { 
    99    namespace example { 
    1010 
     
    5454 
    5555extern "C" { 
    56     Node * FileReader() { return new swct::example::FileReader(); } 
     56    Node * FileReader() { return new ht::example::FileReader(); } 
    5757} 
  • trunk/hightest/src/graph/example/FileReader.h

    r84 r99  
    1 #ifndef SWCT_EXAMPLE_FILE_READER_ 
    2 #define SWCT_EXAMPLE_FILE_READER_ 
     1#ifndef HT_EXAMPLE_FILE_READER_ 
     2#define HT_EXAMPLE_FILE_READER_ 
    33 
    44#include <graph/NodeBase.h> 
    55#include <fstream> 
    66 
    7 namespace swct { 
     7namespace ht { 
    88    namespace example { 
    99 
     
    1818 
    1919        /** Base class for all consumers of ByteBuffers */ 
    20         class BlockReader : public swct::graph::NodeBase 
     20        class BlockReader : public ht::graph::NodeBase 
    2121        { 
    2222        public: 
     
    2626 
    2727        /** Input reads and pushes them to the next node */ 
    28         class FileReader : public swct::graph::NodeBase 
     28        class FileReader : public ht::graph::NodeBase 
    2929        { 
    3030            std::fstream stream_; 
     
    3434 
    3535            /* Configure our input file, or use stdin. */ 
    36             void configure(const swct::options::Config *); 
     36            void configure(const ht::options::Config *); 
    3737 
    3838            /* Read blocks of data from the input and send it to the next node. */ 
     
    4343 
    4444            /* Connect this node to the next node in the graph. */ 
    45             void connect(swct::graph::Node *n); 
     45            void connect(ht::graph::Node *n); 
    4646        }; 
    4747    } 
  • trunk/hightest/src/graph/example/FileWriter.cpp

    r84 r99  
    66#include "FileReader.h" 
    77 
    8 using namespace swct::options; 
    9 using namespace swct::example; 
     8using namespace ht::options; 
     9using namespace ht::example; 
    1010 
    11 void swct::example::FileWriter::configure(const Config *c) { 
     11void ht::example::FileWriter::configure(const Config *c) { 
    1212    BlockReader::configure(c); 
    1313    std::string filename; 
     
    2323} 
    2424        /// Write the given buffer to our configured output. 
    25 void swct::example::FileWriter::process(const ByteBuffer & buf) { 
     25void ht::example::FileWriter::process(const ByteBuffer & buf) { 
    2626    stream_->write(buf.buffer, buf.count); 
    2727} 
    2828 
    29 void swct::example::FileWriter::stop() { out_.close(); } 
     29void ht::example::FileWriter::stop() { out_.close(); } 
    3030 
    3131extern "C" { 
    32     swct::graph::Node * FileWriter() { return new swct::example::FileWriter(); } 
     32    ht::graph::Node * FileWriter() { return new ht::example::FileWriter(); } 
    3333} 
  • trunk/hightest/src/graph/example/FileWriter.h

    r84 r99  
    1 #ifndef SWCT_EXAMPLE_FILE_WRITER_ 
    2 #define SWCT_EXAMPLE_FILE_WRITER_ 
     1#ifndef HT_EXAMPLE_FILE_WRITER_ 
     2#define HT_EXAMPLE_FILE_WRITER_ 
    33 
    44#include <graph/NodeBase.h> 
     
    77#include "FileReader.h" 
    88 
    9 namespace swct { 
     9namespace ht { 
    1010    namespace options { class Config; } 
    1111    namespace example { 
     
    1616            std::ostream *stream_; 
    1717        public: 
    18             void configure(const swct::options::Config *c); 
     18            void configure(const ht::options::Config *c); 
    1919            /// Write the given buffer to our configured output. 
    2020            void process(const ByteBuffer & buf); 
  • trunk/hightest/src/graph/example/Spell.cpp

    r90 r99  
    22#include <fstream> 
    33 
    4 namespace swct { 
     4namespace ht { 
    55    namespace example { 
    6         void Spell::configure(const swct::options::Config *c) { 
     6        void Spell::configure(const ht::options::Config *c) { 
    77            WordFilter::configure(c); 
    88            std::string filename; 
     
    2525 
    2626extern "C" { 
    27     swct::graph::Node * Spell() { return new swct::example::Spell(); } 
     27    ht::graph::Node * Spell() { return new ht::example::Spell(); } 
    2828} 
  • trunk/hightest/src/graph/example/Spell.h

    r84 r99  
    1 #ifndef _SWCT_EXAMPLE_SPELL_H 
    2 #define _SWCT_EXAMPLE_SPELL_H 
     1#ifndef _HT_EXAMPLE_SPELL_H 
     2#define _HT_EXAMPLE_SPELL_H 
    33 
    44#include <graph/example/WordFilter.h> 
     
    66#include <string> 
    77 
    8 namespace swct { 
     8namespace ht { 
    99    namespace example { 
    1010        /** Emit the words that don't match those in another file */ 
     
    1414        public: 
    1515            Spell() {} 
    16             void configure(const swct::options::Config *c); 
     16            void configure(const ht::options::Config *c); 
    1717            /// Implement WordFilter test: return true if the word is unknown 
    1818            bool test(const WordBuffer & buf); 
  • trunk/hightest/src/graph/example/Tee.cpp

    r81 r99  
    22#include <options/Config.h> 
    33 
    4 using namespace swct::options; 
     4using namespace ht::options; 
    55 
    6 namespace swct { 
     6namespace ht { 
    77    namespace example { 
    88 
     
    3636 
    3737extern "C" { 
    38     swct::graph::Node * Tee() { return new swct::example::Tee(); } 
     38    ht::graph::Node * Tee() { return new ht::example::Tee(); } 
    3939} 
  • trunk/hightest/src/graph/example/Tee.h

    r84 r99  
    1 #ifndef SWCT_EXAMPLE_TEE_ 
    2 #define SWCT_EXAMPLE_TEE_ 
     1#ifndef HT_EXAMPLE_TEE_ 
     2#define HT_EXAMPLE_TEE_ 
    33 
    44#include <graph/example/FileReader.h> 
    55 
    6 namespace swct { 
     6namespace ht { 
    77    namespace example { 
    88 
  • trunk/hightest/src/graph/example/WordCount.cpp

    r57 r99  
    33#include <iostream> 
    44 
    5 void swct::example::WordCount::process(const swct::example::WordBuffer & buf) 
     5void ht::example::WordCount::process(const ht::example::WordBuffer & buf) 
    66{ 
    77    bytes_ += buf.length; 
     
    2121} 
    2222 
    23 void swct::example::WordCount::stop() { 
     23void ht::example::WordCount::stop() { 
    2424    if (!next_) { 
    2525        std::cout << lines_ << " " << words_ << " " << bytes_ << std::endl; 
    2626    } else { 
    27         swct::example::ByteBuffer b; 
     27        ht::example::ByteBuffer b; 
    2828        snprintf(b.buffer, sizeof(b.buffer),  
    2929                 "%4d %4d %4d\n",  
     
    3434} 
    3535 
    36 void swct::example::WordCount::connect(swct::graph::Node *next)  { 
    37     next_ = dynamic_cast<swct::example::FileWriter*>(next); 
     36void ht::example::WordCount::connect(ht::graph::Node *next)  { 
     37    next_ = dynamic_cast<ht::example::FileWriter*>(next); 
    3838} 
    3939 
    4040 
    4141extern "C" { 
    42     swct::graph::Node * WordCount() { return new swct::example::WordCount(); } 
     42    ht::graph::Node * WordCount() { return new ht::example::WordCount(); } 
    4343} 
  • trunk/hightest/src/graph/example/WordCount.h

    r84 r99  
    1 #ifndef _SWCT_EXAMPLE_WORDCOUNT_H 
    2 #define _SWCT_EXAMPLE_WORDCOUNT_H 
     1#ifndef _HT_EXAMPLE_WORDCOUNT_H 
     2#define _HT_EXAMPLE_WORDCOUNT_H 
    33 
    44#include <graph/example/WordParser.h> 
    55 
    6 namespace swct { 
     6namespace ht { 
    77    namespace example { 
    88        class FileWriter; 
     
    1717            WordCount() : words_(0), lines_(0), bytes_(0), next_(0) {} 
    1818            void process(const WordBuffer & buf); 
    19             void connect(swct::graph::Node *next); 
     19            void connect(ht::graph::Node *next); 
    2020            /** Send the count of lines, words and characters as whole 
    2121             * numbers, space separated 
  • trunk/hightest/src/graph/example/WordEmitter.cpp

    r90 r99  
    22#include <graph/example/FileReader.h> 
    33 
    4 namespace swct { 
     4namespace ht { 
    55    namespace example { 
    66 
    7         void WordEmitter::connect(swct::graph::Node *node) { 
     7        void WordEmitter::connect(ht::graph::Node *node) { 
    88            next_ = dynamic_cast<BlockReader*>(node); 
    99        } 
     
    1111        void WordEmitter::configured() { 
    1212            if (!next_) 
    13                 throw swct::options::ConfigError("No follow-on node for " + name()); 
     13                throw ht::options::ConfigError("No follow-on node for " + name()); 
    1414        } 
    1515 
     
    2424} 
    2525extern "C" { 
    26     swct::graph::Node * WordEmitter() { return new swct::example::WordEmitter(); } 
     26    ht::graph::Node * WordEmitter() { return new ht::example::WordEmitter(); } 
    2727} 
  • trunk/hightest/src/graph/example/WordEmitter.h

    r84 r99  
    1 #ifndef _SWCT_EXAMPLE_EMITTER_H 
    2 #define _SWCT_EXAMPLE_EMITTER_H 
     1#ifndef _HT_EXAMPLE_EMITTER_H 
     2#define _HT_EXAMPLE_EMITTER_H 
    33 
    44#include <graph/example/WordParser.h> 
    55 
    6 namespace swct { 
     6namespace ht { 
    77    namespace example { 
    88        class FileReader; 
     
    1313        public: 
    1414            WordEmitter() : next_(0) {} 
    15             void connect(swct::graph::Node *node); 
     15            void connect(ht::graph::Node *node); 
    1616            void configured(); 
    1717            void process(const WordBuffer &buf); 
  • trunk/hightest/src/graph/example/WordFilter.cpp

    r84 r99  
    22#include <options/Config.h> 
    33 
    4 void swct::example::WordFilter::connect(swct::graph::Node *next) 
     4void ht::example::WordFilter::connect(ht::graph::Node *next) 
    55{ 
    66    next_ = dynamic_cast<WordReader*>(next); 
     
    88 
    99 
    10 void swct::example::WordFilter::configured() 
     10void ht::example::WordFilter::configured() 
    1111{ 
    1212    if (!next_) 
     
    1414} 
    1515 
    16 void swct::example::WordFilter::process(const WordBuffer & buf) 
     16void ht::example::WordFilter::process(const WordBuffer & buf) 
    1717{ 
    1818    if (test(buf)) 
  • trunk/hightest/src/graph/example/WordFilter.h

    r84 r99  
    1 #ifndef _SWCT_EXAMPLE_WORD_FILTER_H_ 
    2 #define _SWCT_EXAMPLE_WORD_FILTER_H_ 
     1#ifndef _HT_EXAMPLE_WORD_FILTER_H_ 
     2#define _HT_EXAMPLE_WORD_FILTER_H_ 
    33 
    44#include <graph/example/WordParser.h> 
    55 
    6 namespace swct { 
     6namespace ht { 
    77    namespace example { 
    88        /** Decorator that specializes in *not* sending each word through. */ 
     
    1313            WordFilter() : next_(0) {} 
    1414            /// Connect to the next node 
    15             void connect(swct::graph::Node *next); 
     15            void connect(ht::graph::Node *next); 
    1616            /// Verify we have a follow-on connection 
    1717            void configured(); 
  • trunk/hightest/src/graph/example/WordParser.cpp

    r49 r99  
    11#include <graph/example/WordParser.h> 
    22 
    3 namespace swct { 
     3namespace ht { 
    44    namespace example { 
    55        void WordParser::stop() { 
     
    6060 
    6161extern "C" { 
    62     swct::graph::Node * WordParser() { return new swct::example::WordParser(); } 
     62    ht::graph::Node * WordParser() { return new ht::example::WordParser(); } 
    6363} 
  • trunk/hightest/src/graph/example/WordParser.h

    r84 r99  
    1 #ifndef SWCT_EXAMPLE_WORD_PARSER_ 
    2 #define SWCT_EXAMPLE_WORD_PARSER_ 
     1#ifndef HT_EXAMPLE_WORD_PARSER_ 
     2#define HT_EXAMPLE_WORD_PARSER_ 
    33 
    44#include <graph/example/FileReader.h> 
     
    1111            virtual void configured() const {                           \ 
    1212                if (!next_)                                             \ 
    13                     throw swct::options::ConfigError("No follow-on node for node " + name()); \ 
     13                    throw ht::options::ConfigError("No follow-on node for node " + name()); \ 
    1414            }                                                           \ 
    1515            void connect(Node *n)                                       \ 
     
    2525         
    2626 
    27 namespace swct { 
     27namespace ht { 
    2828    namespace example { 
    2929 
     
    4646 
    4747        /** Base class for all consumers of WordBuffers */ 
    48         class WordReader : public swct::graph::NodeBase 
     48        class WordReader : public ht::graph::NodeBase 
    4949        { 
    5050        public: 
  • trunk/hightest/src/graph/example/main.cpp

    r55 r99  
    55#include <stdlib.h> 
    66 
    7 using namespace swct::options; 
    8 using namespace swct::graph; 
     7using namespace ht::options; 
     8using namespace ht::graph; 
    99using namespace std; 
    1010 
  • trunk/hightest/src/graph/example/test.cpp

    r84 r99  
    1919#include <graph/test.h> 
    2020 
    21 using namespace swct::example; 
    22 using namespace swct::options; 
    23 using namespace swct::graph; 
     21using namespace ht::example; 
     22using namespace ht::options; 
     23using namespace ht::graph; 
    2424using namespace std; 
    2525 
  • trunk/hightest/src/graph/test.cpp

    r83 r99  
    88#include <graph/test.h> 
    99 
    10 using namespace swct; 
     10using namespace ht; 
    1111using namespace graph; 
    1212using namespace options; 
  • trunk/hightest/src/graph/test.h

    r40 r99  
    1 #ifndef _SWCT_GRAPH_TEST_H 
    2 #define _SWCT_GRAPH_TEST_H 
     1#ifndef _HT_GRAPH_TEST_H 
     2#define _HT_GRAPH_TEST_H 
    33 
    44#define ASSERT_ERROR_MESSAGE(expr, ExceptionType, msg) {                \ 
  • trunk/hightest/src/hightest/config.h

    r2 r99  
    1 #ifndef SWCT_CONFIG_H 
    2 #define SWCT_CONFIG_H 
     1#ifndef HT_CONFIG_H 
     2#define HT_CONFIG_H 
    33 
    44/* placeholder for site-specific options */ 
  • trunk/hightest/src/log/log.cpp

    r23 r99  
    77#include <options/Config.h> 
    88 
    9 using namespace swct; 
    10 using namespace swct::log; 
    11 using namespace swct::options; 
     9using namespace ht; 
     10using namespace ht::log; 
     11using namespace ht::options; 
    1212 
    1313Logger::~Logger()  
     
    112112} 
    113113 
    114 void swct::log::configure(const Config *cfg)  
     114void ht::log::configure(const Config *cfg)  
    115115{ 
    116116    /*  
  • trunk/hightest/src/log/log.h

    r22 r99  
    1 #ifndef SWCT_LOG_H_ 
    2 #define SWCT_LOG_H_ 
     1#ifndef HT_LOG_H_ 
     2#define HT_LOG_H_ 
    33 
    44#include <string> 
    55 
    6 namespace swct { 
     6namespace ht { 
    77    namespace options { class Config; } 
    88    namespace log { 
  • trunk/hightest/src/log/test.cpp

    r23 r99  
    77#include <iostream> 
    88 
    9 using namespace swct; 
    10 using namespace swct::options; 
    11 using namespace swct::log; 
     9using namespace ht; 
     10using namespace ht::options; 
     11using namespace ht::log; 
    1212 
    1313class Test : public CppUnit::TestCase { 
  • trunk/hightest/src/options/Attribute.cpp

    r23 r99  
    55 
    66using namespace std; 
    7 using namespace swct; 
     7using namespace ht; 
    88using namespace options; 
    99 
    10 swct::options::Attribute::Attribute(const std::string & value) : value_(value) {} 
    11 swct::options::Attribute::~Attribute() {} 
    12 const string & swct::options::Attribute::value() const { return value_; } 
     10ht::options::Attribute::Attribute(const std::string & value) : value_(value) {} 
     11ht::options::Attribute::~Attribute() {} 
     12const string & ht::options::Attribute::value() const { return value_; } 
    1313 
    1414inline void doNothing() {} 
    1515 
    16 namespace swct { 
     16namespace ht { 
    1717    namespace options { 
    1818 
     19    AttributeConversionError::AttributeConversionError( 
     20        const std::string & value 
     21        ) 
     22        : ht::utils::BaseException(value) { 
     23    } 
    1924    void operator>>(const Attribute & a, double & v) { 
    2025        string s(a.value()); 
    2126        const char * ptr = s.c_str(); 
    2227        char * end = 0; 
    23         v = strtod(ptr, &end); 
     28        v = ::strtod(ptr, &end); 
    2429        if (end != ptr + s.length()) { 
    25             throw AttributeConversionError(); 
     30            throw AttributeConversionError(s); 
    2631        } 
    2732        doNothing();            // for coverage 
  • trunk/hightest/src/options/Attribute.h

    r95 r99  
    11// -*- c++ -*-  
    22#include <hightest/config.h> 
     3#include <utils/Error.h> 
    34 
    45#include <string> 
    56 
    6 namespace swct { 
     7namespace ht { 
    78    namespace options { 
    89        /** An intermediate class for extracting values from a config node. */ 
     
    1819        }; 
    1920        /** Simple class to tell you what you are doing wrong. */ 
    20         class AttributeConversionError : public std::exception {}; 
     21        class AttributeConversionError : public ht::utils::BaseException  
     22        { 
     23        public: 
     24            AttributeConversionError(const std::string & value); 
     25        }; 
    2126         
    2227        /** Use the C++ streams metaphore to extract components from a graph */ 
  • trunk/hightest/src/options/Config.cpp

    r16 r99  
    11#include <options/Config.h> 
    22 
    3 swct::options::Config::~Config() {} 
     3ht::options::Config::~Config() {} 
  • trunk/hightest/src/options/Config.h

    r95 r99  
    11// -*- c++ -*-  
    2 #ifndef SWCT_OPTIONS_CONFIG_H 
    3 #define SWCT_OPTIONS_CONFIG_H 
     2#ifndef HT_OPTIONS_CONFIG_H 
     3#define HT_OPTIONS_CONFIG_H 
    44 
    55#include <hightest/config.h> 
     
    1111#include <vector> 
    1212 
    13 namespace swct { 
     13namespace ht { 
    1414    namespace options { 
    1515        /** Exception thrown when a config file is bad */ 
  • trunk/hightest/src/options/XmlConfig.cpp

    r23 r99  
    1010#include <expat.h> 
    1111 
    12 using namespace swct; 
     12using namespace ht; 
    1313using namespace options; 
    1414using namespace std; 
     
    170170 
    171171/** Factory function for an Xml-based configuration reader */ 
    172 Config * swct::options::XmlConfig(istream &s)  
     172Config * ht::options::XmlConfig(istream &s)  
    173173{ 
    174174    Parser parser; 
  • trunk/hightest/src/options/XmlConfig.h

    r2 r99  
    11// -*- c++ -*-  
    2 #ifndef SWCT_OPTIONS_XMLCONFIG_H 
    3 #define SWCT_OPTIONS_XMLCONFIG_H 
     2#ifndef HT_OPTIONS_XMLCONFIG_H 
     3#define HT_OPTIONS_XMLCONFIG_H 
    44 
    55#include <options/Config.h> 
    66#include <istream> 
    77 
    8 namespace swct { 
     8namespace ht { 
    99    namespace options { 
    1010        Config *XmlConfig(std::istream &); 
  • trunk/hightest/src/options/test.cpp

    r90 r99  
    11#include <options/XmlConfig.h> 
     2#include <utils/Error.h> 
    23#include <cppunit/TestCaller.h> 
    34#include <cppunit/TestSuite.h> 
     
    910#include <malloc.h> 
    1011 
    11 using namespace swct::options; 
     12using namespace ht::options; 
     13using namespace ht::utils; 
    1214using namespace std; 
    1315 
     
    5557        a->attribute("bad") >> str; 
    5658        CPPUNIT_ASSERT(str == "1="); 
    57         CPPUNIT_ASSERT_THROW(a->attribute("bad") >> d, exception); 
     59        CPPUNIT_ASSERT_THROW(a->attribute("bad") >> d, BaseException); 
    5860        stringstream broken("<"); 
    59         CPPUNIT_ASSERT_THROW(XmlConfig(broken), exception); 
     61        CPPUNIT_ASSERT_THROW(XmlConfig(broken), BaseException); 
    6062        try { 
    6163            XmlConfig(broken); 
     
    8890            __malloc_hook = malloc_fails; 
    8991            p = XmlConfig(data), 
    90             exception); 
     92            bad_alloc); 
    9193        __malloc_hook = oldHook; 
    9294#endif 
  • trunk/hightest/src/test/driver.cpp

    r52 r99  
    1313    for (int i = 1; i < argc; i++) { 
    1414        TestFunction function = 0; 
    15         swct::utils::LoadFunction(argv[i], "test", function); 
     15        ht::utils::LoadFunction(argv[i], "test", function); 
    1616        if (function) { 
    1717            runner.addTest(function()); 
  • trunk/hightest/src/utils/DynamicLibrary.h

    r96 r99  
    1 #ifndef SWCT_UTILS_DYNAMICLIBRARY_H 
    2 #define SWCT_UTILS_DYNAMICLIBRARY_H 
     1#ifndef HT_UTILS_DYNAMICLIBRARY_H 
     2#define HT_UTILS_DYNAMICLIBRARY_H 
    33 
    44#include <hightest/config.h> 
     
    66#include <dlfcn.h> 
    77 
    8 namespace swct { 
     8namespace ht { 
    99    namespace utils { 
    1010        /// Error thrown when a library fails to load  
  • trunk/hightest/src/utils/Error.cpp

    r7 r99  
    11#include <utils/Error.h> 
    22 
    3 namespace swct { 
     3namespace ht { 
    44    namespace utils { 
    55        const char * BaseException::what() const throw() { 
  • trunk/hightest/src/utils/Error.h

    r23 r99  
    1 #ifndef SWCT_UTILS_ERROR_H 
    2 #define SWCT_UTILS_ERROR_H 
     1#ifndef HT_UTILS_ERROR_H 
     2#define HT_UTILS_ERROR_H 
    33 
    44#include <exception> 
    55#include <string> 
    66 
    7 namespace swct { 
     7namespace ht { 
    88    namespace utils { 
    99        /// Very simple exception type that holds an error message. 
  • trunk/hightest/src/utils/String.cpp

    r2 r99  
    33using namespace std; 
    44 
    5 int swct::utils::split(const string& input,  
    6                        const string& delimiter,  
    7                        vector<string>& results) 
     5int ht::utils::split(const string& input,  
     6                     const string& delimiter,  
     7                     vector<string>& results) 
    88{ 
    99    size_t start = 0; 
  • trunk/hightest/src/utils/String.h

    r2 r99  
    11// -*- c++ -*- 
    2 #ifndef SWCT_UTIL_STRING_H 
    3 #define SWCT_UTIL_STRING_H 
     2#ifndef HT_UTIL_STRING_H 
     3#define HT_UTIL_STRING_H 
    44 
    55#include <string> 
    66#include <vector> 
    77 
    8 namespace swct { 
     8namespace ht { 
    99    namespace utils { 
    1010        int split(const std::string& input,  
  • trunk/hightest/src/utils/test.cpp

    r23 r99  
    22#include <cppunit/TestCaller.h> 
    33 
    4 using namespace swct::utils; 
     4using namespace ht::utils; 
    55using namespace std; 
    66 
  • trunk/hightest/src/utils/unittest.h

    r2 r99  
    1 #ifndef SWCT_UTILS_UNITTEST_H 
    2 #define SWCT_UTILS_UNITTEST_H 
     1#ifndef HT_UTILS_UNITTEST_H 
     2#define HT_UTILS_UNITTEST_H 
    33 
    44#include <cppunit/TestCaller.h>