本文整理汇总了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;
}
示例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);
}
}
}
示例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);
}
}
示例4: ElementsCount
int32 NodesPropertyControl::ElementsCount(UIList * )
{
if(currentSceneNode)
{
KeyedArchive *customProperties = currentSceneNode->GetCustomProperties();
Map<String, VariantType*> propsData = customProperties->GetArchieveData();
return propsData.size();
}
return 0;
}
示例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;
}
}
}
示例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;
}
}
}
}
示例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;
//.........这里部分代码省略.........