• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ sit函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中sit函数的典型用法代码示例。如果您正苦于以下问题:C++ sit函数的具体用法?C++ sit怎么用?C++ sit使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了sit函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: getapp

sttx::pointer transactionmaster::fetch (shamapitem::ref item,
        shamaptreenode::tntype type,
        bool checkdisk, std::uint32_t ucommitledger)
{
    sttx::pointer  txn;
    transaction::pointer            itx = getapp().getmastertransaction ().fetch (item->gettag (), false);

    if (!itx)
    {

        if (type == shamaptreenode::tntransaction_nm)
        {
            serializeriterator sit (item->peekserializer ());
            txn = std::make_shared<sttx> (std::ref (sit));
        }
        else if (type == shamaptreenode::tntransaction_md)
        {
            serializer s;
            int length;
            item->peekserializer ().getvl (s.moddata (), 0, length);
            serializeriterator sit (s);

            txn = std::make_shared<sttx> (std::ref (sit));
        }
    }
    else
    {
        if (ucommitledger)
            itx->setstatus (committed, ucommitledger);

        txn = itx->getstransaction ();
    }

    return txn;
}
开发者ID:moorecoin,项目名称:MooreCoinService,代码行数:35,代码来源:TransactionMaster.cpp


示例2: it

QTodoListItemsSorter::QTodoListItemsSorter(QPtrList<QWidget>* _input,const QTodoSortCriteriaMap* sort_criterias)
{	//FIXME: not yet section ready
	//1. get sub lists
	//2. sort sub lists
	//3. connect to big list
	//4. return it

	input = _input;

	std::map<int,QTodoItemSortPtrList* > lists;

	QPtrListIterator<QWidget> it(*input);
	int sub_counter = 0;

	for(;it.current() || it.atFirst();++it)
	{
		if(QTodoItemSortPtrList* sub_list = getSubList(it))
		{
			lists[sub_counter] = sub_list;
			++sub_counter;
		}
	}

	for(std::map<int,QTodoItemSortPtrList* >::iterator it = lists.begin(); it != lists.end(); ++it)
	{
		(*it).second->setSortCriterias(sort_criterias);
		(*it).second->sort();
	}

	QPtrList<QWidget>* big_list = new QPtrList<QWidget>;
	for(std::map<int,QTodoItemSortPtrList* >::iterator it = lists.begin(); it != lists.end(); ++it)
	{
		if(!(*it).second->top_item)
		{
			QPtrListIterator<QTodoItem> sit(*(*it).second);
			for(; sit.current(); ++sit)
				big_list->append(sit.current());
		}
		else
		{
			int pos = big_list->find((*it).second->top_item)+1;
			QPtrListIterator<QTodoItem> sit(*(*it).second);
			sit.toLast();
			for(; sit.current(); --sit)
				big_list->insert(pos,sit.current());
		}
	}
	output = big_list;
}
开发者ID:tobimensch,项目名称:qtodo,代码行数:49,代码来源:qtodo_list.cpp


示例3: iflags

 inline
 std::basic_istream<CharT, Traits>&
 operator>>(std::basic_istream<CharT, Traits>& is, time_duration& td)
 {
   boost::io::ios_flags_saver iflags(is);
   typename std::basic_istream<CharT, Traits>::sentry strm_sentry(is, false);
   if (strm_sentry) {
     try {
       typedef typename date_time::time_input_facet<ptime, CharT> time_input_facet;
       std::istreambuf_iterator<CharT,Traits> sit(is), str_end;
       if(std::has_facet<time_input_facet>(is.getloc())) {
         std::use_facet<time_input_facet>(is.getloc()).get(sit, str_end, is, td);
       }
       else {
         time_input_facet* f = new time_input_facet();
         std::locale l = std::locale(is.getloc(), f);
         is.imbue(l);
         f->get(sit, str_end, is, td);
       }
     }
     catch(...) {
       std::ios_base::iostate exception_mask = is.exceptions();
       if(std::ios_base::failbit & exception_mask) {
         try { is.setstate(std::ios_base::failbit); }
         catch(std::ios_base::failure&) {}
         throw; // rethrow original exception
       }
       else {
         is.setstate(std::ios_base::failbit);
       }
     }
   }
   return is;
 }
开发者ID:BackupTheBerlios,项目名称:airdc-svn,代码行数:34,代码来源:posix_time_io.hpp


