当前位置: 首页>>代码示例>>C++>>正文


C++ Sink类代码示例

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


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

示例1: qCreateSink

unsigned qCreateSink(void)
{
	Sink *sink = new Sink();
	if (!sink) {
		qLog() << "qCreateSink(): failed to instantiate new sink" << flush;
		return 0;
	}
	g_Ticker.addTickee(sink->ptr());
	return sink->key();
}
开发者ID:JupiterSmalltalk,项目名称:openqwaq,代码行数:10,代码来源:qAudioPluginGlue.cpp

示例2: write

void Dict::write(Sink &sink) const {
  sink.beginDict(isSimple());

  for (const_iterator it = begin(); it != end(); it++) {
    if (!it->second->canWrite(sink)) continue;
    sink.beginInsert(it->first);
    it->second->write(sink);
  }

  sink.endDict();
}
开发者ID:kbernhagen,项目名称:cbang,代码行数:11,代码来源:Dict.cpp

示例3: _UnixDo

void _UnixDo(Source & so,Sink & si) {
  stringGB s;
  so >> s;
  so.shouldBeEnd();
  si.noOutput();
  system(s.value().chars());
};
开发者ID:lolmid,项目名称:2015-2016,代码行数:7,代码来源:General.cpp

示例4: _SetWreathOrder

void _SetWreathOrder(Source & so,Sink & si) {
  stringGB name;
  list<stringGB> L;
  so >> name;
  GBInputSpecial(L,so);
  T * p = Name2Instance<AdmissibleOrder>::s_find(name);
  if(!p) {
    vector<vector<Variable> > VARS;
    vector<AdmissibleOrder *> ORDS;
    typedef list<stringGB>::const_iterator LI;
    LI w = L.begin(), e = L.end();
    AdmissibleOrder * q;
    while(w!=e) {
      q = Name2Instance<AdmissibleOrder>::s_find((*w).value());
      ORDS.push_back(q);
      ++w;
    };
    DBG();
    p = new WreathOrder(VARS,ORDS);
    Name2Instance<AdmissibleOrder>::s_add(name,p);
  };
  GBInput(*p,so);
  so.shouldBeEnd();
  si.noOutput();
};
开发者ID:lolmid,项目名称:2015-2016,代码行数:25,代码来源:p20aux.c

示例5: copy_impl

std::streamsize copy_impl( Source& src, Sink& snk, 
                           std::streamsize buffer_size,
                           mpl::false_, mpl::true_ )
{
    typedef typename char_type_of<Source>::type  char_type;
    typedef std::pair<char_type*, char_type*>    pair_type;
    detail::basic_buffer<char_type>  buf(buffer_size);
    pair_type                        p = snk.output_sequence();
    std::streamsize                  total = 0;
    std::ptrdiff_t                   capacity = p.second - p.first;
    while (true) {
        std::streamsize amt = 
            iostreams::read(
                src, 
                buf.data(),
                buffer_size < capacity - total ?
                    buffer_size :
                    static_cast<std::streamsize>(capacity - total)
            );
        if (amt == -1)
            break;
        std::copy(buf.data(), buf.data() + amt, p.first + total);
        total += amt;
    }
    return total;
}
开发者ID:8573,项目名称:anura,代码行数:26,代码来源:copy.hpp

示例6: _GroebnerCutOffSum

void _GroebnerCutOffSum(Source & so,Sink & si) {
  int n;
  so >> n;
  so.shouldBeEnd();
  si.noOutput();
  run->setSumNumberCutOff(n);
};
开发者ID:mcdeoliveira,项目名称:NC,代码行数:7,代码来源:p7aux.cpp

示例7: _GroebnerCutOffFlag

void _GroebnerCutOffFlag(Source & so,Sink & si) {
  int n;
  so >> n;
  so.shouldBeEnd();
  run->setCutOffFlag(n!=0);
  si.noOutput();
};
开发者ID:mcdeoliveira,项目名称:NC,代码行数:7,代码来源:p7aux.cpp

