本文整理汇总了C++中I_D函数的典型用法代码示例。如果您正苦于以下问题:C++ I_D函数的具体用法?C++ I_D怎么用?C++ I_D使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了I_D函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: interval_set_intersects_4_bicremental_types
void interval_set_intersects_4_bicremental_types()
{
typedef IntervalSet<T> IntervalSetT;
typedef typename IntervalSetT::interval_type IntervalT;
typedef typename IntervalSetT::key_type KeyT;
IntervalT between = I_D(3,5);
IntervalSetT set_a;
set_a.add(C_D(1,3)).add(I_I(6,11));
// (1 3) [6 11]
BOOST_CHECK( icl::intersects(set_a, MK_v(2)) );
BOOST_CHECK( icl::intersects(set_a, MK_v(11)) );
BOOST_CHECK( icl::disjoint(set_a, MK_v(3)) );
BOOST_CHECK( icl::disjoint(set_a, MK_v(5)) );
BOOST_CHECK( icl::intersects(set_a, C_D(1,3)) );
BOOST_CHECK( icl::intersects(set_a, I_D(8,10)) );
BOOST_CHECK( icl::disjoint(set_a, between) );
BOOST_CHECK( icl::disjoint(set_a, I_I(0,1)) );
IntervalSetT to_12 = IntervalSetT(I_D(0, 13));
IntervalSetT complement_a = to_12 - set_a;
BOOST_CHECK( icl::disjoint(set_a, complement_a) );
BOOST_CHECK( icl::intersects(to_12, set_a) );
BOOST_CHECK_EQUAL( icl::lower(set_a), icl::lower(*(set_a.begin())) );
BOOST_CHECK_EQUAL( icl::lower(set_a), MK_v(1) );
BOOST_CHECK_EQUAL( icl::upper(set_a), icl::upper(*(set_a.rbegin())) );
BOOST_CHECK_EQUAL( icl::upper(set_a), MK_v(11) );
}
开发者ID:0xDEC0DE8,项目名称:mcsema,代码行数:31,代码来源:test_interval_set_shared.hpp
示例2: interval_set_check_abelian_monoid_et_4_bicremental_types
void interval_set_check_abelian_monoid_et_4_bicremental_types()
{
typedef IntervalSet<T> IntervalSetT;
IntervalSetT set_a, set_b, set_c;
set_a.add(I_D(3,6)).add(I_I(5,7));
set_b.add(C_D(1,3)).add(I_D(8,9));
set_c.add(I_D(0,9)).add(I_I(3,6)).add(I_D(5,7));
typename IntervalSetT::segment_type segm = I_D(6,9);
T elem = make<T>(5);
CHECK_ABELIAN_MONOID_INSTANCE_WRT(et) (set_a, set_b, set_c, segm, elem);
CHECK_ABELIAN_MONOID_INSTANCE_WRT(caret)(set_a, set_b, set_c, segm, elem);
}
开发者ID:0xDEC0DE8,项目名称:mcsema,代码行数:15,代码来源:test_interval_set_laws_shared.hpp
示例3: interval_set_infix_plus_overload_4_bicremental_types
void interval_set_infix_plus_overload_4_bicremental_types()
{
typedef IntervalSet<T> IntervalSetT;
typedef typename IntervalSetT::interval_type IntervalT;
IntervalT itv = I_D(3,5);
IntervalSetT set_a, set_b;
set_a.add(C_D(1,3)).add(I_D(8,9)).add(I_I(6,11));
set_b.add(I_D(0,9)).add(I_I(3,6)).add(I_D(5,7));
BOOST_CHECK_EQUAL(set_a + set_b, set_b + set_a);
// This checks all cases of is_interval_set_derivative<T>
BOOST_CHECK_EQUAL(set_a + itv, itv + set_a);
BOOST_CHECK_EQUAL(set_b + MK_v(4), MK_v(4) + set_b);
}
开发者ID:0xDEC0DE8,项目名称:mcsema,代码行数:15,代码来源:test_interval_set_shared.hpp
示例4: interval_set_check_abelian_monoid_plus_4_bicremental_types
void interval_set_check_abelian_monoid_plus_4_bicremental_types()
{
typedef IntervalSet<T> IntervalSetT;
IntervalSetT set_a, set_b, set_c;
set_a.add(I_D(3,6)).add(I_I(5,7));
set_b.add(C_D(1,3)).add(I_D(8,9));
set_c.add(I_D(0,9)).add(I_I(3,6)).add(I_D(5,7));
typename IntervalSetT::segment_type inter_val1 = I_D(6,9);
typename IntervalSetT::segment_type inter_val2 = I_I(5,5);
CHECK_ABELIAN_MONOID_INSTANCE_WRT(plus) (set_a, set_b, set_c, inter_val1, inter_val2);
CHECK_ABELIAN_MONOID_INSTANCE_WRT(pipe) (set_a, set_b, set_c, inter_val1, inter_val2);
}
开发者ID:somaproject,项目名称:streams,代码行数:15,代码来源:test_set_interval_set_shared.hpp
示例5: interval_set_check_abelian_group_plus_4_bicremental_types
void interval_set_check_abelian_group_plus_4_bicremental_types()
{
typedef IntervalSet<T> IntervalSetT;
IntervalSetT set_a, set_b, set_c;
set_a.add(I_D(3,6)).add(I_I(5,7));
set_b.add(C_D(1,3)).add(I_D(8,9));
set_c.add(I_D(0,9)).add(I_I(3,6)).add(I_D(5,7));
typename IntervalSetT::segment_type segm = I_D(6,9);
T elem = make<T>(5);
CHECK_ABELIAN_GROUP_INSTANCE_WRT(plus) (set_a, set_b, set_c, segm, elem);
CHECK_ABELIAN_GROUP_INSTANCE_WRT(pipe) (set_a, set_b, set_c, segm, elem);
}
开发者ID:0xDEC0DE8,项目名称:mcsema,代码行数:15,代码来源:test_interval_set_laws_shared.hpp
示例6: interval_set_check_partial_invertive_monoid_plus_4_bicremental_types
void interval_set_check_partial_invertive_monoid_plus_4_bicremental_types()
{
typedef IntervalSet<T> IntervalSetT;
IntervalSetT set_a, set_b, set_c;
set_a.add(I_D(3,6)).add(I_I(5,7));
set_b.add(C_D(1,3)).add(I_D(8,9));
set_c.add(I_D(0,9)).add(I_I(3,6)).add(I_D(5,7));
typename IntervalSetT::segment_type segm = I_D(6,9);
T elem = make<T>(5);
CHECK_PARTIAL_INVERTIVE_MONOID_INSTANCE_WRT(plus) (set_a, set_b, set_c, segm, elem);
CHECK_PARTIAL_INVERTIVE_MONOID_INSTANCE_WRT(pipe) (set_a, set_b, set_c, segm, elem);
}
开发者ID:0xDEC0DE8,项目名称:mcsema,代码行数:15,代码来源:test_interval_set_laws_shared.hpp
示例7: I_D
QStringList OneSixInstance::processMinecraftArgs( QString user, QString session )
{
I_D(OneSixInstance);
auto version = d->version;
QString args_pattern = version->minecraftArguments;
QMap<QString, QString> token_mapping;
token_mapping["auth_username"] = user;
token_mapping["auth_session"] = session;
//FIXME: user and player name are DIFFERENT!
token_mapping["auth_player_name"] = user;
//FIXME: WTF is this. I just plugged in a random UUID here.
token_mapping["auth_uuid"] = "7d4bacf0-fd62-11e2-b778-0800200c9a66"; // obviously fake.
// this is for offline:
/*
map["auth_player_name"] = "Player";
map["auth_player_name"] = "00000000-0000-0000-0000-000000000000";
*/
token_mapping["profile_name"] = name();
token_mapping["version_name"] = version->id;
QString absRootDir = QDir(minecraftRoot()).absolutePath();
token_mapping["game_directory"] = absRootDir;
QString absAssetsDir = QDir("assets/").absolutePath();
token_mapping["game_assets"] = absAssetsDir;
QStringList parts = args_pattern.split(' ',QString::SkipEmptyParts);
for (int i = 0; i < parts.length(); i++)
{
parts[i] = replaceTokensIn(parts[i], token_mapping);
}
return parts;
}
开发者ID:Apocalypsing,项目名称:MultiMC5,代码行数:35,代码来源:OneSixInstance.cpp
示例8: interval_bitset_find_4_integral_types
void interval_bitset_find_4_integral_types()
{
typedef IntervalSet<T> IntervalSetT;
typedef typename IntervalSetT::interval_type IntervalT;
typedef typename IntervalSetT::bitset_type BitsT;
IntervalT itv = I_D(3,5);
IntervalSetT set_a;
set_a.add(C_D(1,3)).add(I_I(6,11));
typename IntervalSetT::const_iterator found = set_a.find(MK_v(6));
BOOST_CHECK( (found->second).contains(6) );
found = set_a.find(MK_v(5));
BOOST_CHECK( found == set_a.end() );
set_a.add(MK_v(64));
found = set_a.find(MK_v(64));
BOOST_CHECK( (found->second).contains(0) );
set_a.add(MK_v(65));
found = set_a.find(MK_v(65));
BOOST_CHECK( (found->second).contains(1) );
found = set_a.find(MK_v(66));
BOOST_CHECK( found == set_a.end() );
}
开发者ID:0xDEC0DE8,项目名称:mcsema,代码行数:29,代码来源:test_interval_set_shared.hpp
示例9: I_D
void BaseInstance::setCustomBaseJar(QString val)
{
I_D(BaseInstance);
if (val.isNull() || val.isEmpty() || val == defaultCustomBaseJar())
d->m_settings->reset("CustomBaseJar");
else
d->m_settings->set("CustomBaseJar", val);
}
开发者ID:brainiac744,项目名称:MultiMC5,代码行数:8,代码来源:BaseInstance.cpp
示例10: BaseInstance
OneSixInstance::OneSixInstance ( const QString& rootDir, SettingsObject* setting_obj, QObject* parent )
: BaseInstance ( new OneSixInstancePrivate(), rootDir, setting_obj, parent )
{
I_D(OneSixInstance);
d->m_settings->registerSetting(new Setting("IntendedVersion", ""));
d->m_settings->registerSetting(new Setting("ShouldUpdate", false));
reloadFullVersion();
}
开发者ID:Apocalypsing,项目名称:MultiMC5,代码行数:8,代码来源:OneSixInstance.cpp
示例11: interval_set_mixed_infix_caret_overload_4_bicremental_types
template <class T> void interval_set_mixed_infix_caret_overload_4_bicremental_types()
{
typedef interval_set<T> IntervalSetT;
typedef typename IntervalSetT::interval_type IntervalT;
interval_set<T> join_a;
separate_interval_set<T> sep_a;
split_interval_set<T> split_a;
join_a.add(I_D(0,4)) .add(I_I(4,6)).add(I_D(5,9));
sep_a .add(I_D(0,4)) .add(I_I(4,6)).add(I_D(5,11));
split_a.add(I_I(0,0)).add(I_D(8,7)).add(I_I(6,11));
BOOST_CHECK_EQUAL(split_a ^ sep_a, sep_a ^ split_a );
BOOST_CHECK_EQUAL(split_a ^ join_a, join_a ^ split_a);
BOOST_CHECK_EQUAL(sep_a ^ join_a, join_a ^ sep_a );
}
开发者ID:LancelotGHX,项目名称:Simula,代码行数:17,代码来源:test_interval_set_mixed.hpp
示例12: QObject
BaseInstance::BaseInstance( BaseInstancePrivate* d_in,
const QString& rootDir,
SettingsObject* settings_obj,
QObject* parent
)
:inst_d(d_in), QObject(parent)
{
I_D(BaseInstance);
d->m_settings = settings_obj;
d->m_rootDir = rootDir;
settings().registerSetting(new Setting("name", "Unnamed Instance"));
settings().registerSetting(new Setting("iconKey", "default"));
settings().registerSetting(new Setting("notes", ""));
settings().registerSetting(new Setting("lastLaunchTime", 0));
/*
* custom base jar has no default. it is determined in code... see the accessor methods for it
*
* for instances that DO NOT have the CustomBaseJar setting (legacy instances),
* [.]minecraft/bin/mcbackup.jar is the default base jar
*/
settings().registerSetting(new Setting("UseCustomBaseJar", true));
settings().registerSetting(new Setting("CustomBaseJar", ""));
auto globalSettings = MMC->settings();
// Java Settings
settings().registerSetting(new Setting("OverrideJava", false));
settings().registerSetting(new OverrideSetting("JavaPath", globalSettings->getSetting("JavaPath")));
settings().registerSetting(new OverrideSetting("JvmArgs", globalSettings->getSetting("JvmArgs")));
// Custom Commands
settings().registerSetting(new Setting("OverrideCommands", false));
settings().registerSetting(new OverrideSetting("PreLaunchCommand", globalSettings->getSetting("PreLaunchCommand")));
settings().registerSetting(new OverrideSetting("PostExitCommand", globalSettings->getSetting("PostExitCommand")));
// Window Size
settings().registerSetting(new Setting("OverrideWindow", false));
settings().registerSetting(new OverrideSetting("LaunchMaximized", globalSettings->getSetting("LaunchMaximized")));
settings().registerSetting(new OverrideSetting("MinecraftWinWidth", globalSettings->getSetting("MinecraftWinWidth")));
settings().registerSetting(new OverrideSetting("MinecraftWinHeight", globalSettings->getSetting("MinecraftWinHeight")));
// Memory
settings().registerSetting(new Setting("OverrideMemory", false));
settings().registerSetting(new OverrideSetting("MinMemAlloc", globalSettings->getSetting("MinMemAlloc")));
settings().registerSetting(new OverrideSetting("MaxMemAlloc", globalSettings->getSetting("MaxMemAlloc")));
settings().registerSetting(new OverrideSetting("PermGen", globalSettings->getSetting("PermGen")));
// Auto login
settings().registerSetting(new Setting("OverrideLogin", false));
settings().registerSetting(new OverrideSetting("AutoLogin", globalSettings->getSetting("AutoLogin")));
// Console
settings().registerSetting(new Setting("OverrideConsole", false));
settings().registerSetting(new OverrideSetting("ShowConsole", globalSettings->getSetting("ShowConsole")));
settings().registerSetting(new OverrideSetting("AutoCloseConsole", globalSettings->getSetting("AutoCloseConsole")));
}
开发者ID:Loras,项目名称:MultiMC5,代码行数:58,代码来源:BaseInstance.cpp
示例13: interval_set_mixed_contains_4_bicremental_types
void interval_set_mixed_contains_4_bicremental_types()
{
typedef interval_set<T> IntervalSetT;
typedef typename IntervalSetT::interval_type IntervalT;
split_interval_set<T> split_set;
split_set.add(I_D(0,4)).add(I_D(4,8));
BOOST_CHECK_EQUAL( icl::contains(split_set, MK_v(4)), true );
BOOST_CHECK_EQUAL( icl::contains(split_set, C_D(2,5)), true );
interval_set<T> join_set_gap4(split_set.erase(MK_v(4)));
BOOST_CHECK_EQUAL( icl::contains(join_set_gap4, MK_v(4)), false );
BOOST_CHECK_EQUAL( icl::contains(join_set_gap4, C_D(2,5)), false );
BOOST_CHECK_EQUAL( icl::contains(split_set, split_set), true );
BOOST_CHECK_EQUAL( icl::contains(split_set, join_set_gap4), true );
}
开发者ID:LancelotGHX,项目名称:Simula,代码行数:18,代码来源:test_interval_set_mixed.hpp
示例14: QObject
BaseInstance::BaseInstance(BaseInstancePrivate *d_in, const QString &rootDir,
SettingsObject *settings_obj, QObject *parent)
: QObject(parent), inst_d(d_in)
{
I_D(BaseInstance);
d->m_settings = std::shared_ptr<SettingsObject>(settings_obj);
d->m_rootDir = rootDir;
settings().registerSetting("name", "Unnamed Instance");
settings().registerSetting("iconKey", "default");
connect(MMC->icons().get(), SIGNAL(iconUpdated(QString)), SLOT(iconUpdated(QString)));
settings().registerSetting("notes", "");
settings().registerSetting("lastLaunchTime", 0);
/*
* custom base jar has no default. it is determined in code... see the accessor methods for
*it
*
* for instances that DO NOT have the CustomBaseJar setting (legacy instances),
* [.]minecraft/bin/mcbackup.jar is the default base jar
*/
settings().registerSetting("UseCustomBaseJar", true);
settings().registerSetting("CustomBaseJar", "");
auto globalSettings = MMC->settings();
// Java Settings
settings().registerSetting("OverrideJava", false);
settings().registerSetting("OverrideJavaLocation", false);
settings().registerSetting("OverrideJavaArgs", false);
settings().registerOverride(globalSettings->getSetting("JavaPath"));
settings().registerOverride(globalSettings->getSetting("JvmArgs"));
// Custom Commands
settings().registerSetting({"OverrideCommands","OverrideLaunchCmd"}, false);
settings().registerOverride(globalSettings->getSetting("PreLaunchCommand"));
settings().registerOverride(globalSettings->getSetting("PostExitCommand"));
// Window Size
settings().registerSetting("OverrideWindow", false);
settings().registerOverride(globalSettings->getSetting("LaunchMaximized"));
settings().registerOverride(globalSettings->getSetting("MinecraftWinWidth"));
settings().registerOverride(globalSettings->getSetting("MinecraftWinHeight"));
// Memory
settings().registerSetting("OverrideMemory", false);
settings().registerOverride(globalSettings->getSetting("MinMemAlloc"));
settings().registerOverride(globalSettings->getSetting("MaxMemAlloc"));
settings().registerOverride(globalSettings->getSetting("PermGen"));
// Console
settings().registerSetting("OverrideConsole", false);
settings().registerOverride(globalSettings->getSetting("ShowConsole"));
settings().registerOverride(globalSettings->getSetting("AutoCloseConsole"));
settings().registerOverride(globalSettings->getSetting("LogPrePostOutput"));
}
开发者ID:Glought,项目名称:MultiMC5,代码行数:56,代码来源:BaseInstance.cpp
示例15: I_D
void BaseInstance::setFlags(const QSet<InstanceFlag> &flags)
{
I_D(BaseInstance);
if (flags != d->m_flags)
{
d->m_flags = flags;
emit flagsChanged();
emit propertiesChanged(this);
}
}
开发者ID:Nightreaver,项目名称:MultiMC5,代码行数:10,代码来源:BaseInstance.cpp
示例16: I_D
std::shared_ptr<ModList> OneSixInstance::resourcePackList()
{
I_D(OneSixInstance);
if (!d->resource_pack_list)
{
d->resource_pack_list.reset(new ModList(resourcePacksDir()));
}
d->resource_pack_list->update();
return d->resource_pack_list;
}
开发者ID:Loras,项目名称:MultiMC5,代码行数:10,代码来源:OneSixInstance.cpp
示例17: I_D
std::shared_ptr<ModList> LegacyInstance::coreModList()
{
I_D(LegacyInstance);
if (!d->core_mod_list)
{
d->core_mod_list.reset(new ModList(coreModsDir()));
}
d->core_mod_list->update();
return d->core_mod_list;
}
开发者ID:Mattia98,项目名称:MultiMC5,代码行数:10,代码来源:LegacyInstance.cpp
示例18: discrete_dynamic_interval_bounds_4_bicremental_types
void discrete_dynamic_interval_bounds_4_bicremental_types()
{
typedef typename icl::interval<T>::type IntervalT;
BOOST_CHECK( icl::bounds(I_I(2,4)) == interval_bounds::closed() );
BOOST_CHECK( icl::bounds(I_D(2,5)) == interval_bounds::right_open() );
BOOST_CHECK( icl::bounds(C_I(1,4)) == interval_bounds::left_open() );
BOOST_CHECK( icl::bounds(C_D(1,5)) == interval_bounds::open() );
}
开发者ID:OggYiu,项目名称:rag-engine,代码行数:10,代码来源:test_icl_dynamic_interval.hpp
示例19: interval_set_check_abelian_group_plus_prot_inv_4_bicremental_types
void interval_set_check_abelian_group_plus_prot_inv_4_bicremental_types()
{
typedef IntervalSet<T> IntervalSetT;
IntervalSetT set_a, set_b, set_c;
set_a.add(I_D(3,6)).add(I_I(5,7));
set_b.add(C_D(1,3)).add(I_D(8,9));
set_c.add(I_D(0,9)).add(I_I(3,6)).add(I_D(5,7));
typename IntervalSetT::segment_type segm = I_D(6,9);
T elem = make<T>(5);
CHECK_ABELIAN_MONOID_INSTANCE_WRT(plus) (set_a, set_b, set_c, segm, elem);
CHECK_ABELIAN_MONOID_INSTANCE_WRT(pipe) (set_a, set_b, set_c, segm, elem);
#if !defined(_MSC_VER) || (_MSC_VER >= 1400) // 1310==MSVC-7.1 1400 ==MSVC-8.0
CHECK_ABELIAN_GROUP_INSTANCE_WRT_EQUAL(plus) (is_distinct_equal, set_a, set_b, set_c, segm, elem);
CHECK_ABELIAN_GROUP_INSTANCE_WRT_EQUAL(pipe) (is_distinct_equal, set_a, set_b, set_c, segm, elem);
#endif
}
开发者ID:0xDEC0DE8,项目名称:mcsema,代码行数:20,代码来源:test_interval_set_laws_shared.hpp
示例20: interval_set_mixed_infix_minus_overload_4_bicremental_types
void interval_set_mixed_infix_minus_overload_4_bicremental_types()
{
typedef interval_set<T> IntervalSetT;
typedef typename IntervalSetT::interval_type IntervalT;
interval_set<T> join_a, join_b;
separate_interval_set<T> sep_a, sep_b;
split_interval_set<T> split_a, split_b;
join_a.add(I_D(0,4)) .add(I_I(4,6)).add(I_D(5,9));
sep_a .add(I_D(0,4)) .add(I_I(4,6)).add(I_D(5,11));
split_a.add(I_I(0,0)).add(I_D(8,7)).add(I_I(6,11));
BOOST_CHECK_EQUAL(split_a - sep_a, (split_b = split_a) -= sep_a );
BOOST_CHECK_EQUAL(split_a - join_a, (split_b = split_a) -= join_a );
BOOST_CHECK_EQUAL(sep_a - join_a, (sep_b = sep_a) -= join_a );
BOOST_CHECK_EQUAL(sep_a - split_a, (sep_b = sep_a) -= split_a);
BOOST_CHECK_EQUAL(join_a - split_a, (join_b = join_a) -= split_a);
BOOST_CHECK_EQUAL(join_a - sep_a, (join_b = join_a) -= sep_a );
}
开发者ID:LancelotGHX,项目名称:Simula,代码行数:21,代码来源:test_interval_set_mixed.hpp
注:本文中的I_D函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论