示例4: make

 static type make(const View& src, int n) {
     typedef typename type::xy_locator                             locator_t;
     typedef typename type::x_iterator                            x_iterator_t;
     typedef typename iterator_adaptor_get_base<x_iterator_t>::type x_iterator_base_t;
     x_iterator_t sit(x_iterator_base_t(&(src(0,0)[n])),src.pixels().pixel_size());
     return type(src.dimensions(),locator_t(sit, src.pixels().row_size()));
 }
开发者ID:0xDEC0DE8,项目名称:mcsema,代码行数:7,代码来源:image_view_factory.hpp


示例5: switch

bool glStaticMovesRobot::demo ( )
{
    static int  move_number = 5;
    switch (move_number)
    {
        case 5 :    stand( );                                break;
        case 6 :    sit  ( );                                break;
        case 7 :    squat( 90 );                             break;
        case 8 :    one_knee_kneel(true);                    break;
        case 9 :    kneel( );                                break;

        case 10 :    arms_down_by_side  (  );               break;
        case 11 :    w_question         (  );               break;
        case 12 :    hands_on_hip       (  );               break;
        case 13 :    folded_arms        (  );               break;
        case 14 :    zombie_arms        (  );               break;
        case 15 :    arm_straight_up    ( true  );          break;
        case 16 :    arm_straight_up    ( false );          break;
        case 17 :    wave_1             ( true );           break;
        case 18 :    wave_2             ( true );           break;
        case 19 :    arm_stretched_to_side_left (  );       break;
        case 20 :    arm_stretched_to_side_right(  );       break;
        case 21 :    attention_1        (  );               break;
        case 22 :    attention_2        (  );               break;
        case 23 :    move_number = 1.;    return true;      break;
        default:    break;
    }
    move_number++;
    return false;
}
开发者ID:stenniswood,项目名称:bk_code,代码行数:30,代码来源:robot_moves.cpp


示例6: cfg

void KviRegisteredChannelDataBase::load(const QString &filename)
{
	KviConfigurationFile cfg(filename,KviConfigurationFile::Read);

	qDeleteAll(*m_pChannelDict);
	m_pChannelDict->clear();

	KviConfigurationFileIterator it(*(cfg.dict()));

	while(KviConfigurationFileGroup * d = it.current())
	{
		QString szMask = it.currentKey();
		QString szChan = KviQString::leftToLast(szMask,QChar('@'),false);
		KviQString::cutToLast(szMask,QChar('@'),true);
		KviRegisteredChannel * c = new KviRegisteredChannel(szChan,szMask);
		add(c);
		KviConfigurationFileGroupIterator sit(*d);
		while(QString * s = sit.current())
		{
			c->setProperty(sit.currentKey(),*s);
			++sit;
		}
		++it;
	}
}
开发者ID:DINKIN,项目名称:KVIrc,代码行数:25,代码来源:KviRegisteredChannelDataBase.cpp


示例7: sterilize

std::shared_ptr<STTx const>
sterilize (STTx const& stx)
{
    Serializer s;
    stx.add(s);
    SerialIter sit(s.slice());
    return std::make_shared<STTx const>(std::ref(sit));
}
开发者ID:dreamsxin,项目名称:rippled,代码行数:8,代码来源:STTx.cpp


示例8: iflags

inline
std::basic_istream<CharT, Traits>&
operator>>(std::basic_istream<CharT, Traits>& is, local_date_time& ldt)
{
    boost::io::ios_flags_saver iflags(is);
    typename std::basic_istream<CharT, Traits>::sentry strm_sentry(is, false);
    if (strm_sentry) {
        try {
            typedef typename local_date_time::utc_time_type utc_time_type;
            typedef typename date_time::time_input_facet<utc_time_type, CharT> time_input_facet;

            // intermediate objects
            std::basic_string<CharT> tz_str;
            utc_time_type pt(not_a_date_time);

            std::istreambuf_iterator<CharT,Traits> sit(is), str_end;
            if(std::has_facet<time_input_facet>(is.getloc())) {
                std::use_facet<time_input_facet>(is.getloc()).get_local_time(sit, str_end, is, pt, tz_str);
            }
            else {
                time_input_facet* f = new time_input_facet();
                std::locale l = std::locale(is.getloc(), f);
                is.imbue(l);
                f->get_local_time(sit, str_end, is, pt, tz_str);
            }
            if(tz_str.empty()) {
                time_zone_ptr null_ptr;
                // a null time_zone_ptr creates a local_date_time that is UTC
                ldt = local_date_time(pt, null_ptr);
            }
            else {
                time_zone_ptr tz_ptr(new posix_time_zone(date_time::convert_string_type<CharT,char>(tz_str)));
                // the "date & time" constructor expects the time label to *not* be utc.
                // a posix_tz_string also expects the time label to *not* be utc.
                ldt = local_date_time(pt.date(), pt.time_of_day(), tz_ptr, local_date_time::EXCEPTION_ON_ERROR);
            }
        }
        catch(...) {
            // mask tells us what exceptions are turned on
            std::ios_base::iostate exception_mask = is.exceptions();
            // if the user wants exceptions on failbit, we'll rethrow our
            // date_time exception & set the failbit
            if(std::ios_base::failbit & exception_mask) {
                try {
                    is.setstate(std::ios_base::failbit);
                }
                catch(std::ios_base::failure&) {} // ignore this one
                throw; // rethrow original exception
            }
            else {
                // if the user want's to fail quietly, we simply set the failbit
                is.setstate(std::ios_base::failbit);
            }

        }
    }
    return is;
}
开发者ID:AllenWangxiao,项目名称:darkforce,代码行数:58,代码来源:local_time_io.hpp


