mirror of
https://github.com/mat007/turtle.git
synced 2026-06-22 12:13:43 +00:00
Clean-up
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@71 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
parent
eb78cf942e
commit
618206f410
4 changed files with 41 additions and 20 deletions
|
|
@ -204,6 +204,10 @@
|
||||||
RelativePath="..\..\src\libraries\turtle\object.hpp"
|
RelativePath="..\..\src\libraries\turtle\object.hpp"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\src\libraries\turtle\orderable.hpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\src\libraries\turtle\placeholder.hpp"
|
RelativePath="..\..\src\libraries\turtle\placeholder.hpp"
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -124,20 +124,20 @@ namespace detail
|
||||||
|
|
||||||
template< typename E >
|
template< typename E >
|
||||||
E& configure( BOOST_DEDUCED_TYPENAME E::expectation_tag,
|
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 )
|
const std::string& /*name*/, E& e )
|
||||||
{
|
{
|
||||||
if( object != "?" || e.tag() == "?" )
|
if( parent != "?" || e.tag() == "?" )
|
||||||
e.tag( object );
|
e.tag( parent );
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
template< typename E, typename T >
|
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 )
|
const std::string& name, const T& t )
|
||||||
{
|
{
|
||||||
set_parent( e, t );
|
set_parent( e, t );
|
||||||
if( object != "?" || e.tag() == "?" )
|
if( parent != "?" || e.tag() == "?" )
|
||||||
e.tag( object + op + type_name< T >() + "::" + name );
|
e.tag( parent + op + type_name< T >() + "::" + name );
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
30
src/libraries/turtle/orderable.hpp
Normal file
30
src/libraries/turtle/orderable.hpp
Normal 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
|
||||||
|
|
@ -9,25 +9,12 @@
|
||||||
#ifndef MOCK_SEQUENCE_HPP_INCLUDED
|
#ifndef MOCK_SEQUENCE_HPP_INCLUDED
|
||||||
#define MOCK_SEQUENCE_HPP_INCLUDED
|
#define MOCK_SEQUENCE_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include "orderable.hpp"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
namespace mock
|
namespace mock
|
||||||
{
|
{
|
||||||
class sequence;
|
|
||||||
|
|
||||||
namespace detail
|
|
||||||
{
|
|
||||||
class orderable
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
orderable() {}
|
|
||||||
virtual ~orderable() {}
|
|
||||||
|
|
||||||
virtual void remove( sequence& s ) = 0;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
class sequence
|
class sequence
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue