git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@71 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
mat007 2009-12-10 23:34:26 +00:00
parent eb78cf942e
commit 618206f410
4 changed files with 41 additions and 20 deletions

View file

@ -124,20 +124,20 @@ namespace detail
template< typename E >
E& configure( BOOST_DEDUCED_TYPENAME E::expectation_tag,
const std::string& object, const std::string& /*op*/,
const std::string& parent, const std::string& /*op*/,
const std::string& /*name*/, E& e )
{
if( object != "?" || e.tag() == "?" )
e.tag( object );
if( parent != "?" || e.tag() == "?" )
e.tag( parent );
return e;
}
template< typename E, typename T >
E& configure( E& e, const std::string& object, const std::string& op,
E& configure( E& e, const std::string& parent, const std::string& op,
const std::string& name, const T& t )
{
set_parent( e, t );
if( object != "?" || e.tag() == "?" )
e.tag( object + op + type_name< T >() + "::" + name );
if( parent != "?" || e.tag() == "?" )
e.tag( parent + op + type_name< T >() + "::" + name );
return e;
}

View file

@ -0,0 +1,30 @@
//
// Copyright Mathieu Champlon 2009
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
#ifndef MOCK_ORDERABLE_HPP_INCLUDED
#define MOCK_ORDERABLE_HPP_INCLUDED
namespace mock
{
class sequence;
namespace detail
{
class orderable
{
public:
orderable() {}
virtual ~orderable() {}
virtual void remove( sequence& s ) = 0;
};
}
}
#endif // #ifndef MOCK_ORDERABLE_HPP_INCLUDED

View file

@ -9,25 +9,12 @@
#ifndef MOCK_SEQUENCE_HPP_INCLUDED
#define MOCK_SEQUENCE_HPP_INCLUDED
#include "orderable.hpp"
#include <vector>
#include <algorithm>
namespace mock
{
class sequence;
namespace detail
{
class orderable
{
public:
orderable() {}
virtual ~orderable() {}
virtual void remove( sequence& s ) = 0;
};
}
class sequence
{
public: