这篇教程C++ DALI_ASSERT_ALWAYS函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中DALI_ASSERT_ALWAYS函数的典型用法代码示例。如果您正苦于以下问题:C++ DALI_ASSERT_ALWAYS函数的具体用法?C++ DALI_ASSERT_ALWAYS怎么用?C++ DALI_ASSERT_ALWAYS使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了DALI_ASSERT_ALWAYS函数的23个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: DALI_ASSERT_ALWAYS// Given a parameter s (NOT x), return the Y value. Checks that the// segment index is valid. For bezier splines, the last segment is// only used to specify the end point, so is not valid.const float Spline::GetY(unsigned int segmentIndex, float s) const{ DALI_ASSERT_ALWAYS( segmentIndex+1 < mKnots.size() && segmentIndex < mKnots.size() && "segmentIndex out of bounds"); DALI_ASSERT_ALWAYS( mOutTangents.size() == mKnots.size() && "Spline not fully initialized" ); DALI_ASSERT_ALWAYS( mInTangents.size() == mKnots.size() && "Spline not fully initialized" ); float yValue=0.0f; if(s < 0.0f || s > 1.0f) { yValue = 0.0f; } else if(s < Math::MACHINE_EPSILON_1) { yValue = mKnots[segmentIndex].y; } else if( (1.0 - s) < Math::MACHINE_EPSILON_1) { yValue = mKnots[segmentIndex+1].y; } else { Vector4 sVect(s*s*s, s*s, s, 1); Vector4 cVect; cVect.x = mKnots[segmentIndex].y; cVect.y = mOutTangents[segmentIndex].y; cVect.z = mInTangents[segmentIndex+1].y; cVect.w = mKnots[segmentIndex+1].y; yValue = sVect.Dot4(mBasis * cVect); } return yValue;}
开发者ID:Tarnyko,项目名称:dali-core,代码行数:36,
示例2: DALI_ASSERT_ALWAYSvoid ScrollViewEffect::Detach(Toolkit::ScrollView& scrollView){ DALI_ASSERT_ALWAYS( (mScrollViewImpl) && "Already detached from ScrollView" ); DALI_ASSERT_ALWAYS( (&GetImpl(scrollView) == mScrollViewImpl) && "Effect attached to a different ScrollView"); OnDetach(scrollView); mScrollViewImpl = NULL;}
开发者ID:mettalla,项目名称:dali,代码行数:9,
示例3: findvoid AnimationPlaylist::AnimationDestroyed( Animation& animation ){ std::set< Animation* >::iterator iter = find( mAnimations.begin(), mAnimations.end(), &animation ); DALI_ASSERT_ALWAYS( iter != mAnimations.end() && "Animation not found" ); mAnimations.erase( iter );}
开发者ID:Tarnyko,项目名称:dali-core,代码行数:7,
示例4: Bindbool FrameBufferTexture::Prepare(){ // bind texture Bind(GL_TEXTURE_2D, GL_TEXTURE0); if( 0 != mId ) { // bind frame buffer mContext.BindFramebuffer(GL_FRAMEBUFFER, mFrameBufferName); // bind render buffer mContext.BindRenderbuffer(GL_RENDERBUFFER, mRenderBufferName); // attach texture to the color attachment point mContext.FramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, mId, 0); // attach render buffer to the depth buffer attachment point mContext.FramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, mRenderBufferName); int status = mContext.CheckFramebufferStatus(GL_FRAMEBUFFER); if ( GL_FRAMEBUFFER_COMPLETE != status ) { DALI_LOG_ERROR( "status (0x%x), glError (0x%x)/n", status, mContext.GetError() ); DALI_ASSERT_ALWAYS( false && "Frame buffer is not complete!" ); } return true; } // Texture could not be bound return false;}
开发者ID:Tarnyko,项目名称:dali-core,代码行数:29,
示例5: mAdaptorAdaptor::Adaptor(Dali::Adaptor& adaptor, RenderSurface* surface, const DeviceLayout& baseLayout): mAdaptor(adaptor), mState(READY), mCore(NULL), mUpdateRenderController(NULL), mVSyncMonitor(NULL), mGLES( NULL ), mEglFactory( NULL ), mSurface( surface ), mPlatformAbstraction( NULL ), mEventHandler( NULL ), mCallbackManager( NULL ), mNotificationOnIdleInstalled( false ), mNotificationTrigger(NULL), mGestureManager(NULL), mHDpi( 0 ), mVDpi( 0 ), mDaliFeedbackPlugin(NULL), mFeedbackController(NULL), mObservers(), mDragAndDropDetector(), mDeferredRotationObserver(NULL), mBaseLayout(baseLayout), mEnvironmentOptions(), mPerformanceInterface(NULL){ DALI_ASSERT_ALWAYS( gThreadLocalAdaptor.get() == NULL && "Cannot create more than one Adaptor per thread" ); gThreadLocalAdaptor.reset(this);}
开发者ID:Tarnyko,项目名称:dali-adaptor,代码行数:29,
示例6: DALI_ASSERT_ALWAYSvoid AnimationPlaylist::AnimationDestroyed( Animation& animation ){ Dali::Vector< Animation* >::Iterator iter = std::find( mAnimations.Begin(), mAnimations.End(), &animation ); DALI_ASSERT_ALWAYS( iter != mAnimations.End() && "Animation not found" ); mAnimations.Remove( iter );}
开发者ID:mettalla,项目名称:dali,代码行数:7,
示例7: DALI_ASSERT_ALWAYSvoid RenderThread::InitializeEgl(){ mEGL = mEglFactory->Create(); DALI_ASSERT_ALWAYS( mSurface && "NULL surface" ); // initialize egl & OpenGL mDisplayConnection->InitializeEgl( *mEGL ); mSurface->InitializeEgl( *mEGL ); // create the OpenGL context mEGL->CreateContext(); // create the OpenGL surface mSurface->CreateEglSurface(*mEGL); // Make it current mEGL->MakeContextCurrent(); // set the initial sync mode // tell core it has a context mCore.ContextCreated();}
开发者ID:mettalla,项目名称:dali,代码行数:25,
示例8: DALI_ASSERT_ALWAYSconst SceneGraph::PropertyBase* PanGestureDetector::GetSceneObjectAnimatableProperty( Property::Index index ) const{ DALI_ASSERT_ALWAYS( IsPropertyAnimatable(index) && "Property is not animatable" ); // None of our properties are animatable return NULL;}
开发者ID:mettalla,项目名称:dali,代码行数:7,
示例9: DALI_ASSERT_DEBUGProperty::Value& Property::Value::GetValue(const std::string& key) const{ DALI_ASSERT_DEBUG(Property::MAP == GetType() && "Property type invalid"); Property::Map *container = AnyCast<Property::Map>(&(mImpl->mValue)); DALI_ASSERT_DEBUG(container); if(container) { for(Property::Map::iterator iter = container->begin(); iter != container->end(); ++iter) { if(iter->first == key) { return iter->second; } } } DALI_LOG_WARNING("Cannot find property map key %s", key.c_str()); DALI_ASSERT_ALWAYS(!"Cannot find property map key"); // should never return this static Property::Value null; return null;}
开发者ID:Tarnyko,项目名称:dali-core,代码行数:26,
示例10: mainint main( int argc, char* argv[] ){ // pull out the JSON file and JavaScript file from the command line arguments std::string javaScriptFileName; std::string jSONFileName; for( int i = 1 ; i < argc ; ++i ) { std::string arg( argv[i] ); size_t idx = std::string::npos; idx = arg.find( ".json" ); if( idx != std::string::npos ) { jSONFileName = arg; } else { idx = arg.find( ".js" ); if( idx != std::string::npos ) { javaScriptFileName = arg; } } } if( !jSONFileName.empty() ) { bool exists = CheckIfFileExists( jSONFileName ); if( !exists ) { DALI_ASSERT_ALWAYS( 0 && "JSON file not found ") } }
开发者ID:mettalla,项目名称:dali,代码行数:35,
示例11: DALI_ASSERT_ALWAYSconst SceneGraph::PropertyBase* AnimatableMesh::GetSceneObjectAnimatableProperty( Property::Index index ) const{ DALI_ASSERT_ALWAYS( IsPropertyAnimatable(index) && "Property is not animatable" ); const SceneGraph::PropertyBase* property( NULL ); // This method should only return a property which is part of the scene-graph if( mSceneObject != NULL ) { int vertexProperty = index % VERTEX_PROPERTY_COUNT; int vertexIndex = index / VERTEX_PROPERTY_COUNT; switch ( vertexProperty ) { case Dali::AnimatableVertex::POSITION: property = &mSceneObject->mVertices[vertexIndex].position; break; case Dali::AnimatableVertex::COLOR: property = &mSceneObject->mVertices[vertexIndex].color; break; case Dali::AnimatableVertex::TEXTURE_COORDS: property = &mSceneObject->mVertices[vertexIndex].textureCoords; break; } } return property;}
开发者ID:Tarnyko,项目名称:dali-core,代码行数:28,
示例12: DemangleClassNamebool TypeRegistry::Register( const std::string& uniqueTypeName, const std::type_info& baseTypeInfo, Dali::TypeInfo::CreateFunction createInstance, bool callCreateOnInit ){ bool ret = false; std::string baseTypeName = DemangleClassName(baseTypeInfo.name()); RegistryMap::iterator iter = mRegistryLut.find(uniqueTypeName); if( iter == mRegistryLut.end() ) { mRegistryLut[uniqueTypeName] = Dali::TypeInfo(new Internal::TypeInfo(uniqueTypeName, baseTypeName, createInstance)); ret = true; DALI_LOG_INFO( gLogFilter, Debug::Concise, "Type Registration %s(%s)/n", uniqueTypeName.c_str(), baseTypeName.c_str()); } else { DALI_LOG_WARNING("Duplicate name for TypeRegistry for '%s'/n", + uniqueTypeName.c_str()); DALI_ASSERT_ALWAYS(!"Duplicate type name for Type Registation"); } if( callCreateOnInit ) { mInitFunctions.push_back(createInstance); } return ret;}
开发者ID:mettalla,项目名称:dali,代码行数:28,
示例13: DALI_ASSERT_ALWAYSvoid ShadowView::Activate(){ DALI_ASSERT_ALWAYS( Self().OnStage() && "ShadowView should be on stage before calling Activate()/n" ); // make sure resources are allocated and start the render tasks processing CreateRenderTasks();}
开发者ID:mettalla,项目名称:dali,代码行数:7,
示例14: DALI_LOG_INFOvoid RenderThread::Start(){ DALI_LOG_INFO( gRenderLogFilter, Debug::Verbose, "RenderThread::Start()/n"); // initialise GL and kick off render thread DALI_ASSERT_ALWAYS( !mEGL && "Egl already initialized" ); // create the render thread, initially we are rendering mThread = new pthread_t(); int error = pthread_create( mThread, NULL, InternalThreadEntryFunc, this ); DALI_ASSERT_ALWAYS( !error && "Return code from pthread_create() in RenderThread" ); if( mSurface ) { mSurface->StartRender(); }}
开发者ID:mettalla,项目名称:dali,代码行数:17,
示例15: CheckGlErrorvoid CheckGlError( Integration::GlAbstraction& glAbstraction, const char* operation ){ for( GLint error = glAbstraction.GetError(); error; error = glAbstraction.GetError() ) { DALI_LOG_ERROR( "glError (0x%x) %s - after %s/n", error, ErrorToString(error), operation ); DALI_ASSERT_ALWAYS( !error && "GL ERROR"); // if errors are being checked we should assert }}
开发者ID:noyangunday,项目名称:dali,代码行数:8,
示例16: DALI_ASSERT_ALWAYSstd::string GaussianBlurView::GetSampleWeightsPropertyName( unsigned int index ) const{ DALI_ASSERT_ALWAYS( index < mNumSamples ); std::ostringstream oss; oss << "uSampleWeights[" << index << "]"; return oss.str();}
开发者ID:noyangunday,项目名称:dali,代码行数:8,
示例17: DALI_ASSERT_ALWAYSvoid Application::CreateAdaptor(){ DALI_ASSERT_ALWAYS( mWindow && "Window required to create adaptor" ); mAdaptor = Dali::Internal::Adaptor::Adaptor::New( mWindow, mContextLossConfiguration, &mEnvironmentOptions ); mAdaptor->ResizedSignal().Connect( mSlotDelegate, &Application::OnResize );}
开发者ID:mettalla,项目名称:dali,代码行数:8,
示例18: GetImplementationconst Internal::Adaptor::SingletonService& GetImplementation(const Dali::SingletonService& player){ DALI_ASSERT_ALWAYS( player && "SingletonService handle is empty" ); const BaseObject& handle = player.GetBaseObject(); return static_cast<const Internal::Adaptor::SingletonService&>(handle);}
开发者ID:mettalla,项目名称:dali,代码行数:8,
示例19: DALI_ASSERT_DEBUGvoid Thread::Start(){ DALI_ASSERT_DEBUG( !mImpl->isCreated ); int error = pthread_create( &(mImpl->thread), NULL, InternalThreadEntryFunc, this ); DALI_ASSERT_ALWAYS( !error && "Failed to create a new thread" ); mImpl->isCreated = true;}
开发者ID:mettalla,项目名称:dali,代码行数:8,
示例20: GetImplementation inline static const Internal::Adaptor::ClipboardEventNotifier& GetImplementation(const Dali::ClipboardEventNotifier& detector) { DALI_ASSERT_ALWAYS( detector && "ClipboardEventNotifier handle is empty" ); const BaseObject& handle = detector.GetBaseObject(); return static_cast<const Internal::Adaptor::ClipboardEventNotifier&>(handle); }
开发者ID:mettalla,项目名称:dali,代码行数:8,
示例21: buttonTETButton::PressedSignalV2& TETButton::PressedSignal(){ TETButton button( *this ); DALI_ASSERT_ALWAYS( button ); Dali::RefObject& handle = button.GetImplementation(); return static_cast<Toolkit::Internal::TETButton&>( handle ).PressedSignal();}
开发者ID:Tarnyko,项目名称:dal-toolkit,代码行数:9,
示例22: DALI_ASSERT_ALWAYSDali::Adaptor* Adaptor::New( RenderSurface *surface, const DeviceLayout& baseLayout ){ DALI_ASSERT_ALWAYS( surface->GetType() != Dali::RenderSurface::NO_SURFACE && "No surface for adaptor" ); Dali::Adaptor* adaptor = new Dali::Adaptor; Adaptor* impl = new Adaptor( *adaptor, surface, baseLayout ); adaptor->mImpl = impl; impl->Initialize(); return adaptor;}
开发者ID:Tarnyko,项目名称:dali-adaptor,代码行数:12,
示例23: CreateGlTexturevoid BitmapTexture::UploadBitmapArray( const BitmapUploadArray& bitmapArray ){ if( mId == 0 ) { CreateGlTexture(); } mContext.ActiveTexture(GL_TEXTURE7); // bind in unused unit so rebind works the first time mContext.Bind2dTexture(mId); mContext.PixelStorei(GL_UNPACK_ALIGNMENT, 1); // We always use tightly packed data GLenum pixelFormat = GL_RGBA; GLenum pixelDataType = GL_UNSIGNED_BYTE; Integration::ConvertToGlFormat(mPixelFormat, pixelDataType, pixelFormat); // go through each bitmap uploading it for( BitmapUploadArray::const_iterator iter = bitmapArray.begin(), endIter = bitmapArray.end(); iter != endIter ; ++iter) { const BitmapUpload& bitmapItem((*iter)); DALI_ASSERT_ALWAYS(bitmapItem.mPixelData); const unsigned char* pixels = bitmapItem.mPixelData; DALI_ASSERT_DEBUG( (pixels!=NULL) && "bitmap has no data /n"); unsigned int bitmapWidth(bitmapItem.mWidth); unsigned int bitmapHeight(bitmapItem.mHeight); DALI_LOG_INFO(Debug::Filter::gImage, Debug::General, "upload bitmap to texture :%d y:%d w:%d h:%d/n", bitmapItem.mXpos, bitmapItem.mYpos, bitmapWidth, bitmapHeight); mContext.TexSubImage2D(GL_TEXTURE_2D, 0, /* mip map level */ bitmapItem.mXpos, /* X pos */ bitmapItem.mYpos, /* Y pos */ bitmapWidth, /* width */ bitmapHeight, /* height */ pixelFormat, /* our bitmap format (should match internal format) */ pixelDataType, /* pixel data type */ pixels); /* texture data */ if( BitmapUpload::DISCARD_PIXEL_DATA == bitmapItem.mDiscard) { delete [] bitmapItem.mPixelData; } }}
开发者ID:Tarnyko,项目名称:dali-core,代码行数:53,
注:本文中的DALI_ASSERT_ALWAYS函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ DASSERT函数代码示例 C++ DAG_relations_tag_update函数代码示例 |