Ejemplo n.º 1
0
void MkFileSystem::SetSystemSetting(const MkDataNode& node)
{
	// chunk size
	unsigned int chunkSizeInMB;
	if (node.GetData(L"ChunkSizeInMB", chunkSizeInMB, 0))
	{
		SetChunkSizeGuideline(chunkSizeInMB);
	}

	// comp limit
	unsigned int percentageForCompressing;
	if (node.GetData(L"PercentageForCompressing", percentageForCompressing, 0))
	{
		SetPercentageForCompressing(percentageForCompressing);
	}

	// name rule
	MkStr prefix, extension;
	if (node.GetData(L"Prefix", prefix, 0) && node.GetData(L"Extension", extension, 0))
	{
		SetChunkFileNamingRule(prefix, extension);
	}

	// filtering
	MkArray<MkStr> filterBuffer;
	MkArray<MkPathName> exceptionFilter;
	if (node.GetData(L"ExceptionFilter", filterBuffer))
	{
		exceptionFilter.Reserve(filterBuffer.GetSize());
		MK_INDEXING_LOOP(filterBuffer, i)
		{
			exceptionFilter.PushBack(filterBuffer[i]);
		}
Ejemplo n.º 2
0
	static void Proceed(const MkDataNode& targetNode, const MkHashStr& unitName, MkInterfaceForDataWriting& dwInterface)
	{
		MkArray<DataType> dataList;
		targetNode.GetData(unitName, dataList);
		MK_INDEXING_LOOP(dataList, i)
		{
			dwInterface.Write(dataList[i]);
		}
void MkBodyFrameControlNode::LoadObject(const MkDataNode& node)
{
	// SetClientSize() 호출 전 hanging type이 세팅되어 있어야 함
	int hangingType = static_cast<int>(eHT_None);
	node.GetData(ObjKey_HangingType, hangingType, 0);
	m_HangingType = static_cast<eHangingType>(hangingType);

	MkWindowBaseNode::LoadObject(node);
}
Ejemplo n.º 4
0
void MkWindowBaseNode::SetObjectTemplate(MkDataNode& node)
{
	MkWindowThemedNode::SetObjectTemplate(node);

	// update attribute
	MkBitField32 attr;
	node.GetData(ObjKey_Attribute, attr.m_Field, 0);
	attr.Assign(ePA_SNA_AcceptInput, true);
	attr.Assign(ePA_SNA_Enable, true);
	node.SetData(ObjKey_Attribute, attr.m_Field, 0);
}
Ejemplo n.º 5
0
void MkLineShape::LoadObject(const MkDataNode& node)
{
	// attribute
	node.GetData(ObjKey_Attribute, m_Attribute.m_Field, 0);

	// local vertices
	node.GetDataEx(ObjKey_LocalVertices, m_LocalVertices);

	// local depth
	node.GetData(ObjKey_LocalDepth, m_LocalDepth, 0);

	// indice
	node.GetData(ObjKey_Indice, m_Indices);

	// color
	unsigned int color;
	if (node.GetData(ObjKey_Color, color, 0))
	{
		m_Color.SetByD3DCOLOR(color);
	}
}
void MkCheckBoxControlNode::LoadObject(const MkDataNode& node)
{
	MkWindowBaseNode::LoadObject(node);

	// caption
	MkArray<MkHashStr> textName;
	if (node.GetDataEx(ObjKey_CaptionTextName, textName) && (!textName.Empty()))
	{
		MkStr caption;
		node.GetData(ObjKey_CaptionString, caption, 0);

		_SetCaption(textName, caption);
	}

	// check
	bool onCheck;
	if (node.GetData(ObjKey_OnCheck, onCheck, 0))
	{
		SetCheck(onCheck);
	}
}
Ejemplo n.º 7
0
	virtual bool SetUp(MkDataNode& sharingNode)
	{
		// 파일로부터 읽음
		MkDataNode dataNode;
		dataNode.Load(L"..\\..\\test01.txt");

		// 노드 탐색
		MkDataNode* orcNode = dataNode.GetChildNode(L"MonsterTable")->GetChildNode(L"Orc");

		// 값 확인 : KoreanName(overwrite)
		MkStr koreanName;
		if (orcNode->GetData(L"KoreanName", koreanName, 0))
		{
			MK_DEV_PANEL.MsgToLog(L"");
			MK_DEV_PANEL.MsgToLog(L"KoreanName : " + koreanName);
		}

		// 값 확인 : intelligence(overwrite)
		int intelligence;
		if (orcNode->GetData(L"intelligence", intelligence, 0))
		{
			MK_DEV_PANEL.MsgToLog(L"");
			MK_DEV_PANEL.MsgToLog(L"intelligence : " + MkStr(intelligence));
		}

		// 값 확인 : threeSize(템플릿에만 존재)
		MkArray<unsigned int> threeSize;
		if (orcNode->GetData(L"threeSize", threeSize))
		{
			MK_DEV_PANEL.MsgToLog(L"");
			MK_DEV_PANEL.MsgToLog(L"threeSize :");

			MK_INDEXING_LOOP(threeSize, i)
			{
				MK_DEV_PANEL.MsgToLog(L"   - " + MkStr(threeSize[i]));
			}
Ejemplo n.º 8
0
void MkWindowThemedNode::LoadObject(const MkDataNode& node)
{
	MkVisualPatternNode::LoadObject(node);

	// theme name
	MkHashStr themeName;
	if (node.GetDataEx(ObjKey_ThemeName, themeName, 0) && (!themeName.Empty()))
	{
		SetThemeName(themeName);
	}

	// component
	MkHashStr componentBuffer;
	if (node.GetDataEx(ObjKey_ComponentType, componentBuffer, 0) && (!componentBuffer.Empty()))
	{
		SetComponentType(MkWindowThemeData::ConvertComponentNameToType(componentBuffer));
	}
	else if (node.GetDataEx(ObjKey_CustomFormName, componentBuffer, 0) && (!componentBuffer.Empty()))
	{
		SetComponentType(MkWindowThemeData::eCT_CustomForm);
		SetCustomForm(componentBuffer);
	}

	// shadow
	bool useShadow;
	if (node.GetData(ObjKey_UseShadow, useShadow, 0))
	{
		SetShadowUsage(useShadow);
	}

	// client size
	MkFloat2 clientSize;
	if (node.GetDataEx(ObjKey_ClientSize, clientSize, 0))
	{
		SetClientSize(clientSize);
	}

	// frame type
	MkHashStr frameTypeName;
	if (node.GetDataEx(ObjKey_FrameType, frameTypeName, 0) && (!frameTypeName.Empty()))
	{
		m_FrameType = MkWindowThemeData::ConvertFrameNameToType(frameTypeName);
	}

	// form state -> default
	SetFormState(MkWindowThemeFormData::eS_Default);
}