void GaussianListener::notifyMaterialSetup(Ogre::uint32 pass_id, Ogre::MaterialPtr &mat) { // Prepare the fragment params offsets switch(pass_id) { case 701: // blur horz { // horizontal bloom mat->load(); Ogre::GpuProgramParametersSharedPtr fparams = mat->getBestTechnique()->getPass(0)->getFragmentProgramParameters(); const Ogre::String& progName = mat->getBestTechnique()->getPass(0)->getFragmentProgramName(); UNREFERENCED_PARAM(progName); fparams->setNamedConstant("sampleOffsets", mBloomTexOffsetsHorz[0], 15); fparams->setNamedConstant("sampleWeights", mBloomTexWeights[0], 15); break; } case 700: // blur vert { // vertical bloom mat->load(); Ogre::GpuProgramParametersSharedPtr fparams = mat->getTechnique(0)->getPass(0)->getFragmentProgramParameters(); const Ogre::String& progName = mat->getBestTechnique()->getPass(0)->getFragmentProgramName(); UNREFERENCED_PARAM(progName); fparams->setNamedConstant("sampleOffsets", mBloomTexOffsetsVert[0], 15); fparams->setNamedConstant("sampleWeights", mBloomTexWeights[0], 15); break; } } }
//--------------------------------------------------------------------------- int dcl_set_nostep(PARAM_T *p, PARAM_T *q) { UNREFERENCED_PARAM(p); UNREFERENCED_PARAM(q); STEP = 0; return(DCL_OK); }
//--------------------------------------------------------------------------- int dcl_set_noon(PARAM_T *p, PARAM_T *q) { UNREFERENCED_PARAM(p); UNREFERENCED_PARAM(q); dcl[D].ON = 0; return(0); }
void ChatSession::OnOutgoingTextChannelReady(Tp::PendingOperation* op) { if (op->isError()) { state_ = STATE_ERROR; QString message = "Text channel cannot become ready for ChatSession object."; LogError(message.toStdString()); return; } LogDebug("Outgoing text channel is ready."); Tp::PendingReady *pr = qobject_cast<Tp::PendingReady *>(op); Tp::TextChannelPtr channel = Tp::TextChannelPtr(qobject_cast<Tp::TextChannel *>(pr->object())); tp_text_channel_ = channel; QStringList interfaces = tp_text_channel_->interfaces(); for (QStringList::iterator i = interfaces.begin(); i != interfaces.end(); ++i) { QString line = "Text channel have interface: "; line.append(*i); LogDebug(line.toStdString()); } // Tp::ContactPtr initiator = tp_text_channel_->initiatorContact(); bool have_message_capabilities = tp_text_channel_->isReady(Tp::TextChannel::FeatureMessageCapabilities); bool have_message_queue = tp_text_channel_->isReady(Tp::TextChannel::FeatureMessageQueue); bool have_message_sent_signal = tp_text_channel_->isReady(Tp::TextChannel::FeatureMessageSentSignal); UNREFERENCED_PARAM(have_message_capabilities); UNREFERENCED_PARAM(have_message_queue); UNREFERENCED_PARAM(have_message_sent_signal); //if (!have_message_capabilities) //{ // LogError("Text channel doesn't have the message capabilities!"); // state_ = STATE_ERROR; // return; //} connect(tp_text_channel_.data(), SIGNAL( messageReceived(const Tp::ReceivedMessage &) ), SLOT( OnMessageReceived(const Tp::ReceivedMessage &) )); connect(tp_text_channel_.data(), SIGNAL( pendingMessageRemoved(const Tp::ReceivedMessage &) ), SLOT( OnChannelPendingMessageRemoved(const Tp::ReceivedMessage &) )); HandlePendingMessage(); state_ = STATE_OPEN; emit Opened(this); for (QStringList::iterator i = send_buffer_.begin(); i != send_buffer_.end(); ++i) { QString text = *i; SendChatMessage(text); } }
bool OgreMeshAsset::SerializeTo(std::vector<u8> &data, const QString &serializationParameters) const { UNREFERENCED_PARAM(serializationParameters); if (ogreMesh.isNull()) { LogWarning("OgreMeshAsset::SerializeTo: Tried to export non-existing Ogre mesh " + Name() + "."); return false; } try { Ogre::MeshSerializer serializer; QString tempFilename = assetAPI->GenerateTemporaryNonexistingAssetFilename(Name()); // Ogre has a limitation of not supporting serialization to a file in memory, so serialize directly to a temporary file, // load it up and delete the temporary file. serializer.exportMesh(ogreMesh.get(), tempFilename.toStdString()); bool success = LoadFileToVector(tempFilename.toStdString().c_str(), data); QFile::remove(tempFilename); // Delete the temporary file we used for serialization. return success; } catch(const std::exception &e) { LogError("OgreMeshAsset::SerializeTo: Failed to export Ogre mesh " + Name() + ": " + (e.what() ? QString(e.what()) : "")); } return false; }
//--------------------------------------------------------------------------- int dcl_set_noverify(PARAM_T *p, PARAM_T *q) { char param[MAX_TOKEN]; UNREFERENCED_PARAM(q); if (p == NULL) return(DCL_ERROR); *param = 0; dcl_string(p[1].value,param,MAX_TOKEN); if (*param){ if (strncasecmp(param,"PROCEDURE",9)==0) verify &= ~VERIFY_PROC; else if (strncasecmp(param,"NOPROCEDURE",11)==0) verify |= VERIFY_PROC; else if (strncasecmp(param,"IMAGE",5)==0) verify &= ~VERIFY_IMAGE; else if (strncasecmp(param,"NOIMAGE",7)==0) verify |= VERIFY_IMAGE; else { (void) dcl_printf(dcl[D].SYS_OUTPUT,"Invalid keyword.\n"); _SEVERITY = 2; _STATUS = 19; return(-1); } } else verify = 0; return(0); }
/////////////////////////////////////////////////////////////////////////////// // Attach - Associate an observer with this subject Error CSubject::Attach(IObserver* pObserver, System::Types::BitMask inInterest, u32 uID, u32 shift) { // To make compiler happy in release builds while keeping the next assertion UNREFERENCED_PARAM (shift); // If the following assertion fails, it means that Change Control Manager (CCM) // was modified to start using "shifts". Please update the code of this class // appropriately (original version did not have any meaningful support except // shifting inInterest on entry) ASSERT (!shift && "CSubject::Attach: Interest bits are shifted. Read the comment to this assertion"); // Since the intended usage model is to use this method from CCMs only, and // their implementation provided by this framework ensures that pObs in nonzero // the following assertion should suffice. ASSERT( pObserver && "CSubject::Attach: Valid pointer to observer object must be specified" ); #if SUPPORT_CONCURRENT_ATTACH_DETACH_TO_SUBJECTS SpinWait::Lock lock(m_observerListMutex); #endif // Framework's CCM implementation ensures that the following assertion always holds ASSERT( std::find(m_observerList.begin(), m_observerList.end(), pObserver) == m_observerList.end() && "CSubject::Attach: Observer has already been attached. Use CSubject::UpdateInterestBits instead." ); // Add the observer to our list of observers m_observerList.push_back( ObserverRequest(pObserver, inInterest, uID) ); return Errors::Success; }
void TreeScene::GetProperties( Properties::Array& Properties ) { UNREFERENCED_PARAM( Properties ); //// //// Get the index of our first item. //// //i32 iProperty = static_cast<i32>(Properties.size()); //// //// Add all the properties. //// //Properties.reserve( Properties.size() + Property_Count ); //for ( i32 i=0; i < Property_Count; i++ ) //{ // Properties.push_back( sm_kaDefaultProperties[ i ] ); //} //// //// Modify the default values. //// }
/////////////////////////////////////////////////////////////////////////////// // GetProperties - Properties for this System are returned in Properties void HavokPhysicsSystem::GetProperties( Properties::Array& Properties ) { UNREFERENCED_PARAM( Properties ); }
bool CSockMgr::CloseSockets() { std::vector<GLSock::CGLSock*>::iterator itr; try { for( itr = m_vecSocks.begin(); itr != m_vecSocks.end(); itr++ ) { (*itr)->Close(); delete *itr; } m_vecSocks.clear(); m_IOService.stop(); } catch (boost::exception& ex) { #if defined(_DEBUG) std::cout << "Dirty cleanup: " << boost::diagnostic_information(ex).c_str() << std::endl; #endif UNREFERENCED_PARAM(ex); } return true; }
void TreeSystem::GetProperties( Properties::Array& Properties ) { UNREFERENCED_PARAM( Properties ); }
/////////////////////////////////////////////////////////////////////////////// // DllMain - API entry point for SystemExplosion DLL BOOL APIENTRY DllMain( HMODULE hModule, DWORD Reason, LPVOID pReserved ) { UNREFERENCED_PARAM( hModule ); UNREFERENCED_PARAM( pReserved ); switch ( Reason ) { case DLL_PROCESS_ATTACH: case DLL_THREAD_ATTACH: case DLL_THREAD_DETACH: case DLL_PROCESS_DETACH: break; } return TRUE; }
//--------------------------------------------------------------------------- int dcl_set_dosvar(PARAM_T *p, PARAM_T *q) { char name[MAX_TOKEN]; char value[MAX_TOKEN]; char work[MAX_TOKEN]; char *ch; UNREFERENCED_PARAM(q); if (p == NULL) return(DCL_ERROR); ch = dcl_get_token(p[0].expr,work); ch = dcl_get_token(ch,work); dcl_string(work,name,MAX_TOKEN); dcl_get_param(ch,work); (void) dcl_get_token(work,value); #ifdef _WIN32 (void)sprintf(work,"%s=%s",name,value); (void)putenv(work); #else (void)setenv(name, value, 1); (void)sprintf(work,"export %s=%s",name,value); system(work); #endif return(DCL_OK); }
//--------------------------------------------------------------------------- int dcl_set_prompt(PARAM_T *p, PARAM_T *q) { char param[MAX_TOKEN]; char work[MAX_TOKEN]; char *c; UNREFERENCED_PARAM(q); if (p == NULL) return(DCL_ERROR); *param = 0; c = p[1].expr; if (c != NULL) { c = cmd_find_token(c); if (*c == '=') { c = &c[1]; } if (*c) { c = cmd_get_token(c,work); dcl_string(work,param,MAX_TOKEN); } } if (strlen(param)){ strncpy(dcl_prompt,param,32); dcl_prompt[32] = 0; } else strcpy(dcl_prompt,"$ "); // strcat(dcl_prompt," "); strcpy(dcl_org_prompt,dcl_prompt); dcl_interprete_prompt(dcl_org_prompt,dcl_prompt); return(0); }
void OGREGraphicsObject::Update( f32 DeltaTime ) { UNREFERENCED_PARAM( DeltaTime ); return; }
void TreeSystem::SetProperties( Properties::Array Properties ) { UNREFERENCED_PARAM( Properties ); ASSERT( m_bInitialized ); }
const void* TreeScene::GetSystemChangeData( System::Change SystemChange ) { UNREFERENCED_PARAM( SystemChange ); return NULL; }
int dcl_then(PARAM_T *p,PARAM_T *q) { char token[MAX_TOKEN]; char *ch; UNREFERENCED_PARAM(p); UNREFERENCED_PARAM(q); NEXT_LINE(); if (cmd[C].subr) return(DCL_OK); if (!dcl[D].cc[dcl[D].ccl]) return(DCL_OK); ch = dcl_get_token(dcl_line,token); if (*token) { strcpy(dcl_line,ch); (void) dcl_process_command_line(2); } return(DCL_OK); }
CPLErr VRTWarpedDataset::AddBand( GDALDataType eType, char **papszOptions ) { UNREFERENCED_PARAM( papszOptions ); SetBand( GetRasterCount() + 1, new VRTWarpedRasterBand( this, GetRasterCount() + 1, eType ) ); return CE_None; }
void CALLBACK time_thread_proc(UINT wTimerID, UINT msg, DWORD_PTR dwUser, DWORD_PTR dw1, DWORD_PTR dw2) { UNREFERENCED_PARAM(wTimerID); UNREFERENCED_PARAM(msg); UNREFERENCED_PARAM(dw1); UNREFERENCED_PARAM(dw2); lm_res_param_t *pm = (lm_res_param_t*)dwUser; /* update time and tick */ update_time_and_tick(&pm->tm_param); /* resource task proc */ resource_task_proc(pm); /* schedule timer and ticker */ schedule_timer_and_ticker(pm); }
//--------------------------------------------------------------------------- int dcl_set_time(PARAM_T *p, PARAM_T *q) { #ifdef _WIN32 char param[MAX_TOKEN]; SYSTEMTIME st; time_t tl; struct tm ts; UNREFERENCED_PARAM(q); if (p == NULL) return(DCL_ERROR); *param = 0; dcl_string(p[1].value,param,MAX_TOKEN); tm_str_to_long(param,&tl); tm_long_to_tm(&tl, &ts); st.wDay = ts.tm_mday; st.wDayOfWeek = 0; st.wHour = ts.tm_hour; st.wMilliseconds = 0; st.wMinute = ts.tm_min; st.wMonth = ts.tm_mon + 1; st.wSecond = ts.tm_sec; st.wYear = ts.tm_year + 1900; (void) SetLocalTime(&st); #else char param[MAX_TOKEN]; time_t tl; struct timeval tp; /*struct timezone tzp; not used anymore ??? */ UNREFERENCED_PARAM(q); if (p == NULL) return(DCL_ERROR); *param = 0; dcl_string(p[1].value,param,MAX_TOKEN); tm_str_to_long(param,&tl); tp.tv_sec = tl; tp.tv_usec = 0; settimeofday(&tp, NULL); #endif return(0); }
u32 TaskManagerTP::GetRecommendedJobCount( ITaskManager::JobCountInstructionHints Hints ) { // // Ignoring hints for now and just returning the number of available threads. // UNREFERENCED_PARAM( Hints ); return m_pThreadPool->GetThreadCount(); }
OGRDataSource* OGRMongoDriver::Open( const char* pszName, int bUpdate, char** papszOptions ) { UNREFERENCED_PARAM(papszOptions); OGRMongoDataSource* poDS = NULL; poDS = new OGRMongoDataSource(); /* -------------------------------------------------------------------- */ /* Processing configuration options. */ /* -------------------------------------------------------------------- */ // TODO: Currently, options are based on environment variables. // This is workaround for not yet implemented Andrey's concept // described in document 'RFC 10: OGR Open Parameters'. poDS->SetGeometryTranslation( OGRMongoDataSource::eGeometryPreserve ); const char* pszOpt = CPLGetConfigOption("GEOMETRY_AS_COLLECTION", NULL); if( NULL != pszOpt && EQUALN(pszOpt, "YES", 3) ) { poDS->SetGeometryTranslation( OGRMongoDataSource::eGeometryAsCollection ); } poDS->SetAttributesTranslation( OGRMongoDataSource::eAtributesPreserve ); pszOpt = CPLGetConfigOption("ATTRIBUTES_SKIP", NULL); if( NULL != pszOpt && EQUALN(pszOpt, "YES", 3) ) { poDS->SetAttributesTranslation( OGRMongoDataSource::eAtributesSkip ); } /* -------------------------------------------------------------------- */ /* Open and start processing MongoDB datasoruce to OGR objects. */ /* -------------------------------------------------------------------- */ if( !poDS->Open( pszName ) ) { //delete poDS; poDS->~OGRMongoDataSource(); poDS= NULL; } if( NULL != poDS && bUpdate ) { CPLError( CE_Failure, CPLE_OpenFailed, "MongoDB Driver doesn't support update." ); poDS->~OGRMongoDataSource(); return NULL; } return poDS; }
void ChatSession::Close() { if ( tp_text_channel_.isNull() ) { state_ = STATE_CLOSED; return; } Tp::PendingOperation* op = tp_text_channel_->requestClose(); UNREFERENCED_PARAM(op); LogDebug("Text channel is closed."); //connect(op, SIGNAL( finished(Tp::PendingOperation*) ), SLOT( OnTextChannelClosed(Tp::PendingOperation*) )); }
void HDRListener::notifyMaterialSetup(Ogre::uint32 pass_id, Ogre::MaterialPtr &mat) { // Prepare the fragment params offsets switch(pass_id) { //case 994: // rt_lum4 case 993: // rt_lum3 case 992: // rt_lum2 case 991: // rt_lum1 case 990: // rt_lum0 break; case 800: // rt_brightpass break; case 701: // rt_bloom1 { // horizontal bloom mat->load(); Ogre::GpuProgramParametersSharedPtr fparams = mat->getBestTechnique()->getPass(0)->getFragmentProgramParameters(); const Ogre::String& progName = mat->getBestTechnique()->getPass(0)->getFragmentProgramName(); UNREFERENCED_PARAM(progName); fparams->setNamedConstant("sampleOffsets", mBloomTexOffsetsHorz[0], 15); fparams->setNamedConstant("sampleWeights", mBloomTexWeights[0], 15); break; } case 700: // rt_bloom0 { // vertical bloom mat->load(); Ogre::GpuProgramParametersSharedPtr fparams = mat->getTechnique(0)->getPass(0)->getFragmentProgramParameters(); const Ogre::String& progName = mat->getBestTechnique()->getPass(0)->getFragmentProgramName(); UNREFERENCED_PARAM(progName); fparams->setNamedConstant("sampleOffsets", mBloomTexOffsetsVert[0], 15); fparams->setNamedConstant("sampleWeights", mBloomTexWeights[0], 15); break; } } }
static void mgui_checkbox_on_mouse_release( MGuiElement* checkbox, int16 x, int16 y, MOUSEBTN mousebtn ) { MGuiEvent event; UNREFERENCED_PARAM( x ); UNREFERENCED_PARAM( y ); if ( mousebtn != MOUSE_LBUTTON ) return; BIT_TOGGLE( checkbox->flags, FLAG_CHECKBOX_CHECKED ); if ( checkbox->event_handler ) { event.type = EVENT_CHECKBOX_TOGGLE; event.any.element = checkbox; event.any.data = checkbox->event_data; checkbox->event_handler( &event ); } mgui_element_request_redraw( checkbox ); }
ISystemObject* TreeScene::CreateObject( pcstr pszName, pcstr pszType //grammar :: spiketree or plaintree ) { UNREFERENCED_PARAM( pszName ); ASSERT( pszType != NULL ); TreeObject * tree = new TreeObject( this, pszType ); m_Forest.push_back(tree); return tree; }
int main(int argc, char** argv) { UNUSED_ATTR COIRESULT result; UNREFERENCED_PARAM (argc); UNREFERENCED_PARAM (argv); /* enable wait to attach with debugger */ #if 0 std::cout << "waiting for debugger to attach ..." << std::flush; #if 0 volatile int loop = 1; do { volatile int a = 1; } while (loop); #else for (int i=0; i<20; i++) { sleep(1); std::cout << "." << std::flush; } #endif std::cout << " [DONE]" << std::endl; #endif // Functions enqueued on the sink side will not start executing until // you call COIPipelineStartExecutingRunFunctions(). This call is to // synchronize any initialization required on the sink side result = COIPipelineStartExecutingRunFunctions(); assert(result == COI_SUCCESS); // This call will wait until COIProcessDestroy() gets called on the source // side. If COIProcessDestroy is called without force flag set, this call // will make sure all the functions enqueued are executed and does all // clean up required to exit gracefully. COIProcessWaitForShutdown(); return 0; }
//--------------------------------------------------------------------------- int dcl_set_control(PARAM_T *p, PARAM_T *q,int value) { char work[MAX_TOKEN]; char *c; int retcod = DCL_OK; int present_flag = 0; UNREFERENCED_PARAM(q); if (p == NULL) return(DCL_ERROR); c = p[1].expr; c = cmd_find_token(c); if (*c == '=') { c = &c[1]; } c = cmd_get_token(c,work); c = work; while (*c && retcod == DCL_OK) { switch (*c) { case 'Y': case 'y': case 'C': case 'c': CONTROL_Y_ALLOWED = (char)value; present_flag = 1; break; case 'T': case 't': CONTROL_T_ALLOWED = (char)value; present_flag = 1; break; case '(': case ',': case ')': break; default: (void)dcl_printf(dcl[D].SYS_OUTPUT,"Invalid CONTROL parameter.\n"); _SEVERITY = 2; _STATUS = 19; retcod = DCL_ERROR; } c++; } if (retcod == DCL_OK && present_flag == 0) CONTROL_Y_ALLOWED = (char)value; return(retcod); }
void OGREGraphicsObjectCamera::Update( f32 DeltaTime ) { UNREFERENCED_PARAM( DeltaTime ); if( m_bLocked ) { m_pCamera->lookAt( TOOGREVEC( m_vLookAt ) ); } if (m_Modified) { PostChanges(m_Modified); m_Modified = System::Changes::None; } }