示例9: stobject

stledgerentry::stledgerentry (
    const serializer& s, uint256 const& index)
    : stobject (sfledgerentry), mindex (index), mmutable (true)
{
    // we know 's' isn't going away
    serializeriterator sit (const_cast<serializer&> (s));
    set (sit);
    setsletype ();
}
开发者ID:moorecoin,项目名称:MooreCoinService,代码行数:9,代码来源:STLedgerEntry.cpp


示例10: sit

void FermionBase::copySPOs(spo_set_type& spos)
{
  spo_set_type::const_iterator sit(spos.begin());
  while (sit != spos.end())
  {
    addSPO((*sit).first, (*sit).second);
    ++sit;
  }
}
开发者ID:jyamu,项目名称:qmc,代码行数:9,代码来源:FermionBase.cpp


示例11: sit

void PhotoDialog::resetComments()
{
    QSetIterator<PhotoCommentItem*> sit(mComments);
    //QLayout* l = ui->scrollAreaWidgetContents->layout();
    while(sit.hasNext())
    {
        PhotoCommentItem* item = sit.next();
        ui->verticalLayout->insertWidget(0,item);
    }
}
开发者ID:N00D13,项目名称:RetroShare,代码行数:10,代码来源:PhotoDialog.cpp


示例12: dereference

 value_type
 dereference() const override
 {
     value_type result;
     {
         SerialIter sit(
             iter_->second.first->slice());
         result.first = std::make_shared<
             STTx const>(sit);
     }
     if (metadata_)
     {
         SerialIter sit(
             iter_->second.second->slice());
         result.second = std::make_shared<
             STObject const>(sit, sfMetadata);
     }
     return result;
 }
开发者ID:E-LLP,项目名称:rippled,代码行数:19,代码来源:OpenView.cpp


示例13: getServiceTypeForExtension

int eServiceFS::getServiceTypeForExtension(const std::string &str)
{
	for (std::map<int, std::list<std::string> >::iterator sit(m_additional_extensions.begin()); sit != m_additional_extensions.end(); ++sit)
	{
		for (std::list<std::string>::iterator eit(sit->second.begin()); eit != sit->second.end(); ++eit)
		{
			if (*eit == str)
				return sit->first;
		}
	}
	return -1;
}
开发者ID:Leatherface75,项目名称:enigma2pc,代码行数:12,代码来源:servicefs.cpp


示例14: getServiceTypeForExtension

int eServiceCenter::getServiceTypeForExtension(const char *str)
{
	for (std::map<int, std::list<std::string> >::iterator sit(extensions.begin()); sit != extensions.end(); ++sit)
	{
		for (std::list<std::string>::iterator eit(sit->second.begin()); eit != sit->second.end(); ++eit)
		{
			if (*eit == str)
				return sit->first;
		}
	}
	return -1;
}
开发者ID:st7TEAM,项目名称:bh-gui,代码行数:12,代码来源:service.cpp


示例15: removeServiceFactory

RESULT eServiceCenter::removeServiceFactory(int id)
{
	for (std::map<std::string, int>::iterator sit(extensions_r.begin()); sit != extensions_r.end(); )
	{
		if (sit->second == id)
		{
			extensions_r.erase(sit++);
		}
		else
		{
			++sit;
		}
	}
	handler.erase(id);
	return 0;
}
开发者ID:Antonio-Team,项目名称:enigma2,代码行数:16,代码来源:service.cpp


示例16: s

