Update of /cvsroot/cpptool/rfta/include/rfta/test
In directory sc8-pr-cvs1:/tmp/cvs-serv31944/include/rfta/test
Added Files:
SourceBuilder.h
Log Message:
* moved SourceBuilder to include/rfta/test and src/rftatest
--- NEW FILE: SourceBuilder.h ---
// //////////////////////////////////////////////////////////////////////////
// (c)Copyright 2002, Baptiste Lepilleur.
// Created: 2002/11/27
// //////////////////////////////////////////////////////////////////////////
#ifndef RFTA_SOURCEBUILDER_H
#define RFTA_SOURCEBUILDER_H
#include <rfta/test/UnitTesting.h>
#include <rfta/parser/SourceRange.h>
#include <map>
#include <string>
namespace Refactoring { namespace Testing
{
class SourceBuilder
{
public:
SourceBuilder( std::string &source );
SourceRange mark( const std::string &key );
SourceRange add( const std::string &source );
SourceRange addKeyed( const std::string &source,
const std::string &key );
SourceRange addKeyingMid( const std::string &addedSource1,
const std::string &keyedSource,
const std::string &addedSource2,
const std::string &key );
SourceRange extend( const std::string &key );
const SourceRange &getRange( const std::string &key ) const;
int getStartIndex( const std::string &key ) const;
int getEndIndex( const std::string &key ) const;
int getLength( const std::string &key ) const;
bool hasKey( const std::string &key ) const;
const std::string &getSource() const;
private:
typedef std::map<std::string,SourceRange> Ranges;
Ranges ranges_;
std::string &source_;
};
} // namespace Testing
} // namespace Refactoring
#endif // RFTA_SOURCEBUILDER_H
|