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


C++ DEBUG_MESSAGE函数代码示例

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


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

示例1: glLinkProgram

void ShaderProgram::Link()
{
    glLinkProgram( handle_ );
    GLint status;
    glGetProgramiv( handle_, GL_LINK_STATUS, &status );
    if( status == GL_FALSE ){
        linked_ = false;
        DEBUG_MESSAGE("Failed to link shader program");
        GLint log_length;
        glGetProgramiv( handle_, GL_INFO_LOG_LENGTH, &log_length );
        if( log_length > 0 ){
            char *log = new char[log_length];
            GLsizei written;
            glGetProgramInfoLog(handle_, log_length, &written, log);
            DEBUG_MESSAGE(log);
            delete[] log;
        }
    }else{
        linked_ = true;
        DEBUG_MESSAGE("Shader program linked successfully.");
    }
}
开发者ID:vitorog,项目名称:shade-framework,代码行数:22,代码来源:shader_program.cpp

示例2: DEBUG_MESSAGE

void GameLogic::AddObject( GameObject* n_object )
{
	m_objects.push_back(std::shared_ptr<GameObject>(n_object));

	// sort; as finding will require a sorted set
	std::sort(m_objects.begin(),m_objects.end(),
		[](const std::shared_ptr<GameObject> & a, const std::shared_ptr<GameObject> & b)->bool
		{
			return a->GetID() < b->GetID();
		});

	DEBUG_MESSAGE("Added object with ID " << n_object->GetID());
}
开发者ID:inosms,项目名称:innocence,代码行数:13,代码来源:GameLogic.cpp

示例3: DEBUG_MESSAGE

void EventGoersView::refresh(){
  eventGoersModel->setQuery(
    "SELECT " + 
    DataStore::getEventGoerUsernameColName() + ", " +
    DataStore::getEventGoersIdColName() +
    " FROM " + DataStore::getEventGoersTableName() + 
    " WHERE " + DataStore::getEventGoerStateColName() + 
    "=\"" + DataStore::getEventGoerInEventState() + "\";",
    dataStore->getDatabaseConnection());
  if(eventGoersModel->lastError().type() != QSqlError::NoError){
    DEBUG_MESSAGE("Event goeres error: " <<eventGoersModel->lastError().text().toStdString())
  }
}
开发者ID:houdekk,项目名称:UDJ,代码行数:13,代码来源:EventGoersView.cpp

示例4: _Unwind_GetLanguageSpecificData

//
// Called by personality handler during phase 2 to get LSDA for current frame
//
EXPORT uintptr_t _Unwind_GetLanguageSpecificData(struct _Unwind_Context* context)
{
	unw_cursor_t* cursor = (unw_cursor_t*)context;
	unw_proc_info_t frameInfo;
	uintptr_t result = 0;
	if ( unw_get_proc_info(cursor, &frameInfo) == UNW_ESUCCESS ) 
		result = frameInfo.lsda;
	DEBUG_PRINT_API("_Unwind_GetLanguageSpecificData(context=%p) => 0x%lX\n", context, result);
	if ( result != 0 ) {
		if ( *((uint8_t*)result) != 0xFF ) 
			DEBUG_MESSAGE("lsda at 0x%lX does not start with 0xFF\n", result);
	}
	return result;
}
开发者ID:ice799,项目名称:lldb,代码行数:17,代码来源:UnwindLevel1.c

示例5: hexter_get_program

/*
 * hexter_get_program
 *
 * implements DSSI (*get_program)()
 */
const DSSI_Program_Descriptor *
hexter_get_program(LADSPA_Handle handle, unsigned long index)
{
    hexter_instance_t *instance = (hexter_instance_t *)handle;
    static DSSI_Program_Descriptor pd;

    DEBUG_MESSAGE(DB_DSSI, " hexter_get_program called with %lu\n", index);

    if (index < 128) {
        hexter_instance_set_program_descriptor(instance, &pd, 0, index);
        return &pd;
    }
    return NULL;
}
开发者ID:kleopatra999,项目名称:hexter,代码行数:19,代码来源:hexter.c

示例6: DEBUG_MESSAGE

