本文整理汇总了C++中argument_type类的典型用法代码示例。如果您正苦于以下问题:C++ argument_type类的具体用法?C++ argument_type怎么用?C++ argument_type使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了argument_type类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: operator
result_type operator()(const argument_type& volume) const
{
size_t seed = 0;
boost::hash_combine(seed, std::hash<std::string>()(volume.driver()));
boost::hash_combine(seed, std::hash<std::string>()(volume.name()));
return seed;
}
示例2: operator
std::size_t operator()(argument_type const& val)
{
return hash<typename argument_type::position_type>()(val.position()) ^
hash<typename argument_type::length_type>()(val.radius()) ^
hash<typename argument_type::position_type>()(val.unit_z()) ^
hash<typename argument_type::length_type>()(val.half_length());
}
示例3: operator
result_type operator()(const argument_type& range) const
{
size_t seed = 0;
boost::hash_combine(seed, range.begin());
boost::hash_combine(seed, range.end());
return seed;
}
示例4: operator
result_type operator()(const argument_type& machineId) const
{
size_t seed = 0;
boost::hash_combine(seed, strings::lower(machineId.hostname()));
boost::hash_combine(seed, machineId.ip());
return seed;
}
示例5: operator
result_type operator() (argument_type line)
{
if( !m_parsing )
{
std::string::size_type start = line.find("$(IF ", 0);
std::string::size_type end = line.find(')', start);
std::string symbol = line.substr(start + 5, end - start - 5);
// if the symbol exists in the map, parse normally until we hit $(END)
// if it doesn't exist, skip until we hit $(END)
m_output = symbols.find(symbol) != symbols.end();
m_parsing = true;
}
else
{
// look for $(END)
if( line.find("$(END)") != std::string::npos )
{
// stop parsing
m_parsing = false;
parsers.erase(parsers.end()-1);
return true;
}
symbol_parser::m_should_output = m_output;
return false;
}
return true;
}
示例6: PositionSave
PositionSave::result_type
PositionSave::operator()(argument_type ss) {
// ss = special sprite (actor)
p.insert(
*new std::pair<GameSprite *const, SDL_Rect>(ss, *new SDL_Rect));
p[ss].x = ss->GetX();
p[ss].y = ss->GetY();
} // PositionSave()
示例7: operator
std::size_t operator()(argument_type const& val)
{
return hash<argument_type::position_type>()(val.position()) ^
hash<argument_type::length_type>()(val.radius()) ^
hash<argument_type::D_type>()(val.D()) ^
// hash<argument_type::species_type>()(val.species());
hash<argument_type::species_serial_type>()(val.sid());
}
示例8: operator
std::size_t operator()(argument_type const& val)
{
return hash<typename argument_type::position_type>()(val.position()) ^
hash<typename argument_type::position_type>()(val.unit_x()) ^
hash<typename argument_type::position_type>()(val.unit_y()) ^
hash<typename argument_type::length_type>()(val.half_extent()[0]) ^
hash<typename argument_type::length_type>()(val.half_extent()[1]);
}
示例9: operator
result_type operator()(const argument_type& ip) const
{
size_t seed = 0;
switch (ip.family()) {
case AF_INET:
boost::hash_combine(seed, htonl(ip.in().get().s_addr));
return seed;
default:
UNREACHABLE();
}
}
示例10: operator
result_type operator()(const argument_type& containerId) const
{
size_t seed = 0;
boost::hash_combine(seed, containerId.value());
if (containerId.has_parent()) {
boost::hash_combine(
seed,
std::hash<mesos::ContainerID>()(containerId.parent()));
}
return seed;
}
示例11: operator
void
LocationPointRead::
operator () ( argument_type &t )
{
ostringstream q;
boost::posix_time::ptime refTime;
string validTime;
bool disabled;
int dataversion;
WEBFW_USE_LOGGER( "wdb" );
if( to_.is_special() )
validTime = "NULL";
else
validTime = wciTimeSpec( wciProtocol_,
boost::posix_time::ptime( boost::posix_time::neg_infin), to_ );
for( ParamDefList::const_iterator itPar=paramDefs_.begin();
itPar != paramDefs_.end();
++itPar )
{
if( ! refTimeList_.providerReftimeDisabledAndDataversion(itPar->first,
refTime,
disabled,
dataversion ) ) {
WEBFW_LOG_WARN("No reference times found for provider '" << itPar->first << "'." <<
"Check that the provider is listed in provider_priority.");
continue;
}
if( disabled ) {
WEBFW_LOG_WARN("Provider '" << itPar->first << "' disabled." );
continue;
}
if( dataversion < -1 )
dataversion = -1;
q.str("");
q << "SELECT " << wciReadReturnColoumns( wciProtocol_ ) << " FROM wci.read(" << endl
<< "ARRAY['" << itPar->first << "'], " << endl
<< "'nearest POINT(" << longitude_ << " " << latitude_ << ")', " << endl
<< wciTimeSpec( wciProtocol_, refTime ) << ", " << endl
<< validTime << ", " << endl
<< wciValueParameter( wciProtocol_, itPar->second ) << ", " << endl
<< "NULL, " << endl
<< "ARRAY[" << dataversion << "], NULL::wci.returnfloat ) ORDER BY referencetime";
WEBFW_LOG_DEBUG( "LocationPointRead: transactor: SQL [" << q.str() << "]" );
pqxx::result res = t.exec( q.str() );
//miutil::container::PqContainer container( res );
decodePData( paramDefs_, providers_, refTimeList_, res, false, *locationPointData_, wciProtocol_ );
}
}
示例12: operator
result_type operator()(argument_type pNdasLogicalUnit) const
{
BOOL hidden;
if (SUCCEEDED(pNdasLogicalUnit->get_IsHidden(&hidden)) && hidden)
{
return true;
}
return false;
}
示例13: sIntHasher
hash<ObjectId>::result_type hash<ObjectId>::operator()(argument_type const& id) const {
result_type result;
switch (id.subtype) {
default:
case ObjectIdKind::Null:
return 0;
case ObjectIdKind::Prototype:
return sIntHasher(id.GetPrototypeId());
case ObjectIdKind::Permanent:
result = sHandleHasher(*(uint64_t*)&id.body.guid.Data1);
result ^= sHandleHasher(*(uint64_t*)&id.body.guid.Data4[0]);
return result;
case ObjectIdKind::Positional:
result = sHandleHasher(*(uint64_t*)&id.body.pos.x);
result ^= sHandleHasher(*(uint64_t*)&id.body.pos.tempId);
return result;
case ObjectIdKind::Handle:
return sHandleHasher(id.GetHandle());
case ObjectIdKind::Blocked:
return 0;
}
}
示例14: operator
void operator()( argument_type i_arg ) const {
long i = i_arg.get_value();
if( (i&1)==0 && i+1<N ) {
MinimalArgumentType value;
value.set_value(i+1);
my_while.add( value );
}
for( int j=0; j<n; ++j )
c[i][j] = 0;
for( int k=0; k<n; ++k ) {
Element aik = a[i][k];
for( int j=0; j<n; ++j )
c[i][j] += aik*b[k][j];
}
}
示例15: operator
result_type operator()(const argument_type& resourceProviderId) const
{
size_t seed = 0;
boost::hash_combine(seed, resourceProviderId.value());
return seed;
}