当前位置: 首页>>代码示例>>C++>>正文


C++ DEBUG_OUT函数代码示例

本文整理汇总了C++中DEBUG_OUT函数的典型用法代码示例。如果您正苦于以下问题:C++ DEBUG_OUT函数的具体用法?C++ DEBUG_OUT怎么用?C++ DEBUG_OUT使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了DEBUG_OUT函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: DEBUG_OUT

//**************************************************************************
void  iwindow_t::print( void )
{
  DEBUG_OUT("|");
  for (uint32 i = 0; i < m_rob_size; i++) {
    if (m_window[i] != NULL) {
      DEBUG_OUT("X|");
    } else {
      DEBUG_OUT(" |");
    }
  }
  DEBUG_OUT("\n");

  DEBUG_OUT("|");
  for (uint32 i = 0; i < m_rob_size; i++) {
    int  overlap = 0;
    char output  = ' ';
    if ( i == m_last_retired ) {
      overlap++;
      output = 'R';
    }
    if ( i == m_last_scheduled ) {
      overlap++;
      output = 'E';
    }
    if ( i == m_last_decoded ) {
      overlap++;
      output = 'D';
    }
    if ( i == m_last_fetched ) {
      overlap++;
      output = 'F';
    }
    if (overlap > 1) {
      DEBUG_OUT("%.1d|", overlap);
    } else {
      DEBUG_OUT("%c|", output);
    }
  }
  DEBUG_OUT("\n");
}
开发者ID:dberc,项目名称:tpzsimul.gems,代码行数:41,代码来源:iwindow.C

示例2: fmodCreateSoundFromFile

STATUS fmodCreateSoundFromFile( FMOD::System* system, FMOD::Sound** sound, const char* file )
{
    FMOD_RESULT result;
    FMOD_CREATESOUNDEXINFO exInfo;

    void* buff;
    int   length;

    //------------------------------------------------

    if( system == 0 )
    {
        DEBUG_OUT( "system == NULL" );
        return PARAM_NULL_PASSED;
    }

    if( file == 0 )
    {
        DEBUG_OUT( "file == NULL" );
        return PARAM_NULL_PASSED;
    }

    if( !LoadFileIntoMemory( file, &buff, &length ) )
    {
        DEBUG_OUT( "LoadFileIntoMemory failed!" );
        DEBUG_OUT( file );
        return SOUND_FROM_FILE_FAILED;
    }

    memset( &exInfo, 0, sizeof( FMOD_CREATESOUNDEXINFO ) );
    exInfo.cbsize = sizeof( FMOD_CREATESOUNDEXINFO );
    exInfo.length = length;

    result = system->createSound( ( const char* )buff, FMOD_HARDWARE | FMOD_OPENMEMORY, &exInfo, sound );

    if( result != FMOD_OK || sound == 0 )
    {
        if( result != FMOD_OK )
            DEBUG_OUT( FMOD_ErrorString( result ) );
        else
            DEBUG_OUT( "Sound object creation failed!" );

        free( buff );
        return SOUND_CREATION_FAILED;
    }

    free( buff );
    return OK;
}
开发者ID:ssell,项目名称:LearningFMOD,代码行数:49,代码来源:fmod_resources.cpp

示例3: DEBUG_OUT

/**
 * the static callback called by the C-level routines in uv. it's main job is to call a C++ level callback to do the work with higher layers
 *
 * from uv.h
 * typedef void (*uv_connect_cb)(uv_connect_t* req, int status);
 */
void
UVEventLoop::OnConnect(uv_connect_t *req, int status)
{
	DEBUG_OUT("OnConnect() ... " << status);
	UVReader* ocCBp=nullptr;
	if (req) {
		ocCBp=static_cast<UVReader*>(req->data);
	}
	if (ocCBp) {
		ocCBp->client->socket->data = ocCBp;
		if (status >= 0) {
			status = uv_read_start((uv_stream_t*)ocCBp->client->socket, AllocBuffer, OnRead);
		}
		if (ocCBp->connectCB) {
			(*ocCBp->connectCB)(req, status);
		}
//		ocCBp->client->socket->data = ocCBp->readerCB;
//		ocCBp->disposed = true;
	}
}
开发者ID:dakyri,项目名称:unionclient,代码行数:26,代码来源:UVEventLoop.cpp