void ParseThread::ProcessIncludes(ParseRequest* req)
{
	DEBUG_MESSAGE( wxString::Format(wxT("ProcessIncludes -> started")) ) ;
    
    std::set<std::string> *newSet = new std::set<std::string>();
	FindIncludedFiles(req, newSet);

#ifdef PARSE_THREAD_DBG
	std::set<std::string>::iterator iter = newSet->begin();
	for(; iter != newSet->end(); iter++) {
		wxString fileN((*iter).c_str(), wxConvUTF8);
		DEBUG_MESSAGE( wxString::Format(wxT("ParseThread::ProcessIncludes -> %s"), fileN.c_str() ) );
	}
#endif

	// collect the results
    if ( req->_evtHandler ) {
        wxCommandEvent event(wxEVT_PARSE_THREAD_SCAN_INCLUDES_DONE);
        event.SetClientData(newSet);
        event.SetInt((int)req->_quickRetag);
        req->_evtHandler->AddPendingEvent(event);
    }
}
开发者ID:AndrianDTR,项目名称:codelite,代码行数:23,代码来源:parse_thread.cpp

示例7: PrintMessage

Skeleton KinectComp::GetSkeleton(unsigned long id)
{
	if (mpKinect == NULL)
	{
		PrintMessage(DEBUG_MESSAGE("Can't get a handle of Kinect API").c_str());
		Skeleton skel;
		const Position invalidPosition(std::numeric_limits<float>::quiet_NaN()
			, std::numeric_limits<float>::quiet_NaN()
			, std::numeric_limits<float>::quiet_NaN());
		skel.result = Skeleton::NOT_TRACKED;
		skel.position = invalidPosition;
		for (int i = 0; i < Skeleton::JOINT_COUNT; i++)
		{
			skel.joints[i] = invalidPosition;
		}
		return skel;
	}

	Skeleton skel(id);
	if (mpKinect->GetSkeleton(skel, id) != API_SUCCESS)
	{
		PrintMessage(DEBUG_MESSAGE("Can't get skeleton").c_str());
		const Position invalidPosition(std::numeric_limits<float>::quiet_NaN()
			, std::numeric_limits<float>::quiet_NaN()
			, std::numeric_limits<float>::quiet_NaN());
		skel.userID = id;
		skel.result = Skeleton::NOT_TRACKED;
		skel.position = invalidPosition;
		for (int i = 0; i < Skeleton::JOINT_COUNT; i++)
		{
			skel.joints[i] = invalidPosition;
		}
	}

	return skel;
}
开发者ID:OPRoS,项目名称:Component,代码行数:36,代码来源:KinectComp.cpp

示例8: DEBUG_MESSAGE

	void OpenNINetwork::Release()
	{
#ifdef NETWORK_USE_THREAD
		if( mIsServer && mIsRunning )
		{
			DEBUG_MESSAGE( "Stop running thread on network\n" );
			assert( _thread );
			mIsRunning = false;
			//_thread->join();
			_thread.reset();
		}
#endif
		::closesocket( mSocketId );
		::WSACleanup();
	}
开发者ID:timmb,项目名称:HarmonicMotion,代码行数:15,代码来源:VOpenNINetwork.cpp

示例9: abort_endpoint

NTSTATUS abort_endpoint(libusb_device_t *dev, int endpoint, int timeout)
{
  NTSTATUS status = STATUS_SUCCESS;
  URB urb;

  DEBUG_PRINT_NL();
  DEBUG_MESSAGE("abort_endpoint(): endpoint 0x%02x\n", endpoint);
  DEBUG_MESSAGE("abort_endpoint(): timeout %d\n", timeout);

  memset(&urb, 0, sizeof(struct _URB_PIPE_REQUEST));

  if(!dev->config.value)
    {
      DEBUG_ERROR("abort_endpoint(): invalid configuration 0");
      return STATUS_INVALID_DEVICE_STATE;
    }

  if(!get_pipe_handle(dev, endpoint, &urb.UrbPipeRequest.PipeHandle))
    {
      DEBUG_ERROR("abort_endpoint(): getting endpoint pipe failed");
      return STATUS_INVALID_PARAMETER;
    }

  urb.UrbHeader.Length = (USHORT) sizeof(struct _URB_PIPE_REQUEST);
  urb.UrbHeader.Function = URB_FUNCTION_ABORT_PIPE;

  status = call_usbd(dev, &urb, IOCTL_INTERNAL_USB_SUBMIT_URB, timeout);
  
  if(!NT_SUCCESS(status) || !USBD_SUCCESS(urb.UrbHeader.Status))
    {
      DEBUG_ERROR("abort_endpoint(): request failed: status: 0x%x, "
                  "urb-status: 0x%x", status, urb.UrbHeader.Status);
    }
  
  return status;
}
开发者ID:btaratutin,项目名称:PIC--Microcontroller--Debugger,代码行数:36,代码来源:abort_endpoint.c