Transaction::pointer Transaction::sharedTransaction(const std::vector<unsigned char>&vucTransaction, bool bValidate)
{
	try
	{
		Serializer			s(vucTransaction);
		SerializerIterator	sit(s);

		SerializedTransaction::pointer	st	= boost::make_shared<SerializedTransaction>(boost::ref(sit));

		return boost::make_shared<Transaction>(st, bValidate);
	}
	catch (...)
	{
		Log(lsWARNING) << "Exception constructing transaction";
		return boost::shared_ptr<Transaction>();
	}
}
开发者ID:Criptomonedas,项目名称:rippled,代码行数:17,代码来源:Transaction.cpp


示例17: debugTostr

std::string
debugTostr (SHAMap const& set)
{
    std::stringstream ss;
    for (auto const& item : set)
    {
        try
        {
            SerialIter sit(item.slice());
            auto const tx = std::make_shared<
                STTx const>(sit);
            ss << debugTxstr(tx) << ", ";
        }
        catch(std::exception const&)
        {
            ss << "THRO, ";
        }
    }
    return ss.str();
}
开发者ID:Empresaria,项目名称:rippled,代码行数:20,代码来源:OpenLedger.cpp


示例18: iflags

 inline
 std::basic_istream<CharT, Traits>&
 operator>>(std::basic_istream<CharT, Traits>& is, ptime& pt)
 {
   boost::io::ios_flags_saver iflags(is);
   typename std::basic_istream<CharT, Traits>::sentry strm_sentry(is, false); 
   if (strm_sentry) {
     try {
       typedef typename date_time::time_input_facet<ptime, CharT> time_input_facet;
       
       std::istreambuf_iterator<CharT,Traits> sit(is), str_end;
       if(std::has_facet<time_input_facet>(is.getloc())) {
         std::use_facet<time_input_facet>(is.getloc()).get(sit, str_end, is, pt);
       }
       else {
         time_input_facet* f = new time_input_facet();
         std::locale l = std::locale(is.getloc(), f);
         is.imbue(l);
         f->get(sit, str_end, is, pt);
       }
     }
     catch(...) { 
       // mask tells us what exceptions are turned on
       std::ios_base::iostate exception_mask = is.exceptions();
       // if the user wants exceptions on failbit, we'll rethrow our 
       // date_time exception & set the failbit
       if(std::ios_base::failbit & exception_mask) {
         try { is.setstate(std::ios_base::failbit); } 
         catch(std::ios_base::failure&) {} // ignore this one
         throw; // rethrow original exception
       }
       else {
         // if the user want's to fail quietly, we simply set the failbit
         is.setstate(std::ios_base::failbit); 
       } 
           
     }
   }
   return is;
 }
开发者ID:CRF,项目名称:passenger,代码行数:40,代码来源:posix_time_io.hpp


示例19: TR_ASSERT

void
OMR::SymbolReference::setAliasedTo(TR_BitVector &bv, TR::SymbolReferenceTable *symRefTab, bool symmetric)
   {
   TR::Compilation *comp = symRefTab->comp();

   TR_ASSERT(_useDefAliases, "this symref doesn't have its own aliasing bitvector");
   if (!symmetric)
      {
      *_useDefAliases |= bv;
      }
   else
      {
      // we must process one by one to ensure symmetric aliasing
      TR_SymRefIterator sit(bv, symRefTab);
      for (TR::SymbolReference *symRef = sit.getNext();
            symRef;
            symRef = sit.getNext())
         {
         self()->setAliasedTo(symRef, true);
         }
      }
   }
开发者ID:LinHu2016,项目名称:omr,代码行数:22,代码来源:Aliases.cpp


示例20: deserializeTxPlusMeta

std::pair<std::shared_ptr<
    STTx const>, std::shared_ptr<
        STObject const>>
deserializeTxPlusMeta (SHAMapItem const& item)
{
    std::pair<std::shared_ptr<
        STTx const>, std::shared_ptr<
            STObject const>> result;
    SerialIter sit(item.slice());
    {
        SerialIter s(sit.getSlice(
            sit.getVLDataLength()));
        result.first = std::make_shared<
            STTx const>(s);
    }
    {
        SerialIter s(sit.getSlice(
            sit.getVLDataLength()));
        result.second = std::make_shared<
            STObject const>(s, sfMetadata);
    }
    return result;
}
开发者ID:onedot618,项目名称:rippled,代码行数:23,代码来源:Ledger.cpp



注:本文中的sit函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ size函数代码示例发布时间:2022-05-30
下一篇:
C++ sirdev_set_dtr_rts函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap