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


C++ KeyedArchive::GetArchieveData方法代码示例

本文整理汇总了C++中KeyedArchive::GetArchieveData方法的典型用法代码示例。如果您正苦于以下问题:C++ KeyedArchive::GetArchieveData方法的具体用法?C++ KeyedArchive::GetArchieveData怎么用?C++ KeyedArchive::GetArchieveData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在KeyedArchive的用法示例。


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

示例1: UIListCell

UIListCell *NodesPropertyControl::CellAtIndex(UIList *list, int32 index)
{
    UIListCell *c = (UIListCell *)list->GetReusableCell("Deletion list");
    if (!c) 
    {
        c = new UIListCell(Rect(0, 0, 200, 20), "Deletion list");
    }
    
    if(currentSceneNode)
    {
        KeyedArchive *customProperties = currentSceneNode->GetCustomProperties();
        Map<String, VariantType*> propsData = customProperties->GetArchieveData();
        int32 i = 0; 
        for (Map<String, VariantType*>::iterator it = propsData.begin(); it != propsData.end(); ++it, ++i)
        {
            if(i == index)
            {
                String name = it->first;
                
                ControlsFactory::CustomizeListCell(c, StringToWString(name));
                break;
            }
        }
    }
    
    return c;
}
开发者ID:vilonosec,项目名称:dava.framework,代码行数:27,代码来源:NodesPropertyControl.cpp

示例2: OnMinus

void NodesPropertyControl::OnMinus(BaseObject * , void * , void * )
{
    if(propControl->GetParent() || listHolder->GetParent())
    {
        return;
    }
    
    if(currentSceneNode)
    {
        KeyedArchive *customProperties = currentSceneNode->GetCustomProperties();
        Map<String, VariantType*> propsData = customProperties->GetArchieveData();
        
        int32 size = propsData.size();
        if(size)
        {
            Rect r = listHolder->GetRect();
            r.dy = Min(r.dy, (float32)size * CellHeight(NULL, 0));
            r.y = listHolder->GetRect().dy - r.dy - ControlsFactory::BUTTON_HEIGHT;
            
            deletionList = new UIList(r, UIList::ORIENTATION_VERTICAL);
            ControlsFactory::SetScrollbar(deletionList);
            ControlsFactory::CustomizePropertyCell(deletionList, false);
            
            deletionList->SetDelegate(this);
            
            listHolder->AddControl(deletionList);
            deletionList->Refresh();
            AddControl(listHolder);
        }
    }
}
开发者ID:vilonosec,项目名称:dava.framework,代码行数:31,代码来源:NodesPropertyControl.cpp

示例3: SetVariant

KeyedArchive::KeyedArchive(const KeyedArchive &arc)
{
    const Map<String, VariantType*> &customMap = arc.GetArchieveData();
    for (Map<String, VariantType*>::const_iterator it = customMap.begin(); it != customMap.end(); it++)
    {
        SetVariant(it->first, *it->second);
    }
}
开发者ID:galek,项目名称:dava.framework,代码行数:8,代码来源:KeyedArchive.cpp

示例4: ElementsCount

int32 NodesPropertyControl::ElementsCount(UIList * )
{
    if(currentSceneNode)
    {
        KeyedArchive *customProperties = currentSceneNode->GetCustomProperties();
        Map<String, VariantType*> propsData = customProperties->GetArchieveData();
        
        return propsData.size();
    }
    
    return 0;
}
开发者ID:vilonosec,项目名称:dava.framework,代码行数:12,代码来源:NodesPropertyControl.cpp

示例5: ConvertLightmapSizeFromProperty

void SceneValidator::ConvertLightmapSizeFromProperty(Entity *ownerNode, InstanceMaterialState *materialState)
{
	KeyedArchive * props = ownerNode->GetCustomProperties();
	Map<String, VariantType*> map = props->GetArchieveData();
	for(Map<String, VariantType*>::iterator it = map.begin(); it != map.end(); it++)
	{
		String key = it->first;
		if(key.find("lightmap.size") != String::npos && ((RenderComponent*)ownerNode->GetComponent(Component::RENDER_COMPONENT))->GetRenderObject()->GetType() != RenderObject::TYPE_LANDSCAPE)
		{
			materialState->SetLightmapSize(props->GetInt32(key, 128));
			props->DeleteKey(key);
			break;
		}
	}
}
开发者ID:droidenko,项目名称:dava.framework,代码行数:15,代码来源:SceneValidator.cpp

示例6: OnCellSelected

void NodesPropertyControl::OnCellSelected(UIList *, UIListCell *selectedCell)
{
    if(currentSceneNode)
    {
        int32 index = selectedCell->GetIndex();
        KeyedArchive *customProperties = currentSceneNode->GetCustomProperties();
        Map<String, VariantType*> propsData = customProperties->GetArchieveData();
        int32 i = 0; 
        for (Map<String, VariantType*>::iterator it = propsData.begin(); it != propsData.end(); ++it, ++i)
        {
            if(i == index)
            {
                customProperties->DeleteKey(it->first);
                
                OnCancel(NULL, NULL, NULL);
                ReadFrom(currentSceneNode);
                break;
            }
        }
    }
}
开发者ID:vilonosec,项目名称:dava.framework,代码行数:21,代码来源:NodesPropertyControl.cpp

示例7: ReadFrom