示例10: switch

bool 
ShaderImpl_DirectX9::Compile(const char *code, int type)
{
	if (!code) return false;

	LPD3DXBUFFER pCode = NULL;
	LPD3DXBUFFER pError = NULL;
	switch(type)
	{
	case Shader::TYPE_VERTEX:
		{
			if (D3DXCompileShader(code, strlen(code), NULL, NULL, "vs_main", "vs_2_0", 0, &pCode, &pError, &_vs_constTable) < 0)
			{
				DEBUG_MESSAGE((char *)pError->GetBufferPointer());
				return false;
			}
			setupConstantData(UNIFORM_VS, _vs_constTable);
			DrawManager::GetDeviceHandle()->CreateVertexShader(
				reinterpret_cast<DWORD*>(pCode->GetBufferPointer()), &_vertexShader);
			pCode->Release();
		} return true;
	case Shader::TYPE_PIXEL:
		{
			if (D3DXCompileShader(code, strlen(code), NULL, NULL, "ps_main", "ps_3_0", 0, &pCode, &pError, &_ps_constTable) < 0)
			{
				DEBUG_MESSAGE((char *)pError->GetBufferPointer());
				return false;
			}
			setupConstantData(UNIFORM_PS, _ps_constTable);
			DrawManager::GetDeviceHandle()->CreatePixelShader(
				reinterpret_cast<DWORD*>(pCode->GetBufferPointer()), &_pixelShader);
			pCode->Release();
		} return true;
	default: return false;
	}
}
开发者ID:rasidin,项目名称:LimitEngine,代码行数:36,代码来源:LE_ShaderImpl_DirectX9.cpp

示例11: pop_input

static void
pop_input (void)
{
  input_block *tmp = isp->prev;

  switch (isp->type)
    {
    case INPUT_STRING:
    case INPUT_MACRO:
      break;

    case INPUT_FILE:
      if (debug_level & DEBUG_TRACE_INPUT)
        {
          if (tmp)
            DEBUG_MESSAGE2 ("input reverted to %s, line %d",
                            tmp->file, tmp->line);
          else
            DEBUG_MESSAGE ("input exhausted");
        }

      if (ferror (isp->u.u_f.fp))
        {
          M4ERROR ((warning_status, 0, "read error"));
          if (isp->u.u_f.close)
            fclose (isp->u.u_f.fp);
          retcode = EXIT_FAILURE;
        }
      else if (isp->u.u_f.close && fclose (isp->u.u_f.fp) == EOF)
        {
          M4ERROR ((warning_status, errno, "error reading file"));
          retcode = EXIT_FAILURE;
        }
      start_of_input_line = isp->u.u_f.advance;
      output_current_line = -1;
      break;

    default:
      M4ERROR ((warning_status, 0,
                "INTERNAL ERROR: input stack botch in pop_input ()"));
      abort ();
    }
  obstack_free (current_input, isp);
  next = NULL; /* might be set in push_string_init () */

  isp = tmp;
  input_change = true;
}
开发者ID:huther,项目名称:personal_projects,代码行数:48,代码来源:input.c

示例12: readMessage

