本文整理汇总了C++中SET_BOOL函数的典型用法代码示例。如果您正苦于以下问题:C++ SET_BOOL函数的具体用法?C++ SET_BOOL怎么用?C++ SET_BOOL使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了SET_BOOL函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: conn_parse_kvp
int
conn_parse_kvp(struct connection *c, struct kvp *kvp)
{
struct kvp *k;
struct session *s = c->session;
const char *err;
int errors = 0;
for (k = kvp; k->key; k++) {
/* XXX handle NotUnderstood|Irrelevant|Reject */
SET_NUM(k, s, MaxBurstLength, 512, 16777215);
SET_NUM(k, s, FirstBurstLength, 512, 16777215);
SET_NUM(k, s, DefaultTime2Wait, 0, 3600);
SET_NUM(k, s, DefaultTime2Retain, 0, 3600);
SET_NUM(k, s, MaxOutstandingR2T, 1, 65535);
SET_NUM(k, s, TargetPortalGroupTag, 1, 65535);
SET_NUM(k, s, MaxConnections, 1, 65535);
SET_BOOL(k, s, InitialR2T);
SET_BOOL(k, s, ImmediateData);
SET_BOOL(k, s, DataPDUInOrder);
SET_BOOL(k, s, DataSequenceInOrder);
SET_NUM(k, s, ErrorRecoveryLevel, 0, 2);
SET_NUM(k, c, MaxRecvDataSegmentLength, 512, 16777215);
}
if (errors) {
log_warnx("conn_parse_kvp: errors found");
return -1;
}
return 0;
}
示例2: getIntf
void VlcProc::init_variables()
{
playlist_t* pPlaylist = getIntf()->p_sys->p_playlist;
SET_BOOL( m_cVarRandom, var_GetBool( pPlaylist, "random" ) );
SET_BOOL( m_cVarLoop, var_GetBool( pPlaylist, "loop" ) );
SET_BOOL( m_cVarRepeat, var_GetBool( pPlaylist, "repeat" ) );
audio_volume_t volume = aout_VolumeGet( pPlaylist );
SET_VOLUME( m_cVarVolume, volume, false );
SET_BOOL( m_cVarMute, volume == 0 );
update_equalizer();
}
示例3: getIntf
void VlcProc::init_variables()
{
playlist_t* pPlaylist = getIntf()->p_sys->p_playlist;
SET_BOOL( m_cVarRandom, var_GetBool( pPlaylist, "random" ) );
SET_BOOL( m_cVarLoop, var_GetBool( pPlaylist, "loop" ) );
SET_BOOL( m_cVarRepeat, var_GetBool( pPlaylist, "repeat" ) );
SET_VOLUME( m_cVarVolume, var_GetFloat( pPlaylist, "volume" ), false );
bool b_is_muted = aout_MuteGet( pPlaylist ) > 0;
SET_BOOL( m_cVarMute, b_is_muted );
update_equalizer();
}
示例4: getIntf
void VlcProc::init_variables()
{
playlist_t* pPlaylist = getIntf()->p_sys->p_playlist;
SET_BOOL( m_cVarRandom, var_GetBool( pPlaylist, "random" ) );
SET_BOOL( m_cVarLoop, var_GetBool( pPlaylist, "loop" ) );
SET_BOOL( m_cVarRepeat, var_GetBool( pPlaylist, "repeat" ) );
SET_VOLUME( m_cVarVolume, var_GetFloat( pPlaylist, "volume" ), false );
SET_BOOL( m_cVarMute, var_GetBool( pPlaylist, "mute" ) );
SET_BOOL( m_cVarStopped, true );
init_equalizer();
}
示例5: SET_BOOL
void VlcProc::on_repeat_changed( vlc_object_t* p_obj, vlc_value_t newVal )
{
(void)newVal;
playlist_t* pPlaylist = (playlist_t*) p_obj;
SET_BOOL( m_cVarRepeat, var_GetBool( pPlaylist, "repeat" ) );
}
示例6: strstr
void VlcProc::on_audio_filter_changed( vlc_object_t* p_obj, vlc_value_t newVal )
{
(void)p_obj;
char *pFilters = newVal.psz_string;
bool b_equalizer = pFilters && strstr( pFilters, "equalizer" );
SET_BOOL( m_cVarEqualizer, b_equalizer );
}
示例7: set_map_vars
/* Set map style variables */
void
set_map_vars(void)
{
SET_BOOL(show_page_border);
SET_BOOL(show_page_title);
SET_BOOL(show_map_border);
SET_BOOL(show_map_title);
SET_BOOL(show_tags);
SET_COLOUR(map_background_colour);
SET_COLOUR(map_border_colour);
SET_COLOUR(map_title_colour);
SET_COLOUR(page_background_colour);
SET_COLOUR(page_border_colour);
SET_COLOUR(page_title_colour);
SET_FONT(map_title_font);
SET_FONT(page_title_font);
SET_REAL(font_scale);
font_scale = V_MAX(font_scale, 0.1);
SET_REAL(page_margin);
SET_FONTSIZE(map_title_fontsize);
SET_FONTSIZE(page_title_fontsize);
SET_STRING(page_size);
if (!get_papersize(page_size, &page_width, &page_height))
fatal("invalid paper size: %s", page_size);
if (VAR_DEF("page_width"))
SET_REAL(page_width);
if (VAR_DEF("page_height"))
SET_REAL(page_height);
SET_REAL(room_size);
room_size = V_MAX(room_size, 0.1);
SET_REAL(room_width);
SET_REAL(room_height);
}
示例8: assert
void VlcProc::on_can_record_changed( vlc_object_t* p_obj, vlc_value_t newVal )
{
input_thread_t* pInput = (input_thread_t*) p_obj;
assert( getIntf()->p_sys->p_input == NULL || getIntf()->p_sys->p_input == pInput );
SET_BOOL( m_cVarRecordable, var_GetBool( pInput, "can-record" ) );
}
示例9: set_link_vars
/* Set link style variables */
void
set_link_vars(void)
{
SET_BOOL(link_dashed);
SET_BOOL(link_spline);
SET_COLOUR(link_colour);
SET_COLOUR(link_text_colour);
SET_FONT(link_text_font);
SET_FONTSIZE(link_text_fontsize);
SET_REAL(link_arrow_size);
SET_REAL(link_line_width);
SET_STRING(link_inout_string);
SET_STRING(link_updown_string);
}
示例10: var_GetNonEmptyString
void VlcProc::update_equalizer()
{
char *pFilters;
if( m_pAout )
pFilters = var_GetNonEmptyString( m_pAout, "audio-filter" );
else
pFilters = var_InheritString( getIntf(), "audio-filter" );
bool b_equalizer = pFilters && strstr( pFilters, "equalizer" );
free( pFilters );
SET_BOOL( m_cVarEqualizer, b_equalizer );
}
示例11: strstr
void VlcProc::on_audio_filter_changed( vlc_object_t* p_obj, vlc_value_t newVal )
{
aout_instance_t* pAout = (aout_instance_t*) p_obj;
char *pFilters = newVal.psz_string;
bool b_equalizer = pFilters && strstr( pFilters, "equalizer" );
SET_BOOL( m_cVarEqualizer, b_equalizer );
if( b_equalizer && !m_bEqualizer_started )
{
var_AddCallback( pAout, "equalizer-bands", onEqBandsChange, this );
var_AddCallback( pAout, "equalizer-preamp", onEqPreampChange, this );
m_bEqualizer_started = true;
}
}
示例12: set_room_vars
/* Set room style variables */
void
set_room_vars(void)
{
SET_BOOL(room_border_dashed);
SET_BOOL(show_items);
SET_COLOUR(item_text_colour);
SET_COLOUR(room_border_colour);
SET_COLOUR(room_colour);
SET_COLOUR(room_exit_colour);
SET_COLOUR(room_shadow_colour);
SET_COLOUR(room_text_colour);
SET_FONT(item_text_font);
SET_FONT(room_text_font);
SET_FONTSIZE(item_text_fontsize);
SET_FONTSIZE(room_text_fontsize);
SET_REAL(room_border_width);
SET_REAL(room_exit_width);
SET_REAL(room_shadow_xoff);
SET_REAL(room_shadow_yoff);
}
示例13: cfg_main_section_save
static void
cfg_main_section_save (const char *section)
{
char *filters;
SET_STRING(theme);
SET_STRING(engine);
SET_STRING(verbosity);
SET_STRING(log_file);
SET_INT(idle_timeout);
SET_INT(fullscreen);
SET_INT(slideshow_delay);
SET_BOOL(display_mouse);
SET_TUPLE(music_filters, "music_ext");
SET_TUPLE(video_filters, "video_ext");
SET_TUPLE(photo_filters, "photo_ext");
}
示例14: SET_INT
** Default: The default value of the option.
*/
struct global_pref global_pref[] = {
{ "ACTIVITY_TYPES",
OPT_INT,
0,
opt_set_int,
NULL,
SET_INT(DEFAULT_ACTIVITY_TYPES)
},{ "AUTO_RECONNECT",
OPT_BOOL,
0,
opt_set_bool,
NULL,
SET_BOOL(DEFAULT_AUTO_RECONNECT)
},{ "AUTO_REJOIN",
OPT_BOOL,
0,
opt_set_bool,
NULL,
SET_BOOL(DEFAULT_AUTO_REJOIN)
},{ "AUTOSEND_AWAY",
OPT_BOOL,
0,
opt_set_bool,
NULL,
SET_BOOL(DEFAULT_AUTOSEND_AWAY)
},{ "BANNER",
OPT_STR,
0,
示例15: SET_BOOL
void VlcProc::on_random_changed( vlc_object_t* p_obj, vlc_value_t newVal )
{
playlist_t* pPlaylist = (playlist_t*) p_obj;
SET_BOOL( m_cVarRandom, var_GetBool( pPlaylist, "random" ) );
}