资源简介
C语言版本的STL(libcstl)源代码,支持跨平台的编译和使用。
代码片段和文件信息
/*
* The implementation of mutating algorithm.
* Copyright (C) 2008 - 2013 Wangbo
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not write to the Free Software
* Foundation Inc. 51 Franklin Street Fifth Floor Boston MA 02110-1301 USA
*
* Author e-mail: activesys.wb@gmail.com
* activesys@sina.com.cn
*/
/** include section **/
#include
#include
#include
#include
#include
#include
#include
#include “cstl_algo_mutating_aux.h“
/** local constant declaration and local macro section **/
/** local data type declaration and local struct union enum section **/
/** local function prototype section **/
/** exported global variable definition section **/
/** local global variable definition section **/
/** exported function implementation section **/
/**
* Assigns the values of elements from a source range to a destination range iterating through the source sequence of elements and
* assigning them new positions in a forward direction.
*/
output_iterator_t algo_copy(input_iterator_t it_first input_iterator_t it_last output_iterator_t it_result)
{
assert(_iterator_valid_range(it_first it_last _INPUT_ITERATOR));
assert(_iterator_limit_type(it_result _OUTPUT_ITERATOR));
assert(_iterator_same_elem_type(it_first it_result));
for (; !iterator_equal(it_first it_last); it_first = iterator_next(it_first) it_result = iterator_next(it_result)) {
iterator_set_value(it_result iterator_get_pointer(it_first));
}
return it_result;
}
/**
* Assigns the values of elements from a source range to a destination range iterating through the source sequence of elements and
* assigning them new positions in a forward direction.
*/
output_iterator_t algo_copy_n(input_iterator_t it_first size_t t_count output_iterator_t it_result)
{
return algo_copy(it_first iterator_advance(it_first t_count) it_result);
}
/**
* Assigns the values of elements from a source range to a destination range iterating through the source sequence of elements and
* assigning them new positions in a backward direction.
*/
bidirectional_iterator_t algo_copy_backward(
bidirectional_iterator_t it_first bidirectional_iterator_t it_last bidirectional_iterator_t it_result)
{
assert(_i
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2014-01-25 02:06 libcstl-master\
文件 193 2014-01-25 02:06 libcstl-master\.gitignore
文件 175 2014-01-25 02:06 libcstl-master\AUTHORS
文件 24381 2014-01-25 02:06 libcstl-master\COPYING.LESSER
文件 2250 2014-01-25 02:06 libcstl-master\ChangeLog
文件 3662 2014-01-25 02:06 libcstl-master\INSTALL
文件 22579 2014-01-25 02:06 libcstl-master\Makefile
文件 107 2014-01-25 02:06 libcstl-master\Makefile.am
文件 22293 2014-01-25 02:06 libcstl-master\Makefile.in
文件 741 2014-01-25 02:06 libcstl-master\README
文件 1211 2014-01-25 02:06 libcstl-master\README.Win32
文件 575 2014-01-25 02:06 libcstl-master\Sconstruct
文件 7 2014-01-25 02:06 libcstl-master\VERSION
文件 316266 2014-01-25 02:06 libcstl-master\aclocal.m4
目录 0 2014-01-25 02:06 libcstl-master\build-win\
文件 16979 2014-01-25 02:06 libcstl-master\build-win\Makefile
文件 101 2014-01-25 02:06 libcstl-master\build-win\Makefile.am
文件 16658 2014-01-25 02:06 libcstl-master\build-win\Makefile.in
文件 54851 2014-01-25 02:06 libcstl-master\build-win\libcstl.def
文件 2430 2014-01-25 02:06 libcstl-master\build-win\libcstl.rc
文件 401 2014-01-25 02:06 libcstl-master\build-win\resource.h
目录 0 2014-01-25 02:06 libcstl-master\build-win\vc8\
文件 9760 2014-01-25 02:06 libcstl-master\build-win\vc8\Makefile
文件 95 2014-01-25 02:06 libcstl-master\build-win\vc8\Makefile.am
文件 9418 2014-01-25 02:06 libcstl-master\build-win\vc8\Makefile.in
文件 1335 2014-01-25 02:06 libcstl-master\build-win\vc8\libcstl.sln
文件 21083 2014-01-25 02:06 libcstl-master\build-win\vc8\libcstl.vcproj
文件 37833 2014-01-25 02:06 libcstl-master\build-win\vc8\libcstl_ut.vcproj
目录 0 2014-01-25 02:06 libcstl-master\build-win\vc9\
文件 9760 2014-01-25 02:06 libcstl-master\build-win\vc9\Makefile
文件 95 2014-01-25 02:06 libcstl-master\build-win\vc9\Makefile.am
............此处省略454个文件信息
评论
共有 条评论