int readMessage(MessageContainer* container, int fd)
{
    int result;
    char readChar;
    
    DEBUG(2, "reading fifo");
    while ((result = read(fd, &readChar, 1u)) == 1u)
    {
        if (readChar != '\n')
        {
            readBuffer[readBufferPos] = readChar;
            readBufferPos += 1;
            
            if (readBufferPos == READ_BUFFER_SIZE)
            {
                perror("message too long!!!");
                return -1;
            }
        }
        else
        {
            size_t dataLength;
            unsigned char *decodedData;
            
            readBuffer[readBufferPos] = '\0';
            DEBUG(2, "message received:");
            DEBUG(2, readBuffer);
            
            DEBUG(3, "decoding data");
            decodedData = base64_decode(readBuffer, readBufferPos, &dataLength);
            memcpy((void*)container, 
                   (void*)decodedData, 
                   (dataLength <= sizeof(MessageContainer) ? dataLength : sizeof(MessageContainer)));
            free(decodedData);
            DEBUG_MESSAGE(3, container);
            
            readBufferPos = 0;
            return 1;
        }
    }
    
    /*if (result == -1)
    {
        ERROR("error reading fifo");
    }*/
    
    return result;
}
开发者ID:strahlex,项目名称:connect-four,代码行数:48,代码来源:interface_fifo.c

示例13: lsapi_activate_user_ini_finally

static int lsapi_activate_user_ini_finally(_lsapi_activate_user_ini_ctx *ctx,
                                           void* next)
{
    int rc = SUCCESS;
    fn_activate_user_ini_chain_t *fn_next = next;

    DEBUG_MESSAGE("calling php_ini_activate_config()");
    php_ini_activate_config(&ctx->entry->user_config, PHP_INI_PERDIR,
                            PHP_INI_STAGE_HTACCESS);

    if (*fn_next) {
        rc = (*fn_next)(ctx, fn_next + 1);
    }

    return rc;
}
开发者ID:RyanNerd,项目名称:php-src,代码行数:16,代码来源:lsapi_main.c

示例14: ADCCallback

/* Callback from the ADC device */
static void ADCCallback(void *pCBParam, uint32_t Event, void *pArg)
{
    switch (Event)
    {
    case ADI_ADC_EVENT_BUFFER_PROCESSED:
             adi_gpio_SetHigh(LED4);
             adi_gpio_SetLow(DBG_ADC_PIN);
               
             DEBUG_MESSAGE("%d,%d\n",cnt_samples,ADC_DataBuffer[0]);        
             cnt_samples++;
        break;

    default:
        break;
    }
}
开发者ID:arvindnataraj,项目名称:airqsensorOptimise,代码行数:17,代码来源:optimizeActiveCurrent.c

示例15: parse_edid

/*
 * This function should locate every segment of EDID with understandable blocks and return
 * the next segment number, or zero if finished.
 */
DEPLINT parse_edid(EdidInfo e,BYTE *d)
{
	DEPLINT i;

	if (!((d[0] == 0)||(d[0] == 2)||(d[0] == 0xF0)||(d[0x80] == 0)||(d[0x80] == 2)||(d[0x80] == 0xF0)))
	{
		ERROR_MESSAGE("Error: Trying to parse edid segment with no valid blocks");

		// to keep from returning a strange value
		segment_number[0] = 0;
		segment_number_counter = 0;
	}

	if ((d[0]==0) && (d[1]==0xFF))
	{
		parse_0_block(e,d);
		if (e->edid_extensions <= 1)
			segment_number[0] = 0;
		segment_number_counter = 0;
	}

	if (d[0x00]==0xF0)
	{
		parse_block_map(d,0x00);
	}

	if (d[0x80]==0xF0)
	{
		parse_block_map(d,0x80);
	}

	for (i = 0; i < 2; i++)
	{
		if ((d[i*0x80])==0x2)
		{
			DEBUG_MESSAGE("cea extension block found\n");
			parse_cea_block(e,d,i*0x80);
		}
	}

	if ((segment_number[segment_number_counter]==0)&&(e->edid_extensions>127))
		return 0x40;
	else
		segment_number_counter++;

        return segment_number[segment_number_counter-1];
}
开发者ID:Vincentxiaojie,项目名称:xpenology,代码行数:51,代码来源:edid_parse.c


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