本文整理汇总了C++中set函数的典型用法代码示例。如果您正苦于以下问题:C++ set函数的具体用法?C++ set怎么用?C++ set使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了set函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: set
CVWString& CVWString::operator=( wchar *pStr )
{
set(pStr);
return *this;
}
开发者ID:jacksonpan,项目名称:MAF,代码行数:5,代码来源:CVWString.cpp
示例2: enable_mouse_scroll
void enable_mouse_scroll(bool value)
{
set("mouse_scrolling", value);
}
开发者ID:fluffbeast,项目名称:wesnoth-old,代码行数:4,代码来源:general.cpp
示例3: toggle_minimap_terrain_coding
void toggle_minimap_terrain_coding()
{
set("minimap_terrain_coding", !minimap_terrain_coding());
}
开发者ID:fluffbeast,项目名称:wesnoth-old,代码行数:4,代码来源:general.cpp
示例4: set_bool
void set_bool(const wchar_t* name, bool value, bool def_value) {
if (value == def_value)
del(name);
else
set(name, value ? 1 : 0);
}
开发者ID:FarManagerLegacy,项目名称:farplug,代码行数:6,代码来源:options.cpp
示例5: set_disable_loadingscreen_animation
void set_disable_loadingscreen_animation(bool value)
{
set("disable_loadingscreen_animation", value);
}
开发者ID:fluffbeast,项目名称:wesnoth-old,代码行数:4,代码来源:general.cpp
示例6: set
Point::Point( int x, int y )
{
set(x,y);
}
开发者ID:arvidsson,项目名称:Agui,代码行数:4,代码来源:Point.cpp
示例7: set
SockAddr::SockAddr(UINT16 port, const char* addr)
{
set(port, addr);
}
开发者ID:yibing-shi,项目名称:YibingTest,代码行数:4,代码来源:SockAddr.cpp
示例8: set_animate_map
void set_animate_map(bool value)
{
set("animate_map", value);
}
开发者ID:hyrio,项目名称:War-Of-Kingdom,代码行数:4,代码来源:preferences.cpp
示例9: set
void CompositeProperty::set(const Property* srcProperty) {
if (const auto compositeSrcProp = dynamic_cast<const CompositeProperty*>(srcProperty)) {
set(compositeSrcProp);
}
}
开发者ID:ResearchDaniel,项目名称:inviwo,代码行数:5,代码来源:compositeproperty.cpp
示例10: init
void DirectionalLightComponent::postUnserialization()
{
init();
set(_data);
}
开发者ID:r-lyeh-forks,项目名称:AGE,代码行数:5,代码来源:DirectionalLightComponent.cpp
示例11: payment_address
payment_address::payment_address(uint8_t version, const short_hash& hash)
: payment_address()
{
set(version, hash);
}
开发者ID:Groestlcoin,项目名称:libgroestlcoin,代码行数:5,代码来源:address.cpp
示例12: IterIrredTest
long IterIrredTest(const GF2EX& f)
{
if (deg(f) <= 0) return 0;
if (deg(f) == 1) return 1;
GF2EXModulus F;
build(F, f);
GF2EX h;
FrobeniusMap(h, F);
long CompTableSize = 2*SqrRoot(deg(f));
GF2EXArgument H;
build(H, h, F, CompTableSize);
long i, d, limit, limit_sqr;
GF2EX g, X, t, prod;
SetX(X);
i = 0;
g = h;
d = 1;
limit = 2;
limit_sqr = limit*limit;
set(prod);
while (2*d <= deg(f)) {
add(t, g, X);
MulMod(prod, prod, t, F);
i++;
if (i == limit_sqr) {
GCD(t, f, prod);
if (!IsOne(t)) return 0;
set(prod);
limit++;
limit_sqr = limit*limit;
i = 0;
}
d = d + 1;
if (2*d <= deg(f)) {
CompMod(g, g, H, F);
}
}
if (i > 0) {
GCD(t, f, prod);
if (!IsOne(t)) return 0;
}
return 1;
}
开发者ID:av-elier,项目名称:fast-exponentiation-algs,代码行数:61,代码来源:GF2EXFactoring.c
示例13: set
void SF_CSV::setWP(int wp){
set(cached_pt,cached_eta,wp,cached_flavor);
}
开发者ID:amarini,项目名称:ChargedHiggs,代码行数:3,代码来源:SF.cpp
示例14: DateTime
DateTime(short year,short month,short day,size_t hhmmss,short utcOffset_as_hhmm) : DateTime() {
set(year,month,day,hhmmss,utcOffset_as_hhmm);
}
开发者ID:bdatto,项目名称:lib-cpp,代码行数:3,代码来源:datetime.hpp
示例15: create
void create(){
seteuid(getuid());
set("name", "Shortsword");
set_weapon_type("sword/short");
set("id", ({"sword", "weapon", "shortsword"}));
开发者ID:ClockworkSoul,项目名称:MortalRemains,代码行数:5,代码来源:shortsword.c
示例16: create
void create() {
set("mass", 1);
set("name", "Noname");
set("id", ({ "skull", "charred skull" }) );
开发者ID:ClockworkSoul,项目名称:MortalRemains,代码行数:4,代码来源:nuke_skull.c
示例17: set_int
void set_int(const wchar_t* name, unsigned value, unsigned def_value) {
if (value == def_value)
del(name);
else
set(name, value);
}
开发者ID:FarManagerLegacy,项目名称:farplug,代码行数:6,代码来源:options.cpp
示例18: GUINewMode
static void GUINewMode(void)
{
int Max, Sel, Dis;
char* buffer;
char* arg1 = getRecord();
char* arg2 = getAuthor();
char* arg3 = getCopyright();
char* arg4 = getDriver();
char* arg5 = getVersion();
char* arg6 = getAnnotation();
buffer = AllocVec( strlen( arg1 ) +
strlen( arg2 ) +
strlen( arg3 ) +
strlen( arg4 ) +
strlen( arg5 ) +
strlen( arg6 ) +
128,
MEMF_ANY);
if( buffer != NULL )
{
sprintf( buffer,"0x%08lx\n%s\n%s\n%s\nDevs:AHI/%s.audio\n%s\n%s",
getAudioMode(),
arg1,
arg2,
arg3,
arg4,
arg5,
arg6 );
set(MUIInfos, MUIA_Text_Contents, (ULONG) buffer);
FreeVec(buffer);
}
Max = max(state.Frequencies -1, 0);
Sel = min(Max, state.FreqSelected);
Dis = Max==0;
set(MUIFreq, MUIA_Disabled, Dis);
if( !Dis )
{
set(MUIFreq, MUIA_Numeric_Max, Max);
set(MUIFreq, MUIA_Numeric_Value, Sel);
}
set(MUILFreq, MUIA_Text_Contents, (ULONG) getFreq());
Max = max(state.Channels, 0);
Sel = min(Max, state.ChannelsSelected);
Dis = (Max == 0 || Max == 1) || state.ChannelsDisabled;
set(MUIChannels, MUIA_Disabled, Dis);
if( !Dis )
{
set(MUIChannels, MUIA_Numeric_Max, Max);
set(MUIChannels, MUIA_Numeric_Value, Sel);
}
set(MUILChannels, MUIA_Text_Contents, (ULONG) getChannels());
Max = max(state.OutVols -1, 0);
Sel = min(Max, state.OutVolSelected);
Dis = Max==0;
set(MUIOutvol, MUIA_Disabled, Dis);
if( !Dis )
{
set(MUIOutvol, MUIA_Numeric_Max, Max);
set(MUIOutvol, MUIA_Numeric_Value, Sel);
}
set(MUILOutvol, MUIA_Text_Contents, (ULONG) getOutVol());
Max = max(state.MonVols -1, 0);
Sel = min(Max, state.MonVolSelected);
Dis = Max==0;
set(MUIMonvol, MUIA_Disabled, Dis);
if( !Dis )
{
set(MUIMonvol, MUIA_Numeric_Max, Max);
set(MUIMonvol, MUIA_Numeric_Value, Sel);
}
set(MUILMonvol, MUIA_Text_Contents, (ULONG) getMonVol());
Max = max(state.Gains -1, 0);
Sel = min(Max, state.GainSelected);
Dis = Max==0;
set(MUIGain, MUIA_Disabled, Dis);
if( !Dis )
{
set(MUIGain, MUIA_Numeric_Max, Max);
set(MUIGain, MUIA_Numeric_Value, Sel);
}
set(MUILGain, MUIA_Text_Contents, (ULONG) getGain());
Max = max(state.Inputs -1, 0);
Sel = min(Max, state.InputSelected);
Dis = Max==0;
set(MUIInput, MUIA_Disabled, Dis);
if( !Dis )
{
set(MUIInput, MUIA_Numeric_Max, Max);
set(MUIInput, MUIA_Numeric_Value, Sel);
}
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:arp2-svn,代码行数:101,代码来源:gui_mui.c
示例19: set_str
void set_str(const wchar_t* name, const UnicodeString& value, const UnicodeString& def_value) {
if (value == def_value)
del(name);
else
set(name, value);
}
开发者ID:FarManagerLegacy,项目名称:farplug,代码行数:6,代码来源:options.cpp
示例20: BuildGUI
//.........这里部分代码省略.........
MUIA_Slider_Horiz, TRUE,
MUIA_Numeric_Min, 0,
MUIA_Numeric_Max, 100,
MUIA_Numeric_Value,(globalprefs.ahigp_AntiClickTime * 1000 + 32768) >> 16,
MUIA_Numeric_Format,msgACTimeFmt,
MUIA_Disabled, AHIBase->lib_Version <= 4,
End,
Child, MUITScalemode = SpecialButton((STRPTR)msgOptScalemode),
Child, MUIScalemode = CycleObject,
MUIA_CycleChain, 1,
MUIA_Cycle_Entries, ScaleLabels,
MUIA_Cycle_Active, globalprefs.ahigp_ScaleMode,
MUIA_Disabled, AHIBase->lib_Version <= 4,
End,
End,
Child, HVSpace,
End,
Child, HVSpace,
End;
MUIApp = ApplicationObject,
MUIA_Application_Title, (char *) msgTextProgramName,
MUIA_Application_Version, Version,
MUIA_Application_Copyright, "©1996-2005 Martin Blom",
MUIA_Application_Author, "Stéphane Barbaray/Martin Blom",
MUIA_Application_Base, "AHI",
MUIA_Application_HelpFile, HELPFILE,
MUIA_Application_Menustrip, MUIMenu = MUI_MakeObject(MUIO_MenustripNM,Menus,0),
MUIA_Application_SingleTask, TRUE,
SubWindow, MUIWindow = WindowObject,
MUIA_Window_Title, (char *) msgTextProgramName,
MUIA_Window_ID , MAKE_ID('M','A','I','N'),
MUIA_HelpNode, "AHI",
WindowContents, VGroup,
Child, RegisterGroup(PageNames),
MUIA_CycleChain, 1,
Child, page1,
Child, page2,
End,
Child, HGroup,
Child, MUISave = SimpleButton(msgButtonSave),
Child, MUIUse = SimpleButton(msgButtonUse),
Child, MUICancel = SimpleButton(msgButtonCancel),
End,
End,
End,
End;
if( MUIApp != NULL )
{
APTR item = (APTR)DoMethod(MUIMenu,MUIM_FindUData,ACTID_ICONS);
if(item)
{
set(item, MUIA_Menuitem_Checked, SaveIcons);
}
DoMethod(MUIWindow, MUIM_MultiSet, MUIA_Text_PreParse,"\033l",MUILFreq,MUILChannels,MUILOutvol,MUILMonvol,MUILGain,MUILInput,MUILOutput,NULL);
DoMethod(MUIWindow, MUIM_MultiSet, MUIA_CycleChain, 1, MUISave,MUIUse,MUICancel,NULL);
DoMethod(MUITFreq, MUIM_Notify, MUIA_Pressed, TRUE, MUIWindow, 3, MUIM_Set, MUIA_Window_ActiveObject, MUIFreq);
DoMethod(MUITChannels, MUIM_Notify, MUIA_Pressed, TRUE, MUIWindow, 3, MUIM_Set, MUIA_Window_ActiveObject, MUIChannels);
DoMethod(MUITOutvol, MUIM_Notify, MUIA_Pressed, TRUE, MUIWindow, 3, MUIM_Set, MUIA_Window_ActiveObject, MUIOutvol);
DoMethod(MUITMonvol, MUIM_Notify, MUIA_Pressed, TRUE, MUIWindow, 3, MUIM_Set, MUIA_Window_ActiveObject, MUIMonvol);
DoMethod(MUITGain, MUIM_Notify, MUIA_Pressed, TRUE, MUIWindow, 3, MUIM_Set, MUIA_Window_ActiveObject, MUIGain);
DoMethod(MUITInput, MUIM_Notify, MUIA_Pressed, TRUE, MUIWindow, 3, MUIM_Set, MUIA_Window_ActiveObject, MUIInput);
DoMethod(MUITOutput, MUIM_Notify, MUIA_Pressed, TRUE, MUIWindow, 3, MUIM_Set, MUIA_Window_ActiveObject, MUIOutput);
DoMethod(MUIPlay, MUIM_Notify, MUIA_Pressed, FALSE, MUIApp, 2, MUIM_Application_ReturnID, ACTID_PLAY);
DoMethod(MUITDebug, MUIM_Notify, MUIA_Pressed, TRUE, MUIWindow, 3, MUIM_Set, MUIA_Window_ActiveObject, MUIDebug);
DoMethod(MUITEcho, MUIM_Notify, MUIA_Pressed, TRUE, MUIWindow, 3, MUIM_Set, MUIA_Window_ActiveObject, MUIEcho);
DoMethod(MUITSurround, MUIM_Notify, MUIA_Pressed, TRUE, MUIWindow, 3, MUIM_Set, MUIA_Window_ActiveObject, MUISurround);
DoMethod(MUITClipvol, MUIM_Notify, MUIA_Pressed, TRUE, MUIWindow, 3, MUIM_Set, MUIA_Window_ActiveObject, MUIClipvol);
DoMethod(MUITCpu, MUIM_Notify, MUIA_Pressed, TRUE, MUIWindow, 3, MUIM_Set, MUIA_Window_ActiveObject, MUICpu);
DoMethod(MUITACTime, MUIM_Notify, MUIA_Pressed, TRUE, MUIWindow, 3, MUIM_Set, MUIA_Window_ActiveObject, MUIACTime);
DoMethod(MUITScalemode, MUIM_Notify, MUIA_Pressed, TRUE, MUIWindow, 3, MUIM_Set, MUIA_Window_ActiveObject, MUIScalemode);
DoMethod(MUIWindow, MUIM_Notify, MUIA_Window_CloseRequest, TRUE, MUIApp, 2, MUIM_Application_ReturnID, MUIV_Application_ReturnID_Quit);
DoMethod(MUISave, MUIM_Notify, MUIA_Pressed, FALSE, MUIApp, 2, MUIM_Application_ReturnID, ACTID_SAVE);
DoMethod(MUIUse, MUIM_Notify, MUIA_Pressed, FALSE, MUIApp, 2, MUIM_Application_ReturnID, ACTID_USE);
DoMethod(MUICancel, MUIM_Notify, MUIA_Pressed, FALSE, MUIApp, 2, MUIM_Application_ReturnID, MUIV_Application_ReturnID_Quit);
DoMethod(MUIUnit, MUIM_Notify, MUIA_Cycle_Active, MUIV_EveryTime, MUIApp, 2, MUIM_Application_ReturnID, ACTID_UNIT);
DoMethod(MUIList, MUIM_Notify, MUIA_List_Active, MUIV_EveryTime, MUIApp, 2, MUIM_Application_ReturnID, ACTID_MODE);
DoMethod(MUIDebug, MUIM_Notify, MUIA_Cycle_Active, MUIV_EveryTime, MUIApp, 2, MUIM_Application_ReturnID, ACTID_DEBUG);
DoMethod(MUISurround, MUIM_Notify, MUIA_Cycle_Active, MUIV_EveryTime, MUIApp, 2, MUIM_Application_ReturnID, ACTID_SURROUND);
DoMethod(MUIEcho, MUIM_Notify, MUIA_Cycle_Active, MUIV_EveryTime, MUIApp, 2, MUIM_Application_ReturnID, ACTID_ECHO);
DoMethod(MUICpu, MUIM_Notify, MUIA_Numeric_Value, MUIV_EveryTime, MUIApp, 2, MUIM_Application_ReturnID, ACTID_CPULIMIT);
DoMethod(MUIClipvol, MUIM_Notify, MUIA_Cycle_Active, MUIV_EveryTime, MUIApp, 2, MUIM_Application_ReturnID, ACTID_CLIPMV);
DoMethod(MUIACTime, MUIM_Notify, MUIA_Numeric_Value, MUIV_EveryTime, MUIApp, 2, MUIM_Application_ReturnID, ACTID_ACTIME);
DoMethod(MUIScalemode, MUIM_Notify, MUIA_Cycle_Active, MUIV_EveryTime, MUIApp, 2, MUIM_Application_ReturnID, ACTID_SCALEMODE);
DoMethod(MUIFreq, MUIM_Notify, MUIA_Numeric_Value, MUIV_EveryTime, MUIV_Notify_Self, 3, MUIM_CallHook, &hookSlider, MUIV_TriggerValue);
DoMethod(MUIChannels, MUIM_Notify, MUIA_Numeric_Value, MUIV_EveryTime, MUIV_Notify_Self, 3, MUIM_CallHook, &hookSlider, MUIV_TriggerValue);
DoMethod(MUIOutvol, MUIM_Notify, MUIA_Numeric_Value, MUIV_EveryTime, MUIV_Notify_Self, 3, MUIM_CallHook, &hookSlider, MUIV_TriggerValue);
DoMethod(MUIMonvol, MUIM_Notify, MUIA_Numeric_Value, MUIV_EveryTime, MUIV_Notify_Self, 3, MUIM_CallHook, &hookSlider, MUIV_TriggerValue);
DoMethod(MUIGain, MUIM_Notify, MUIA_Numeric_Value, MUIV_EveryTime, MUIV_Notify_Self, 3, MUIM_CallHook, &hookSlider, MUIV_TriggerValue);
DoMethod(MUIInput, MUIM_Notify, MUIA_Numeric_Value, MUIV_EveryTime, MUIV_Notify_Self, 3, MUIM_CallHook, &hookSlider, MUIV_TriggerValue);
DoMethod(MUIOutput, MUIM_Notify, MUIA_Numeric_Value, MUIV_EveryTime, MUIV_Notify_Self, 3, MUIM_CallHook, &hookSlider, MUIV_TriggerValue);
set(MUIWindow, MUIA_Window_Open, TRUE);
GUINewUnit();
return TRUE;
}
return FALSE;
}
开发者ID:BackupTheBerlios,项目名称:arp2-svn,代码行数:101,代码来源:gui_mui.c
注:本文中的set函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论