本文整理汇总了C++中pfc::string_base类的典型用法代码示例。如果您正苦于以下问题:C++ string_base类的具体用法?C++ string_base怎么用?C++ string_base使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了string_base类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: get_description
virtual bool get_description(t_uint32 p_index,pfc::string_base & p_out)
{
switch ( p_index )
{
case CMD_NOTITLE:
p_out.set_string( "Hide the main window title bar" );
return true;
case CMD_SAVE_1:
case CMD_SAVE_2:
case CMD_SAVE_3:
case CMD_SAVE_4:
case CMD_SAVE_5:
{
p_out.set_string( "save current screen location to a slot" );
return true;
}
break;
case CMD_REST_1:
case CMD_REST_2:
case CMD_REST_3:
case CMD_REST_4:
case CMD_REST_5:
{
p_out.set_string( "restore screen location from a slot" );
return true;
}
break;
case CMD_SCRIPT1:
case CMD_SCRIPT2:
p_out.set_string( "Change the layout and size" );
return true;
}
return false;
}
开发者ID:cwbowron,项目名称:foobar2000-plugins,代码行数:35,代码来源:foo_notitlebar.cpp
示例2: get_default_script_code
void wsh_panel_vars::get_default_script_code(pfc::string_base & out)
{
out.reset();
puResource pures = uLoadResource(core_api::get_my_instance(), uMAKEINTRESOURCE(IDR_SCRIPT), "SCRIPT");
if (pures)
out.set_string(reinterpret_cast<const char *>(pures->GetPointer()), pures->GetSize());
}
开发者ID:Olivki,项目名称:foo-wsh-panel-mod,代码行数:8,代码来源:config.cpp
示例3: urlEncodeAppendRaw
void urlEncodeAppendRaw(pfc::string_base & out, const char * in, t_size inSize) {
for(t_size walk = 0; walk < inSize; ++walk) {
const char c = in[walk];
if (c == ' ') out.add_byte('+');
else if (pfc::char_is_ascii_alphanumeric(c) || c == '_') out.add_byte(c);
else out << "%" << pfc::format_hex((t_uint8)c, 2);
}
}
开发者ID:Irwin1138,项目名称:foo_bestversion,代码行数:8,代码来源:string_base.cpp
示例4: insert
void insert(const char * src,unsigned idx,pfc::string_base & out)
{
out.reset();
out.add_string(src,idx);
out.add_string("&");
out.add_string(src+idx);
used.add_char(uCharLower(src[idx]));
}
开发者ID:i7voodoo,项目名称:columns_ui,代码行数:8,代码来源:menubar.cpp
示例5: path_pack_string
static void path_pack_string(pfc::string_base & out,const char * src)
{
out.add_char('|');
out << strlen(src);
out.add_char('|');
out << src;
out.add_char('|');
}
开发者ID:KolorKode,项目名称:Stg,代码行数:8,代码来源:filesystem.cpp
示例6: urlEncodeAppend
void urlEncodeAppend(pfc::string_base & out, const char * in) {
for(;;) {
const char c = *(in++);
if (c == 0) break;
else if (c == ' ') out.add_byte('+');
else if (pfc::char_is_ascii_alphanumeric(c) || c == '_') out.add_byte(c);
else out << "%" << pfc::format_hex((t_uint8)c, 2);
}
}
开发者ID:Irwin1138,项目名称:foo_bestversion,代码行数:9,代码来源:string_base.cpp
示例7: read_string_raw
void stream_reader::read_string_raw(pfc::string_base & p_out,abort_callback & p_abort) {
enum {delta = 256};
char buffer[delta];
p_out.reset();
for(;;) {
t_size delta_done;
delta_done = read(buffer,delta,p_abort);
p_out.add_string(buffer,delta_done);
if (delta_done < delta) break;
}
}
开发者ID:KolorKode,项目名称:Stg,代码行数:11,代码来源:filesystem.cpp
示例8: get_mask
virtual bool get_mask(unsigned idx, pfc::string_base & out)
{
if (idx > 0) return false;
out.reset();
for (int n = 0; n < 14; n++)
{
if (n) out.add_byte(';');
out << "*." << extensions[n];
}
return true;
}
开发者ID:FauxFaux,项目名称:foo_mudlord,代码行数:11,代码来源:input_modplug.cpp
示例9: get_display_path
bool archive_impl::get_display_path(const char * path,pfc::string_base & out)
{
pfc::string8 archive,file;
if (g_parse_unpack_path(path,archive,file))
{
g_get_display_path(archive,out);
out.add_string("|");
out.add_string(file);
return true;
}
else return false;
}
开发者ID:KolorKode,项目名称:Stg,代码行数:12,代码来源:filesystem.cpp
示例10: chars_to_lower
void chars_to_lower( const char* p_src , pfc::string_base& p_out )
{
p_out.reset();
const char* p = p_src;
for (;*p;)
{
unsigned test;
t_size delta = pfc::utf8_decode_char(p,test);
if( delta == 0 || test == 0 ) break;
p_out.add_char(pfc::charLower(test));
p+=delta;
}
}
开发者ID:stluda,项目名称:lyrics-extend-source-for-lyrics3,代码行数:13,代码来源:utils.cpp
示例11: get_display_name
void playlist_view_cache::get_display_name(unsigned playlist, unsigned idx, int col, pfc::string_base & out)
{
playlist_cache * p_cache = get_item(playlist);
if (idx >= 0 && idx < p_cache->get_count())
{
if (!p_cache->get_item(idx))
{
if (!update_item(playlist, idx)) {out.set_string("Error"); return;}
}
p_cache->get_item(idx)->get_item(col)->get_display(out); return;
}
out.set_string("Internal error - invalid playlist entry!");
}
开发者ID:ttsping,项目名称:columns_ui,代码行数:13,代码来源:playlist_view_cache.cpp
示例12: remove_color_marks
void titleformat_compiler::remove_color_marks(const char * src,pfc::string_base & out)//helper
{
out.reset();
while(*src)
{
if (*src==3)
{
src++;
while(*src && *src!=3) src++;
if (*src==3) src++;
}
else out.add_byte(*src++);
}
}
开发者ID:reupen,项目名称:foobar2000-sdk,代码行数:14,代码来源:titleformat.cpp
示例13: mainpath_from_guid
void mainpath_from_guid(const GUID & p_guid, const GUID & p_subguid, pfc::string_base & p_out, bool b_short)
{
p_out.reset();
service_enum_t<mainmenu_commands> e;
service_ptr_t<mainmenu_commands> ptr;
unsigned p_service_item_index;
while (e.next(ptr))
{
service_ptr_t<mainmenu_commands_v2> ptr_v2;
ptr->service_query_t(ptr_v2);
unsigned p_service_item_count = ptr->get_command_count();
for (p_service_item_index = 0; p_service_item_index < p_service_item_count; p_service_item_index++)
{
if (p_guid == ptr->get_command(p_service_item_index))
{
pfc::string8 name;
ptr->get_name(p_service_item_index, name);
if (p_subguid != pfc::guid_null && ptr_v2.is_valid() && ptr_v2->is_command_dynamic(p_service_item_index))
{
pfc::string8 name_sub;
mainmenu_node::ptr ptr_node = ptr_v2->dynamic_instantiate(p_service_item_index);
mainmenunode_subguid_to_path(ptr_node, p_subguid, name_sub, true);
name << "/" << name_sub;
}
if (!b_short)
{
pfc::list_t<pfc::string8> levels;
GUID parent = ptr->get_parent();
while (parent != pfc::guid_null)
{
pfc::string8 parentname;
if (maingroupname_from_guid(GUID(parent), parentname, parent))
levels.insert_item(parentname, 0);
}
unsigned i, count = levels.get_count();
for (i = 0; i<count; i++)
{
p_out.add_string(levels[i]);
p_out.add_byte('/');
}
}
p_out.add_string(name);
}
}
}
}
开发者ID:9060,项目名称:columns_ui,代码行数:49,代码来源:menu_helpers.cpp
示例14: meta_format
bool file_info::meta_format(const char * p_name,pfc::string_base & p_out, const char * separator) const {
p_out.reset();
t_size index = meta_find(p_name);
if (index == pfc_infinite) return false;
meta_format_entry(index, p_out, separator);
return true;
}
开发者ID:kazukioishi,项目名称:foo_nowplayingtunes,代码行数:7,代码来源:file_info.cpp
示例15: context_get_description
bool menu_helpers::context_get_description(const GUID& p_guid,pfc::string_base & out) {
service_ptr_t<contextmenu_item> ptr; t_uint32 index;
if (!menu_item_resolver::g_resolve_context_command(p_guid, ptr, index)) return false;
bool rv = ptr->get_item_description(index, out);
if (!rv) out.reset();
return rv;
}
开发者ID:Irwin1138,项目名称:foo_bestversion,代码行数:7,代码来源:menu_helpers.cpp
示例16: remove_chars
void remove_chars( const char* p_src , pfc::string_base& p_out , const char* p_char)
{
const char* p = p_char;
pfc::string8 temp(p_src);
const char* p2 = temp.get_ptr();
for (;*p;)
{
unsigned test;
t_size delta = pfc::utf8_decode_char(p,test);
if(delta == 0 || test == 0)break;
for (;*p2;)
{
unsigned test2;
t_size delta2 = pfc::utf8_decode_char(p2,test2);
if(delta2 == 0 || test2 == 0)break;
if( test == test2 ){
temp.remove_chars(p2-temp.get_ptr(),delta2);
}
else{
p2 += delta2;
}
}
p2 = temp.get_ptr();
p += delta;
}
p_out.set_string(temp);
}
开发者ID:stluda,项目名称:lyrics-extend-source-for-lyrics3,代码行数:27,代码来源:utils.cpp
示例17: if
void toolbar_extension::button::get_name(pfc::string_base & p_out) //config
{
p_out.reset();
if (m_type == TYPE_BUTTON)
{
p_out = "[Button] ";
pfc::string8 temp;
if (uie::custom_button::g_button_get_name(m_guid, temp))
{
p_out += temp;
}
}
else if (m_type == TYPE_SEPARATOR)
p_out = "[Separator]";
else if (m_type == TYPE_MENU_ITEM_MAIN)
{
pfc::string8 temp;
p_out = "[Main menu item] ";
menu_helpers::mainpath_from_guid(m_guid, m_subcommand, temp);
p_out += temp;
}
else
{
pfc::string8 temp;
menu_helpers::contextpath_from_guid(m_guid, m_subcommand, temp);
p_out = "[Shortcut menu item] ";
p_out += temp;
}
}
开发者ID:i7voodoo,项目名称:columns_ui,代码行数:29,代码来源:buttons_button.cpp
示例18: maingroupname_from_guid
bool maingroupname_from_guid(const GUID & p_guid, pfc::string_base & p_out, GUID & parentout)
{
p_out.reset();
parentout = pfc::guid_null;
{
service_enum_t<mainmenu_group> e;
service_ptr_t<mainmenu_group> ptr;
service_ptr_t<mainmenu_group_popup> ptrp;
//unsigned p_service_item_index;
while (e.next(ptr))
{
{
if (ptr->get_guid() == p_guid)
{
parentout = ptr->get_parent();
if (ptr->service_query_t(ptrp))
{
ptrp->get_display_string(p_out);
return true;
}
return false;
}
}
}
}
return false;
}
开发者ID:9060,项目名称:columns_ui,代码行数:29,代码来源:menu_helpers.cpp
示例19: context_get_display
virtual bool
context_get_display(
unsigned int index,
metadb_handle_list_cref tracks,
pfc::string_base& out,
unsigned int& /*displayflags*/,
const GUID& /*caller*/
)
{
switch(index)
{
case Items::ReplaceWithBestVersion:
{
out = "Replace with best version of track";
if(tracks.get_count() > 1)
{
out.add_string("s");
}
return true;
}
default:
{
// Nothing wants to customise the display of the item; let the regular name be displayed.
get_item_name(index, out);
return true;
}
}
}
开发者ID:hymerman,项目名称:foo_bestversion,代码行数:31,代码来源:ContextMenu.cpp
示例20:
void toolbar_extension::button::get_display_text(pfc::string_base & p_out) //display
{
p_out.reset();
if (m_use_custom_text)
p_out = m_text;
else
get_short_name(p_out);
}
开发者ID:i7voodoo,项目名称:columns_ui,代码行数:8,代码来源:buttons_button.cpp
注:本文中的pfc::string_base类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论