示例8: Dump_

void CollectionLinkHeaderItem::Dump_(Sink& sink) const
{
    Header hdr{};
    hdr.offset = ToFilePos(data->ptr);
    hdr.count = data->ptr.As0<CollectionLinkItem>().entries.size();
    sink.WriteGen(hdr);
}
开发者ID:u3shit,项目名称:neptools,代码行数:7,代码来源:collection_link.cpp

示例9: add_slot

		void add_slot(Sink& aSink, SinkFunction aSinkFunction)
		{
			typename LockingPolicy::scope_lock sl(*this);
			if (slots().find(&aSink) != slots().end())
				throw slot_already_added();
			detail::do_bind<ParameterCount>()(aSink, aSinkFunction, slots()[&aSink]);
			aSink.signal_created(*this);
		}
开发者ID:AndreasMartin72,项目名称:neolib,代码行数:8,代码来源:signal.hpp

示例10: main

int main(void)
{
   File *aviFile = new File();
   Demux *aviDemux = new Demux();
   Codec *h264 = new Codec();
   Sink *imageSink = new Sink();

   Component *com = new Component();

   aviDemux->setProcessComponent(aviFile);
   h264->setProcessComponent(aviDemux);
   com->setProcessComponent(h264);
   imageSink->setProcessComponent(com);
   imageSink->dataProcess(NULL, NULL);

   return 0;
}
开发者ID:llliang11,项目名称:Designpattern,代码行数:17,代码来源:Main.cpp

示例11: sink

void OutputVisitor::s_put(const tRational<LINTEGER> & x,Sink & si) {
   if(x.denominator().zero()) {
    si << x.numerator().internal();
  } else {
    Sink sink(si.outputFunction("Divide",2L));
    sink << x.numerator().internal() << x.denominator().internal();
  };    
};
开发者ID:mcdeoliveira,项目名称:NC,代码行数:8,代码来源:OutputVisitor.cpp

示例12: _RunGBAlg

void _RunGBAlg(Source & source,Sink & sink) {
  asStringGB name;
  source >> name;
  source.shouldBeEnd();
  sink.noOutput();
  GBALG_STORAGE::const_iterator w = gbalg_storage.find(name.value());
  if(w==gbalg_storage.end()) DBG();
  (*w).second->perform();
};
开发者ID:mcdeoliveira,项目名称:NC,代码行数:9,代码来源:ProgrammableSymbol.c

示例13: Serialize

  void Serialize(Sink & sink)
  {
    SortPostings();
    BuildDictionary();

    TextIndexHeader header;

    uint64_t const startPos = sink.Pos();
    // Will be filled in later.
    header.Serialize(sink);

    SerializeDictionary(sink, header, startPos);
    SerializePostingsLists(sink, header, startPos);

    uint64_t const finishPos = sink.Pos();
    sink.Seek(startPos);
    header.Serialize(sink);
    sink.Seek(finishPos);
  }
开发者ID:milchakov,项目名称:omim,代码行数:19,代码来源:mem.hpp

示例14: _CppTeXTheFile

void _CppTeXTheFile(Source & so,Sink & si) {
  stringGB format;
  so >> format;
  StringAccumulator x;
  x.add(PlatformSpecific::s_latex_command());
  x.add(format.value().chars());
  so.shouldBeEnd();
  si.noOutput();
  system(x.chars());
};
开发者ID:lolmid,项目名称:2015-2016,代码行数:10,代码来源:ConstructSheets.c

示例15: _ShowTeX

void _ShowTeX(Source & so,Sink & si) {
  stringGB format;
  so >> format;
  StringAccumulator x;
  x.add(PlatformSpecific::s_dvi_viewer());
  x.add(format.value().chars());
  x.add(PlatformSpecific::s_background());
  so.shouldBeEnd();
  si.noOutput();
  system(x.chars());
};
开发者ID:lolmid,项目名称:2015-2016,代码行数:11,代码来源:ConstructSheets.c


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