示例4: DEBUG_OUT

//***************************************************************************************************
bool writebuffer_t::checkOutstandingRequests(pa_t physical_address){
   if(m_use_write_buffer){
       #ifdef DEBUG_WRITE_BUFFER
         DEBUG_OUT("\n***WriteBuffer: checkOutsandingRequests BEGIN\n");
      #endif
    pa_t lineaddr = physical_address & m_block_mask;
    ruby_request_t * miss = static_cast<ruby_request_t*>(m_request_pool->walkList(NULL));
    while (miss != NULL) {
      if ( miss->match( lineaddr ) ) {
         return true;
      }
      miss = static_cast<ruby_request_t*>(m_request_pool->walkList( miss ));
    }
    //    Not found
    return false;
  }
   else{
     return false;
   }
}
开发者ID:gedare,项目名称:GEMS,代码行数:21,代码来源:writebuffer.C

示例5: InitEndpoints

static
void InitEndpoints()
{
  DEBUG_OUT(F("USB InitEndpoints\r\n"));

  // init the first one as a control input
  for (u8 i = 1; i < sizeof(_initEndpoints); i++)
  {
    InitEP(i, pgm_read_byte(_initEndpoints+i), EP_DOUBLE_64); // NOTE:  EP_DOUBLE_64 allocates a 'double bank' of 64 bytes, with 64 byte max length
//    UENUM = i;
//    UECONX = 1;
//    UECFG0X = pgm_read_byte(_initEndpoints+i);
//    UECFG1X = EP_DOUBLE_64;
  }

//  UERST = 0x7E;  // And reset them
//  UERST = 0;

  // TODO:  how do I do this?
}
开发者ID:Sonnenhans,项目名称:arduino,代码行数:20,代码来源:USBCore.cpp

示例6: throw

StreamComponents::SourceDescriptions* 
StreamCCMObjectExecutor::get_all_sources()
throw(CORBA::SystemException)
{
	DEBUG_OUT ("StreamCCMObjectExecutor: get_all_sources() called");

	StreamComponents::SourceDescriptions_var sources = 
        new StreamComponents::SourceDescriptions();
	sources->length (sources_.size());

	for (unsigned int i = 0; i < sources_.size(); i++)
	{
#ifdef MICO_ORB
		sources.inout()[i] = sources_[i]->source_description();
#else
		sources[i] = sources_[i]->source_description();
#endif
	}

	return sources._retn();
}
开发者ID:BackupTheBerlios,项目名称:qedo-svn,代码行数:21,代码来源:StreamCCMObjectExecutor.cpp

示例7: eth_int_task

/**
 * Task for feeding packets from ISR to lwIP
 * Loops forever blocking on queue waiting for next status from ISR
 * @param arg Unused
 */
static void eth_int_task(void* arg){/*{{{*/
    uint32_t status;
    while(1){

        //Loop waiting max time between loops until queue item received
        while(xQueueReceive(eth_int_q_handle, &status, portMAX_DELAY)!=pdPASS);

        tivaif_interrupt(&lwip_netif, status);
        // Reenable interrupts disabled in lwIP_eth_isr()
        MAP_EMACIntEnable(EMAC0_BASE, (EMAC_INT_PHY|
                    EMAC_INT_RECEIVE|
                    EMAC_INT_RX_NO_BUFFER|
                    EMAC_INT_RX_STOPPED|
                    EMAC_INT_TRANSMIT|
                    EMAC_INT_TX_STOPPED));

#if DEBUG_STACK
        DEBUG_OUT("Stack Usage: %s: %d\n", __PRETTY_FUNCTION__, uxTaskGetStackHighWaterMark(NULL));
#endif
    }
}/*}}}*/
开发者ID:GMUCERG,项目名称:xbh,代码行数:26,代码来源:lwip_eth.c

