本文整理汇总了C++中storage_t类的典型用法代码示例。如果您正苦于以下问题:C++ storage_t类的具体用法?C++ storage_t怎么用?C++ storage_t使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了storage_t类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: restore
void cScrollbar::restore(storage_t to) {
cControl::restore(to);
if(to.find("scroll-pos") != to.end())
pos = boost::any_cast<int>(to["scroll-pos"]);
if(to.find("scroll-max") != to.end())
pos = boost::any_cast<int>(to["scroll-max"]);
else pos = 0;
}
开发者ID:calref,项目名称:cboe,代码行数:8,代码来源:scrollbar.cpp
示例2: restore
void cScrollPane::restore(storage_t to) {
// We don't call the superclass restore() here like the other controls do
if(to.find("") != to.end())
scroll.restore(boost::any_cast<storage_t>(to[""]));
for(auto& ctrl : contents) {
if(to.find(ctrl.first) != to.end())
ctrl.second->restore(boost::any_cast<storage_t>(to[ctrl.first]));
}
}
开发者ID:calref,项目名称:cboe,代码行数:9,代码来源:scrollpane.cpp
示例3: restore
void cTextField::restore(storage_t to) {
cControl::restore(to);
if(to.find("fld-ip") != to.end())
insertionPoint = boost::any_cast<int>(to["fld-ip"]);
else insertionPoint = getText().length();
if(to.find("fld-sp") != to.end())
selectionPoint = boost::any_cast<int>(to["fld-sp"]);
else selectionPoint = 0;
}
开发者ID:calref,项目名称:cboe,代码行数:9,代码来源:field.cpp
示例4: sorted_dumper
// klen: key field length in bits in hash (i.e before rounding up to bytes)
// vlen: value field length in bits
sorted_dumper(uint_t _threads, const char *_file_prefix, size_t _buffer_size,
uint_t _vlen, storage_t *_ary) :
threads(_threads), file_prefix(_file_prefix), buffer_size(_buffer_size),
klen(_ary->get_key_len()), vlen(_vlen), ary(_ary), file_index(0),
tr(), lower_count(0), upper_count(std::numeric_limits<uint64_t>::max()),
one_file(false)
{
key_len = bits_to_bytes(klen);
val_len = bits_to_bytes(vlen);
record_len = key_len + val_len;
nb_records = ary->floor_block(_buffer_size / record_len, nb_blocks);
while(nb_records < ary->get_max_reprobe_offset()) {
nb_records = ary->floor_block(2 * nb_records, nb_blocks);
}
thread_info = new struct thread_info_t[threads];
for(uint_t i = 0; i < threads; i++) {
// thread_info[i].token = i == 0;
thread_info[i].writer.initialize(nb_records, klen, vlen, ary);
thread_info[i].heap.initialize(ary->get_max_reprobe_offset());
thread_info[i].token = tr.new_token();
}
unique = distinct = total = max_count = 0;
}
开发者ID:Biocacahuete,项目名称:trinityrnaseq,代码行数:26,代码来源:sorted_dumper.hpp
示例5: storage_unlink
int storage_unlink(storage_t storage, const char *path)
{
return storage->unlink(storage->state, path);
}
开发者ID:GiorgioRegni,项目名称:Droplet-backup,代码行数:4,代码来源:storage.c
示例6: storage_store_buffer
int storage_store_buffer(storage_t storage, const char *path, struct buffer *buffer)
{
return storage->store_buffer(storage->state, path, buffer);
}
开发者ID:GiorgioRegni,项目名称:Droplet-backup,代码行数:4,代码来源:storage.c
示例7: restore
void cLedGroup::restore(storage_t to) {
cControl::restore(to);
if(to.find("led-select") != to.end())
setSelected(boost::any_cast<std::string>(to["led-select"]));
else setSelected("");
}
开发者ID:LibreGames,项目名称:cboe,代码行数:6,代码来源:button.cpp
示例8: storage_store_file
int storage_store_file(storage_t storage, const char *path, FILE *file)
{
return storage->store_file(storage->state, path, file);
}
开发者ID:GiorgioRegni,项目名称:Droplet-backup,代码行数:4,代码来源:storage.c
示例9: clear
void clear()
{
if ( has_value )
{
contained.destruct_value();
contained.construct_error( std::exception_ptr() );
}
has_value = false;
}
开发者ID:ajvengo,项目名称:spike-expected,代码行数:9,代码来源:expected_lite.hpp
示例10: clear
void clear()
{
if ( has_value )
{
contained.destruct_value();
contained.construct_error( error_type() );
}
has_value = false;
}
开发者ID:martinmoene,项目名称:spike-expected,代码行数:9,代码来源:expected_lite.hpp
示例11: swap
void swap( expected & rhs )
{
using std::swap;
if ( has_value == true && rhs.has_value == true ) { swap( contained.value(), rhs.contained.value() ); }
else if ( has_value == false && rhs.has_value == false ) { swap( contained.error(), rhs.contained.error() ); }
else if ( has_value == false && rhs.has_value == true ) { rhs.swap( *this ); }
else if ( has_value == true && rhs.has_value == false ) { error_type t = rhs.contained.error();
rhs.contained.destruct_error();
rhs.contained.construct_value( contained.value() );
contained.construct_error( t );
swap( has_value, rhs.has_value );
}
}
开发者ID:ajvengo,项目名称:spike-expected,代码行数:14,代码来源:expected_lite.hpp
示例12:
al_graph(std::initializer_list<nodeid_t> const& list)
: has_mark(false)
{
std::for_each(list.begin(), list.end(),
[&](nodeid_t id) {
_data.insert({id, node_t{id}});
});
}
开发者ID:crosetto,项目名称:examples_cpp,代码行数:8,代码来源:graph.hpp
示例13: begin
iterator begin() {
return _data.begin();
}
开发者ID:crosetto,项目名称:examples_cpp,代码行数:3,代码来源:graph.hpp
示例14: initialize_value
void initialize_value( V const & v )
{
assert( ! has_value );
contained.construct_value( v );
has_value = true;
}
开发者ID:ajvengo,项目名称:spike-expected,代码行数:6,代码来源:expected_lite.hpp
示例15: expected
expected()
: has_value( false )
{
contained.construct_error( error_type() );
}
开发者ID:martinmoene,项目名称:spike-expected,代码行数:5,代码来源:expected_lite.hpp
示例16: error
error_type const & error() const
{
return has_value ? (throw nonstd::bad_expected_access("expected: no contained error"), contained.error() ) : contained.error();
}
开发者ID:ajvengo,项目名称:spike-expected,代码行数:4,代码来源:expected_lite.hpp
示例17: expected
expected()
: has_value( false )
{
contained.construct_error( std::exception_ptr() );
}
开发者ID:ajvengo,项目名称:spike-expected,代码行数:5,代码来源:expected_lite.hpp
示例18: value
value_type & value()
{
return has_value ? contained.value() : ( std::rethrow_exception( contained.error() ), contained.value() );
}
开发者ID:ajvengo,项目名称:spike-expected,代码行数:4,代码来源:expected_lite.hpp
示例19: cend
const_iterator cend() const {
return _data.cend();
}
开发者ID:crosetto,项目名称:examples_cpp,代码行数:3,代码来源:graph.hpp
示例20: end
iterator end() {
return _data.end();
}
开发者ID:crosetto,项目名称:examples_cpp,代码行数:3,代码来源:graph.hpp
注:本文中的storage_t类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论