本文整理汇总了C++中debug_out函数的典型用法代码示例。如果您正苦于以下问题:C++ debug_out函数的具体用法?C++ debug_out怎么用?C++ debug_out使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了debug_out函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: filterGraph
SplitState filterGraph(PartitionStack* ps, const GraphType& points,
const CellList& cells, int path_length)
{
// Would not normally go this low level, but it is important this is fast
memset(&(mset.front()), 0, mset.size() * sizeof(mset[0]));
edgesconsidered = 0;
MonoSet monoset(ps->cellCount());
debug_out(3, "EdgeGraph", "filtering: " << cells.size() << " cells out of " << ps->cellCount());
if(path_length == 1) {
for(int c : cells)
{
hashCellSimple(ps, points, monoset, c);
}
}
else
{
MonoSet hitvertices(ps->domainSize());
for(int c : cells)
{
hashRangeDeep(ps, points, monoset, hitvertices, ps->cellRange(c));
}
memset(&(msetspare.front()), 0, msetspare.size() * sizeof(msetspare[0]));
hashRangeDeep2(ps, points, monoset, hitvertices.getMembers());
for(int i : range1(mset.size())) {
mset[i] += msetspare[i] * 71;
}
}
debug_out(3, "EdgeGraph", "filtering " << mset << " : " << monoset);
return filterPartitionStackByFunctionWithCells(ps, SquareBrackToFunction(&mset), monoset);
}
开发者ID:markuspf,项目名称:ferret,代码行数:31,代码来源:edgecolouredgraph.hpp
示例2: debug_out
int Theme::populateANYThemes(Fl_Browser *o,std::string checkHERE,bool backone){
debug_out("int populateANYThemes(Fl_Browser *o,std::string "+checkHERE+",bool backone)");
if(backone){o->add("..");}
DIR *dir=NULL;
std::string itemName;
struct dirent *ent=NULL;
if ((dir = opendir (checkHERE.c_str())) != NULL) {
while ((ent = readdir (dir)) != NULL) {
itemName=ent->d_name;
std::string fullpath=ent->d_name;
itemName=itemName.substr(0,(itemName.length()));
if (!(itemName.compare(".")==0)&&!(itemName.compare("..")==0)&&!(itemName.compare("old")==0)&&!(itemName.compare("2.3.0")==0)){
//Don't add our random stuff
if( (!linuxcommon::has_file_extention_at_end(itemName,".in")) && !linuxcommon::has_file_extention_at_end(itemName,".txt") ){
pugi::xml_document tmp;
if(checkHERE.rfind('/')!=checkHERE.length()-1){checkHERE+="/";}
std::string subber = checkHERE+fullpath;
fullpath=checkHERE+fullpath+"/"+fullpath;
debug_out(fullpath);
if( (tmp.load_file(fullpath.c_str())) || (tmp.load_file( subber.c_str())) ){
o->add(itemName.c_str());
}
}
}
}
if(dir!=NULL){closedir (dir);}
}
else {
perror ("");
return EXIT_FAILURE;
}
return 0;
}
开发者ID:Israel-,项目名称:jwm-settings-manager,代码行数:33,代码来源:themes.cpp
示例3: filterPartitionStackByUnorderedFunction
SplitState filterPartitionStackByUnorderedFunction(PartitionStack* ps, F f)
{
debug_out(3, "filterUnFun", "prestate " << ps->printCurrentPartition());
int cellCount = ps->cellCount();
// first of all, we need to try to distinguish as many values of F as possible.
std::map<typename F::result_type, HashType> full_hash;
for(int i : range1(cellCount))
{
typedef std::map<typename F::result_type, unsigned> map_type;
map_type count_map;
for(int x : ps->cellRange(i))
{
count_map[f(x)]++;
}
for(const auto& m : count_map)
{
full_hash[m.first] = hash_combine(full_hash[m.first], i, m.second);
}
}
debug_out(3, "filter", "Hash:" << full_hash);
debug_out(3, "filter", "Function:" << f);
SplitState ret = filterPartitionStackByFunction(ps, IndirectFunction(MapToFunction(&full_hash), f));
debug_out(3, "filterUnFun", "poststate " << ps->printCurrentPartition());
return ret;
}
开发者ID:markuspf,项目名称:ferret,代码行数:29,代码来源:partition_refinement.hpp
示例4: debug_out
void JSM_Menu::listMenus(Fl_Browser* list_browser){
debug_out("void listMenus(Fl_Browser* o)");
list_browser->clear();
std::string tempString,convertString,tempString2,convertString2,attributeValue,test1,test2;
if(newStyle() == -1){
for (int i = 0; i<=9;i++){
convertString = convert(i);
if(!isRootMenu(convertString)){
debug_out("Adding: "+convertString);
list_browser->add(convertString.c_str());
}
}
}
else{
debug_out("New Style Menu");
for(char i = '0';i<='z';i++){
convertString=i;
if((i < ':')||(i > '`')){
if(!isRootMenu(convertString)){
debug_out("Adding: "+convertString);
list_browser->add(convertString.c_str());
}
}
}
}
list_browser->redraw();
}
开发者ID:Israel-,项目名称:jwm-settings-manager,代码行数:27,代码来源:menu.cpp
示例5: addSolution
void addSolution(const Permutation& sol)
{
permutations.push_back(sol);
D_ASSERT(sol.size() == orbit_mins.size());
debug_out(3, "SS", "Old orbit_mins:" << orbit_mins);
for(int i : range1(sol.size()))
{
if(sol[i] != i)
{
int val1 = walkToMinimum(i);
int val2 = walkToMinimum(sol[i]);
int orbit_min = -1;
if(comparison(val1, val2))
orbit_min = val1;
else
orbit_min = val2;
update_orbit_mins(orbit_min, val1);
update_orbit_mins(orbit_min, val2);
update_orbit_mins(orbit_min, i);
update_orbit_mins(orbit_min, sol[i]);
}
}
debug_out(1, "SS", "Solution found");
debug_out(3, "SS", "Sol:" << sol);
debug_out(3, "SS", "New orbit_mins:" << orbit_mins);
}
开发者ID:gap-packages,项目名称:ferret,代码行数:27,代码来源:solution_store.hpp
示例6: debug_out
// This may throw for invalid domain or level.
std::ostream& debug_out(debug_level::flag level, const std::string& domain)
{
debug_internal::DebugState::domain_map_t& dm = debug_internal::get_debug_state().get_domain_map();
debug_internal::DebugState::domain_map_t::iterator level_map = dm.find(domain);
if (level_map == dm.end()) { // no such domain
std::string msg = "debug_out(): Debug state doesn't contain the requested domain: \"" + domain + "\".";
if (domain != "default") {
debug_out(debug_level::warn, "default") << msg << "\n";
debug_out(debug_level::info, "default") << "Auto-creating the missing domain.\n";
debug_register_domain(domain);
debug_out(debug_level::warn, "default") << "The message follows:\n";
return debug_out(level, domain); // try again
}
// this is an internal error
THROW_FATAL(debug_internal_error(msg.c_str()));
}
debug_internal::DebugState::level_map_t::iterator os = level_map->second.find(level);
if (level_map == dm.end()) {
std::string msg = std::string("debug_out(): Debug state doesn't contain the requested level ") +
debug_level::get_name(level) + " in domain: \"" + domain + "\".";
// this is an internal error
THROW_FATAL(debug_internal_error(msg.c_str()));
}
return *(os->second);
}
开发者ID:BackupTheBerlios,项目名称:gsmartcontrol-svn,代码行数:32,代码来源:dout.cpp
示例7: filterPartitionStackByUnorderedListFunction
SplitState filterPartitionStackByUnorderedListFunction(PartitionStack* ps, F f)
{
debug_out(3, "filterUnListFun", "prestate " << ps->printCurrentPartition());
int cellCount = ps->cellCount();
// first of all, we need to try to distinguish as many values of F as possible.
std::map<typename F::result_type::value_type, HashType> full_hash;
for(int i : range1(cellCount))
{
typedef std::map<typename F::result_type::value_type, unsigned> map_type;
map_type count_map;
for(int val : ps->cellRange(i))
{
for(const auto& val2 : f(val))
count_map[val2]++;
}
for(const auto& val : count_map)
{
full_hash[val.first] = hash_combine(full_hash[val.first], i, val.second);
}
}
SplitState ret = filterPartitionStackByFunction(ps, IndirectVecCollapseFunction(MapToFunction(&full_hash), f));
debug_out(3, "filterUnListFun", "poststate " << ps->printCurrentPartition());
return ret;
}
开发者ID:markuspf,项目名称:ferret,代码行数:28,代码来源:partition_refinement.hpp
示例8: application_start
int application_start(void)
{
mxchipInit();
Platform_Init();
UART_Init();
#ifdef RFLowPowerMode
ps_enable();
#endif
#ifdef MCULowPowerMode
mico_mcu_powersave_config(mxEnable);
#endif
debug_out("\r\n%s\r\nmxchipWNet library version: %s\r\n", APP_INFO, system_lib_version());
debug_out (menu);
debug_out ("\nMXCHIP> ");
while(1) {
Main_Menu();
if(configSuccess){
wNetConfig.wifi_mode = Station;
wNetConfig.dhcpMode = DHCP_Client;
wNetConfig.wifi_retry_interval = 100;
StartNetwork(&wNetConfig);
debug_out("connect to %s.....\r\n", wNetConfig.wifi_ssid);
configSuccess = 0;
debug_out ("\nMXCHIP> ");
}
}
}
开发者ID:agb861,项目名称:STM32F,代码行数:32,代码来源:main.c
示例9: exticonv_local_to_utf8
VALUE exticonv_local_to_utf8(VALUE local_string)
{
#if RJB_RUBY_VERSION_CODE < 190
check_kcode();
if(RTEST(objIconvR2J))
{
return rb_funcall(objIconvR2J, rb_intern("iconv"), 1, local_string);
}
else
{
return local_string;
}
#else
VALUE cEncoding, encoding, utf8;
cEncoding = rb_const_get(rb_cObject, rb_intern("Encoding"));
encoding = rb_funcall(local_string, rb_intern("encoding"), 0);
utf8 = rb_const_get(cEncoding, rb_intern("UTF_8"));
if (encoding != utf8)
{
VALUE ret = rb_funcall(local_string, rb_intern("encode"), 2, utf8, encoding);
#if defined(DEBUG)
debug_out(local_string);
debug_out(ret);
#endif
return ret;
}
else
{
return local_string;
}
#endif
}
开发者ID:TheMadKhajit,项目名称:rjb,代码行数:32,代码来源:riconv.c
示例10: while
/* Calculates the truth value of one lineful of conditions. Returns
the point just before the end of line. */
static char *test_line (WEdit *edit_widget, char *p, int *result)
{
int condition;
char operator;
char *debug_start, *debug_end;
/* Repeat till end of line */
while (*p && *p != '\n') {
/* support quote space .mnu */
while ((*p == ' ' && *(p-1) != '\\' ) || *p == '\t')
p++;
if (!*p || *p == '\n')
break;
operator = *p++;
if (*p == '?'){
debug_flag = 1;
p++;
}
/* support quote space .mnu */
while ((*p == ' ' && *(p-1) != '\\' ) || *p == '\t')
p++;
if (!*p || *p == '\n')
break;
condition = 1; /* True by default */
debug_start = p;
p = test_condition (edit_widget, p, &condition);
debug_end = p;
/* Add one debug statement */
debug_out (debug_start, debug_end, condition);
switch (operator){
case '+':
case '=':
/* Assignment */
*result = condition;
break;
case '&': /* Logical and */
*result &= condition;
break;
case '|': /* Logical or */
*result |= condition;
break;
default:
debug_error = 1;
break;
} /* switch */
/* Add one debug statement */
debug_out (&operator, NULL, *result);
} /* while (*p != '\n') */
/* Report debug message */
debug_out (NULL, NULL, 1);
if (!*p || *p == '\n')
p --;
return p;
}
开发者ID:dborca,项目名称:mc,代码行数:60,代码来源:user.c
示例11: filterCellByFunction_noSortData
SortEvent filterCellByFunction_noSortData(PartitionStack* ps, int cell, F f)
{
// Start at the end, because then the cell we pass to
// split remains the same.
int cellBegin = ps->cellStartPos(cell);
int cellEnd = ps->cellEndPos(cell);
// Cheap pass to check if all cells have the same value
HashType first_val = f(ps->val(cellBegin));
bool allequal = true;
for(int pos = cellBegin + 1; pos < cellEnd && allequal; ++pos)
{
if(first_val != (HashType)f(ps->val(pos)))
allequal = false;
}
if(allequal)
{
SortEvent se(cellBegin, cellEnd);
debug_out(3, "filter", "all hashes equal: " + toString(first_val));
se.addHashStart(f(ps->val(cellBegin)), cellBegin);
se.finalise();
return se;
}
std::sort(ps->cellStartPtr(cell), ps->cellEndPtr(cell), IndirectSorter(f));
ps->fixCellInverses(cell);
int cellsplits = 0;
SortEvent se(cellBegin, cellEnd);
for(int pos = cellEnd - 2; pos >= cellBegin; --pos)
{
if(f(ps->val(pos)) != f(ps->val(pos+1)))
{
se.addHashStart(f(ps->val(pos+1)),pos+1);
cellsplits++;
if(ps->split(cell, pos+1).hasFailed())
abort();
}
}
// Have to have information about the first cell too!
se.addHashStart(f(ps->val(cellBegin)), cellBegin);
se.finalise();
D_ASSERT(cellsplits > 0);
debug_out(3, "filter", "Succeeded at: " << cell << ", " << cellsplits << " ( " << (cellEnd - cellBegin) << ", " << cellBegin << ", " << cellEnd << ", " << ps->cellCount() << ")\n");
return se;
}
开发者ID:markuspf,项目名称:ferret,代码行数:57,代码来源:partition_refinement.hpp
示例12: dbase_clear
/********************************************************************
DBASE_CLEAR
Sletter alle informationer i databaserne
********************************************************************/
void dbase_clear(void)
{
debug_out(" | |==> Cleaning Nick database...\n");
while (nicks_count)
nicks_remove(nicks_num[nicks_count-1]->numeric);
channels_cleanup();
chanserv_dbase_cleanup();
debug_out(" | \\==> Databases successfully removed from memory...\n");
}
开发者ID:mortenbpost,项目名称:eservices,代码行数:15,代码来源:nicks.c
示例13: filterPartitionStackByFunction
SplitState filterPartitionStackByFunction(PartitionStack* ps, F f)
{
debug_out(3, "filterByFunction", "prestate " << ps->printCurrentPartition());
SplitState ret(false);
if(ps->getAbstractQueue()->hasSortData())
ret = filterPartitionStackByFunction_withSortData(ps, f);
else
ret = filterPartitionStackByFunction_noSortData(ps, f);
debug_out(3, "filterByFunction", "poststate " << ps->printCurrentPartition() << ":" << ret);
return ret;
}
开发者ID:markuspf,项目名称:ferret,代码行数:11,代码来源:partition_refinement.hpp
示例14: server_dump
void server_dump(dbase_server *root, int level)
{
int i;
if ((!root) && (!level)) root = servers;
if (root)
{
for (i = 0; i < level; i++) debug_out("| ");
debug_out("%s (%s) - %s\n", root->name, root->numeric, root->desc);
for (i = 0; i < root->children_count; i++)
server_dump(root->children[i], level+1);
}
}
开发者ID:mortenbpost,项目名称:eservices,代码行数:12,代码来源:db_server.c
示例15: InitializeEventHandler_Send
void InitializeEventHandler_Send( void )
{
key_t key;
key = ftok( UI_CTRL_PATHNAME, UI_CTRL_PRJ_ID_OWNER_SIP );
if( ( qidEventSip = msgget( key, 0666 | IPC_CREAT ) ) == -1 ) {
debug_out( "Create Sip event queue fail.\n" );
}
debug_out( "qidEventSip: %d (K:%d)\n", qidEventSip, key );
}
开发者ID:jameshilliard,项目名称:WECB-BH-GPL,代码行数:12,代码来源:ui_event_send.c
示例16: fix_buildingRBase
SplitState fix_buildingRBase(const vec1<int>& fixed_values, bool useOrbits, bool useBlocks, bool useOrbitals, bool rootCall = false)
{
debug_out(3, "scpg", "last depth " << last_depth.get() << " new depth " << fixed_values.size());
D_ASSERT(fixed_values.size() > last_depth.get());
last_depth.set(fixed_values.size());
if(useOrbits)
{
doCacheCheck(config.useOrbits, tracking_first_found_orbits,
[this](const vec1<int>& v){ return this->fillRBaseOrbitPartitionCache(v); },
fixed_values, "orbits");
}
if(useBlocks)
{
doCacheCheck(config.useBlocks, tracking_first_found_blocks,
[this](const vec1<int>& v){ return this->fillRBaseBlocksCache(v); },
fixed_values, "blocks");
}
if(useOrbitals)
{
doCacheCheck(config.useOrbitals, tracking_first_found_orbitals,
[this](const vec1<int>& v){ return this->fillRBaseOrbitalsCache(v); },
fixed_values, "orbitals");
}
SplitState ss(true);
int fixed_size = fixed_values.size();
if(useOrbits)
{
const vec1<int>* part = 0;
if(tracking_first_found_orbits.get() >= 0)
part = this->getRBaseOrbitPartition_cached(tracking_first_found_orbits.get());
else
part = this->getRBaseOrbitPartition_cached(fixed_size);
debug_out(3, "scpg", "fix_rBase:orbits");
if(!part->empty())
ss = filterPartitionStackByFunction(ps, SquareBrackToFunction(part));
if(ss.hasFailed())
return ss;
}
if( ( StabChainConfig::doConsiderIfNonTrivial(config.useOrbitals)
&& fixed_size == tracking_first_found_orbitals.get() ) ||
( config.useOrbitals == StabChainConfig::always ) ||
( rootCall ) )
{ return signal_changed_generic(range1(ps->cellCount()), identityPermutation()); }
return ss;
}
开发者ID:gap-packages,项目名称:ferret,代码行数:53,代码来源:stabchain_perm_group.hpp
示例17: send_usb
// Set the date on the MFD
void out_saitek_t::set_date(int year, int month, int day)
{
if (!a_attached) return;
int res;
if (a_product == x52_other_device) return;
unsigned short datedata = day | (month<<8);
unsigned short yeardata = year;
res = send_usb(0xC4,datedata);
if (res < 0) debug_out(err,"out_saitek: cannot set day to %d and month to %d: %s",day,month,usb_error(res));
res = send_usb(0xC8,yeardata);
if (res < 0) debug_out(err,"out_saitek: cannot set year to %d: %s",year,usb_error(res));
}
开发者ID:adrian-stepien,项目名称:xcontrol,代码行数:13,代码来源:out_saitek.cpp
示例18: debug_out
// Init the library
void out_saitek_t::init(void)
{
debug_out(debug, "out_saitek: searching for a supported Saitek joystick");
bool found = search();
if (found) { // if a joystick was found, attach to it
a_attached = attach();
if (a_attached) {
debug_out(debug, "out_saitek: setting initial brightness and welcome message");
set_display_brightness(0x7F);
set_led_brightness(0x7F);
print(ONLINE_MSG);
}
}
}
开发者ID:adrian-stepien,项目名称:xcontrol,代码行数:15,代码来源:out_saitek.cpp
示例19: filterPartitionStackByFunctionWithCells
SplitState filterPartitionStackByFunctionWithCells(PartitionStack* ps, F f, const Cells& cells)
{
debug_out(3, "filterByFunction", "prestate " << ps->printCurrentPartition());
SplitState ret(false);
if(ps->getAbstractQueue()->hasSortData())
{
// TODO : Use cells
ret = filterPartitionStackByFunction_withSortData(ps, f);
}
else
ret = filterPartitionStackByFunctionWithCells_noSortData(ps, f, cells);
debug_out(3, "filterByFunctionWC", "poststate " << ps->printCurrentPartition() << ":" << ret);
return ret;
}
开发者ID:markuspf,项目名称:ferret,代码行数:14,代码来源:partition_refinement.hpp
示例20: validateFixedCell
bool validateFixedCell(PartitionStack* ps, int cell, int hash, F f)
{
debug_out(3, "filter", "validating fixed cell by hash " << hash);
for(int val : ps->cellRange(cell))
{
if((int)f(val) != hash)
{
debug_out(3, "filter", "error: found " << f(val) << " for " << val);
return false;
}
}
RECORD_STATS(addSortStat(Stats::Sort(ps->cellSize(cell), 1, true)));
return true;
}
开发者ID:markuspf,项目名称:ferret,代码行数:14,代码来源:partition_refinement.hpp
注:本文中的debug_out函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论