示例8: v3s16

void GridNodeContainer::initNode(v3s16 ipos, PathGridnode *p_node)
{
    INodeDefManager *ndef = m_pathf->m_env->getGameDef()->ndef();
    PathGridnode &elem = *p_node;

    v3s16 realpos = m_pathf->getRealPos(ipos);

    MapNode current = m_pathf->m_env->getMap().getNodeNoEx(realpos);
    MapNode below   = m_pathf->m_env->getMap().getNodeNoEx(realpos + v3s16(0, -1, 0));


    if ((current.param0 == CONTENT_IGNORE) ||
            (below.param0 == CONTENT_IGNORE)) {
        DEBUG_OUT("Pathfinder: " << PP(realpos) <<
                  " current or below is invalid element" << std::endl);
        if (current.param0 == CONTENT_IGNORE) {
            elem.type = 'i';
            DEBUG_OUT(PP(ipos) << ": " << 'i' << std::endl);
        }
        return;
    }

    //don't add anything if it isn't an air node
    if (ndef->get(current).walkable || !ndef->get(below).walkable) {
        DEBUG_OUT("Pathfinder: " << PP(realpos)
                  << " not on surface" << std::endl);
        if (ndef->get(current).walkable) {
            elem.type = 's';
            DEBUG_OUT(PP(ipos) << ": " << 's' << std::endl);
        } else {
            elem.type = '-';
            DEBUG_OUT(PP(ipos) << ": " << '-' << std::endl);
        }
        return;
    }

    elem.valid = true;
    elem.pos   = realpos;
    elem.type  = 'g';
    DEBUG_OUT(PP(ipos) << ": " << 'a' << std::endl);

    if (m_pathf->m_prefetch) {
        elem.directions[DIR_XP] = m_pathf->calcCost(realpos, v3s16( 1, 0, 0));
        elem.directions[DIR_XM] = m_pathf->calcCost(realpos, v3s16(-1, 0, 0));
        elem.directions[DIR_ZP] = m_pathf->calcCost(realpos, v3s16( 0, 0, 1));
        elem.directions[DIR_ZM] = m_pathf->calcCost(realpos, v3s16( 0, 0,-1));
    }
}
开发者ID:minetest,项目名称:minetest,代码行数:48,代码来源:pathfinder.cpp

示例9: DEBUG_OUT

ContainerInterfaceImpl::~ContainerInterfaceImpl()
{
	DEBUG_OUT ("ContainerInterfaceImpl: Destructor called");

	QedoLock lock (service_references_mutex_);

	service_references_.clear();
	
	component_server_->_remove_ref();

	/* stop the event thread */
	if ( event_queue_thread_ )
	{
		event_queue_mutex_.lock_object();
		event_queue_stopping_ = true;
		event_queue_cond_.signal();
		event_queue_mutex_.unlock_object();
		event_queue_thread_->join();
		delete event_queue_thread_;
	}
}
开发者ID:BackupTheBerlios,项目名称:qedo-svn,代码行数:21,代码来源:ContainerInterfaceImpl.cpp

示例10: DEBUG_OUT