void NodesPropertyControl::ReadFrom(Entity *sceneNode)
{
	SafeRelease(currentSceneNode);
    currentSceneNode = SafeRetain(sceneNode);
    currentDataNode = NULL;
    ReleaseChildLodData();
    
    propertyList->ReleaseProperties();
    
    if(!createNodeProperties)
    {
        propertyList->AddSection("property.scenenode.generalc++", GetHeaderState("property.scenenode.generalc++", true));
        propertyList->AddIntProperty("property.scenenode.retaincount", PropertyList::PROPERTY_IS_READ_ONLY);
        propertyList->AddStringProperty("property.scenenode.classname", PropertyList::PROPERTY_IS_READ_ONLY);
        propertyList->AddStringProperty("property.scenenode.c++classname", PropertyList::PROPERTY_IS_READ_ONLY);
        propertyList->AddStringProperty("property.scenenode.ptr", PropertyList::PROPERTY_IS_READ_ONLY);
        
//        for (uint32 k = 0; k < Component::COMPONENT_COUNT; ++k)
//        {
//            propertyList->AddStringProperty(Format("Component:%s", sceneNode->components sa M.  zz))
//        }
        
        
        
        propertyList->SetIntPropertyValue("property.scenenode.retaincount", sceneNode->GetRetainCount());
        propertyList->SetStringPropertyValue("property.scenenode.classname", sceneNode->GetClassName());
        propertyList->SetStringPropertyValue("property.scenenode.c++classname", typeid(*sceneNode).name());
        propertyList->SetStringPropertyValue("property.scenenode.ptr", Format("%p", sceneNode));
        
        AABBox3 unitBox = sceneNode->GetWTMaximumBoundingBoxSlow();
        if((-AABBOX_INFINITY != unitBox.max.x) && (AABBOX_INFINITY != unitBox.min.x))
        {
            propertyList->AddSubsection(String("Unit size"));

            Vector3 size = unitBox.max - unitBox.min;
            
            propertyList->AddFloatProperty(String("X-Size"), PropertyList::PROPERTY_IS_READ_ONLY);
            propertyList->SetFloatPropertyValue(String("X-Size"), size.x);
            
            propertyList->AddFloatProperty(String("Y-Size"), PropertyList::PROPERTY_IS_READ_ONLY);
            propertyList->SetFloatPropertyValue(String("Y-Size"), size.y);

            propertyList->AddFloatProperty(String("Z-Size"), PropertyList::PROPERTY_IS_READ_ONLY);
            propertyList->SetFloatPropertyValue(String("Z-Size"), size.z);
            
        }
    }

    propertyList->AddSection("property.scenenode.scenenode", GetHeaderState("property.scenenode.scenenode", true));
    propertyList->AddStringProperty(SCENE_NODE_NAME_PROPERTY_NAME, PropertyList::PROPERTY_IS_EDITABLE);
    propertyList->SetStringPropertyValue(SCENE_NODE_NAME_PROPERTY_NAME, sceneNode->GetName());

    if(!createNodeProperties)
    {
        propertyList->AddBoolProperty(SCENE_NODE_IS_VISIBLE_PROPERTY_NAME, PropertyList::PROPERTY_IS_EDITABLE);
		propertyList->SetBoolPropertyValue(SCENE_NODE_IS_VISIBLE_PROPERTY_NAME, sceneNode->GetVisible());
		
        propertyList->AddSection("property.scenenode.matrixes", GetHeaderState("property.scenenode.matrixes", false));
        propertyList->AddMatrix4Property("property.scenenode.localmatrix", PropertyList::PROPERTY_IS_EDITABLE);
        propertyList->AddMatrix4Property("property.scenenode.worldmatrix", PropertyList::PROPERTY_IS_READ_ONLY);

        propertyList->SetMatrix4PropertyValue("property.scenenode.localmatrix", sceneNode->GetLocalTransform());
        propertyList->SetMatrix4PropertyValue("property.scenenode.worldmatrix", sceneNode->GetWorldTransform());
    }

    
	{ //static light
		 propertyList->AddSection("Used in static lighting", GetHeaderState("Used in static lighting", true));

		 propertyList->AddBoolProperty(SCENE_NODE_USED_IN_STATIC_LIGHTING_PROPERTY_NAME);
		 propertyList->SetBoolPropertyValue(SCENE_NODE_USED_IN_STATIC_LIGHTING_PROPERTY_NAME, sceneNode->GetCustomProperties()->GetBool("editor.staticlight.used", true));

		 propertyList->AddBoolProperty(SCENE_NODE_CAST_SHADOWS_PROPERTY_NAME);
		 propertyList->SetBoolPropertyValue(SCENE_NODE_CAST_SHADOWS_PROPERTY_NAME, sceneNode->GetCustomProperties()->GetBool("editor.staticlight.castshadows", true));

		 propertyList->AddBoolProperty(SCENE_NODE_RECEIVE_SHADOWS_PROPERTY_NAME);
		 propertyList->SetBoolPropertyValue(SCENE_NODE_RECEIVE_SHADOWS_PROPERTY_NAME, sceneNode->GetCustomProperties()->GetBool("editor.staticlight.receiveshadows", true));
	}
    
    
    { // LodNodes at Hierarchy
        LodComponent *lodComponent = GetLodComponent(currentSceneNode);
        if(!lodComponent)
        {
            AddChildLodSection();
        }        
    }
    
    
    //must be last
    if(!createNodeProperties)
    {
        propertyList->AddSection("property.scenenode.customproperties", GetHeaderState("property.scenenode.customproperties", true));
        
        KeyedArchive *customProperties = sceneNode->GetCustomProperties();
        Map<String, VariantType*> propsData = customProperties->GetArchieveData();
        for (Map<String, VariantType*>::iterator it = propsData.begin(); it != propsData.end(); ++it)
        {
            String name = it->first;
            VariantType * key = it->second;
//.........这里部分代码省略.........
开发者ID:vilonosec,项目名称:dava.framework,代码行数:101,代码来源:NodesPropertyControl.cpp


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