コード例 #1
0
ファイル: basic_cstring.hpp プロジェクト: argv0/riak-cxx
inline basic_cstring<CharT>
basic_cstring<CharT>::substr( size_type beg_index, size_type end_index ) const
{
    return beg_index > size()
            ?       self_type()
            : end_index > size()
                ?   self_type( m_begin + beg_index, m_end )
                :   self_type( m_begin + beg_index, m_begin + end_index );
}
コード例 #2
0
ファイル: basic_cstring.hpp プロジェクト: argv0/riak-cxx
inline basic_cstring<CharT>
basic_cstring<CharT>::default_trim_ex()
{
    static CharT ws[3] = { CharT(' '), CharT('\t'), CharT('\n') }; // !! wide case

    return self_type( ws, 3 );
}
コード例 #3
0
ファイル: GroupAction.cpp プロジェクト: i8degrees/nomlib
std::unique_ptr<IActionObject> GroupAction::clone() const
{
  auto cloned_obj = nom::make_unique<self_type>( self_type(*this) );
  if( cloned_obj != nullptr ) {

    cloned_obj->set_status(FrameState::PLAYING);

    cloned_obj->actions_.clear();
    group_action cloned_entry = {};
    auto actions_end = this->actions_.end();
    for( auto itr = this->actions_.begin(); itr != actions_end; ++itr ) {
      if( (*itr).action != nullptr ) {
        cloned_entry.action = (*itr).action->clone();
      }

      cloned_entry.status = FrameState::PLAYING;
      cloned_obj->actions_.emplace_back(cloned_entry);
    }

    cloned_obj->num_completed_ = 0;
    cloned_obj->num_actions_ = cloned_obj->actions_.size();

    // IMPORTANT: This is done to prevent the cloned action from being erased
    // from a running queue at the same time as the original instance!
    cloned_obj->set_name( "__" + this->name() + "_cloned" );

    return std::move(cloned_obj);
  } else {
    return nullptr;
  }
}
コード例 #4
0
ファイル: basic_cstring.hpp プロジェクト: argv0/riak-cxx
inline basic_cstring<CharT>&
basic_cstring<CharT>::assign( pointer f, pointer l )
{
    return *this = self_type( f, l );
}
コード例 #5
0
ファイル: basic_cstring.hpp プロジェクト: argv0/riak-cxx
inline basic_cstring<CharT>&
basic_cstring<CharT>::assign( pointer s, size_type len )
{
    return *this = self_type( s, len );
}
コード例 #6
0
ファイル: basic_cstring.hpp プロジェクト: argv0/riak-cxx
inline basic_cstring<CharT>&
basic_cstring<CharT>::assign( pointer s )
{
    return *this = self_type( s );
}
コード例 #7
0
ファイル: basic_cstring.hpp プロジェクト: argv0/riak-cxx
inline basic_cstring<CharT>&
basic_cstring<CharT>::assign( std_string const& s, size_type pos, size_type len )
{
    return *this = self_type( s.c_str() + pos, len );
}
コード例 #8
0
ファイル: basic_cstring.hpp プロジェクト: argv0/riak-cxx
inline basic_cstring<CharT>&
basic_cstring<CharT>::assign( std_string const& s )
{
    return *this = self_type( s );
}
コード例 #9
0
ファイル: basic_cstring.hpp プロジェクト: argv0/riak-cxx
inline basic_cstring<CharT>&
basic_cstring<CharT>::assign( basic_cstring<CharT> const& s, size_type pos, size_type len )
{
    return *this = self_type( s.m_begin + pos, len );
}
コード例 #10
0
ファイル: basic_cstring.hpp プロジェクト: argv0/riak-cxx
inline basic_cstring<CharT>&
basic_cstring<CharT>::operator=( pointer s )
{
    return *this = self_type( s );
}
コード例 #11
0
ファイル: basic_cstring.hpp プロジェクト: argv0/riak-cxx
inline basic_cstring<CharT>&
basic_cstring<CharT>::operator=( std_string const& s )
{
    return *this = self_type( s );
}
コード例 #12
0
ファイル: ScaleByAction.cpp プロジェクト: i8degrees/nomlib
std::unique_ptr<IActionObject> ScaleByAction::clone() const
{
  return( nom::make_unique<self_type>( self_type(*this) ) );
}
コード例 #13
0
ファイル: PackedPixel.hpp プロジェクト: gumpliao/sara
 inline void operator*=(bitfield_type other)
 {
   this->template apply_op<std::multiplies<bitfield_type> >(
     self_type(other, other, other)
   );
 }