////////////////////////////////////////////////////////////////////////////////
//to obtain a storage home instance, it raises NotFound if it cannot find a 
//storage home that matches the given storage_home_id
////////////////////////////////////////////////////////////////////////////////
StorageHomeBase_ptr 
CatalogBaseImpl::find_storage_home(const char* storage_home_id)
{
	DEBUG_OUT("CatalogBaseImpl::find_storage_home() is called");
	
	//find it in the list
	StorageHomeBase_var pHomeBase = StorageHomeBase::_nil();
	for( homeBaseIter_=lHomeBases_.begin(); homeBaseIter_!=lHomeBases_.end(); homeBaseIter_++ )
	{
		const char* szHomeName = (*homeBaseIter_)->getStorageHomeName();
		
		if(strcmp(szHomeName, storage_home_id)==0)
		{
			pHomeBase = StorageHomeBase::_duplicate((*homeBaseIter_));
			return pHomeBase._retn();
		}
	}
	
	//check it whether in the database
	std::string strHomeID = storage_home_id;
	strHomeID = convert2Lowercase(strHomeID);
	if( IsConnected()==FALSE || IsTableExist(strHomeID.c_str())==FALSE )
		throw CosPersistentState::NotFound();

	//if not in the list, new one.
	StorageHomeFactory factory = NULL;
	factory = pConnector_->register_storage_home_factory(storage_home_id, factory);
	if( factory==NULL )
		throw CosPersistentState::NotFound();

	StorageHomeBaseImpl* pHomeBaseImpl = factory->create();
	//factory->_remove_ref();

	pHomeBaseImpl->Init(this, storage_home_id);

	lHomeBases_.push_back(pHomeBaseImpl); // deep copy or?
	pHomeBase = StorageHomeBase::_duplicate(pHomeBaseImpl);

	return pHomeBase._retn();
}
开发者ID:BackupTheBerlios,项目名称:qedo-svn,代码行数:44,代码来源:Catalog.cpp

示例11: DEBUG_OUT

STDMETHODIMP
HXASMStream::Subscribe(UINT16 uRuleNumber)
{
    HX_RESULT lResult = HXR_OK;

    DEBUG_OUT(m_pEM, DOL_ASM, (s, "(%p)Subscribe: Stream=%d Rule=%d", m_pSource, m_uStreamNumber, uRuleNumber));

    if (m_pRuleSubscribeStatus)
    {
	m_pRuleSubscribeStatus[uRuleNumber] = TRUE;
    }
    
    if (m_pASMRuleState)
    {
	m_pASMRuleState->CompleteSubscribe(uRuleNumber);
	m_pASMRuleState->StartUnsubscribePending(uRuleNumber);
    }

    if (m_pAtomicRuleChange)
    {
	lResult = HXR_OK;
    }
    else if (m_pASMSource)
    {
	lResult = m_pASMSource->Subscribe(m_uStreamNumber, uRuleNumber); 
    }
    if ((lResult == HXR_OK) && m_pStreamSinkMap)
    {
	CHXMapPtrToPtr::Iterator lIterator =  m_pStreamSinkMap->Begin();
	for (;	(lIterator != m_pStreamSinkMap->End()) && lResult == HXR_OK; 
		++lIterator)
	{
	    IHXASMStreamSink* pASMStreamSink = 
		    (IHXASMStreamSink*) *lIterator;
	    lResult = pASMStreamSink->OnSubscribe(uRuleNumber);
	}
    }
    
    return lResult;
}
开发者ID:muromec,项目名称:qtopia-ezx,代码行数:40,代码来源:hxsmstr.cpp

示例12: lock

Components::CCMObject_ptr
HomeServantBase::lookup_component (const PortableServer::ObjectId& object_id)
{
	CORBA::OctetSeq_var foreign_key_seq = Key::key_value_from_object_id (object_id);
	CORBA::OctetSeq_var our_key_seq;
	CORBA::Object_ptr obj;


	{
		//
		// Do not keep this lock for a long time, it will block other operations
		// (do not wait for narrow below)
		//
		QedoLock lock (component_instances_mutex_);

		std::vector <ComponentInstance>::iterator components_iter;

		for (components_iter = component_instances_.begin(); 
			 components_iter != component_instances_.end(); 
			 components_iter++)
		{
			our_key_seq = Key::key_value_from_object_id ((*components_iter).object_id_);

			if (Qedo::compare_OctetSeqs (foreign_key_seq, our_key_seq))
			{
				break;
			}
		}

		if (components_iter == component_instances_.end())
		{
			DEBUG_OUT ("HomeServantBase: Unknown object id requested in lookup_component");
			throw CORBA::OBJECT_NOT_EXIST();
		}

		obj = (*components_iter).component_ref_.in();
	}

	return Components::CCMObject::_narrow(obj);
}
开发者ID:BackupTheBerlios,项目名称:qedo-svn,代码行数:40,代码来源:HomeServantBase.cpp

示例13: start_xbhserver

/**
 * Starts XBHServer task
 */
void start_xbhserver(void){/*{{{*/
    int retval;

    xbh_hndlr_to_srv_q_handle = xQueueCreate(15, sizeof(struct xbh_hndlr_to_srv_msg));
    xbh_srv_to_hndlr_q_handle = xQueueCreate(1, sizeof(struct xbh_srv_to_hndlr_msg));

    DEBUG_OUT("Starting XBH task\n");
    retval = xTaskCreate( xbh_srv_task,
            "xbh_srv",
            XBH_SRV_STACK,
            NULL,
            XBH_SRV_PRIO,
            &xbh_srv_task_handle);
    LOOP_ERRMSG(retval != pdPASS, "Could not create xbh server task\n");
    retval = xTaskCreate( xbh_hndlr_task,
            "xbh_hndlr",
            XBH_HNDLR_STACK,
            NULL,
            XBH_SRV_PRIO,
            &xbh_hndlr_task_handle);
    LOOP_ERRMSG(retval != pdPASS, "Could not create xbh handler task\n");
}/*}}}*/
开发者ID:GMUCERG,项目名称:xbh,代码行数:25,代码来源:xbh_server.c

示例14: hsx_fuse_mkdir

void hsx_fuse_mkdir(fuse_req_t req, fuse_ino_t parent, const char *name,
	       	mode_t mode)
{	
	int err = 0;
	struct hsfs_inode *hi_parent = NULL;
	struct hsfs_inode *new = NULL;
	struct fuse_entry_param e;
	struct hsfs_super *sb = NULL;
	const char *dirname = name;
	DEBUG_IN("ino:%lu.\n", parent);

	memset(&e, 0, sizeof(struct fuse_entry_param));

	sb = fuse_req_userdata(req);
	hi_parent = hsx_fuse_iget(sb, parent);
	
	if(NULL == sb) {
		ERR("ERR in fuse_req_userdata");
		goto out;
	}
	if(NULL == hi_parent) {
		ERR("ERR in hsx_fuse_iget");
		goto out;
	}

	
	err = hsi_nfs3_mkdir(hi_parent, &new, dirname, mode);
	if(0 != err ) {
		fuse_reply_err(req, err);
		goto out;
	}else {
		hsx_fuse_fill_reply(new, &e);
		fuse_reply_entry(req, &e);
		goto out;
	}
out:
	DEBUG_OUT(" out errno is: %d\n", err);
	return;
};
开发者ID:EricRun,项目名称:hsfs,代码行数:39,代码来源:hsx_fuse_mkdir.c

示例15: throw

void
StorageHomeBaseImpl::destroyObject( Pid* pPid ) 
	throw (CORBA::SystemException)
{
	DEBUG_OUT("StorageHomeBaseImpl::destroyObject() is called");

	std::string strPid = convertPidToString( pPid );

	std::string strSqlDel;
	strSqlDel = "DELETE FROM ";
	strSqlDel += strHomeName_;
	strSqlDel += " WHERE pid LIKE \'";
	strSqlDel += strPid;
	strSqlDel += "\';";
	strSqlDel += "DELETE FROM pid_content WHERE pid LIKE \'";
	strSqlDel += strPid;
	strSqlDel += "\';";

	//CatalogBaseImpl* pCatalogBaseImpl = dynamic_cast <CatalogBaseImpl*> (pCatalogBase_.in());
	CatalogBaseImpl* pCatalogBaseImpl = dynamic_cast <CatalogBaseImpl*> (pCatalogBase_);
	pCatalogBaseImpl->ExecuteSQL(strSqlDel.c_str());
}
开发者ID:BackupTheBerlios,项目名称:qedo-svn,代码行数:22,代码来源:StorageHomeBase.cpp


注:本文中的DEBUG_OUT函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。