游戏开发论坛

 找回密码
 立即注册
搜索
查看: 2301|回复: 0

XML Class Factory, by Juan Antonio Medina

[复制链接]

5

主题

23

帖子

23

积分

注册会员

Rank: 2

积分
23
发表于 2003-10-16 09:09:00 | 显示全部楼层 |阅读模式
这个是flipCode上的,我脸皮厚给大家转过来,呵呵:
Some time ago I started to wonder about the flexible capabilities of XML, but at the moment few game developers use it.

Talking about this matter with some others game developers I saw that some of them are expecting to use it in their new projects.

I wrote the class CClassFactory, that it's just a simple implementation of "something like a" class factory, using XML.

It wasn't made to be really useful, but just to show how flexible and easy it could be to make complex data relationships with xml, which makes it a great point for game developers because sometimes we really get mixed up with scripting, data, and so one.

This code could be extended further, with more features and perhaps with some scripting system that allows (in a easy way) to modify the context of the class factory, and so one.

In the source code you'll find :

The class factory itself
ClassFactory.h
ClassFactory.cpp

A visual Studio 6 MFC Project that uses those classes to show the funcionality of the system.

A directory called \doc with the documentation of the class in html and rtf format , thanks to Doxygen, a really great code doc tool.

Note : CClassFactory uses tinyxml a great XML parser included in the project

Juan Antonio Medina ^ mICrO

sf_200310169913.zip

145.57 KB, 下载次数:

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

作品发布|文章投稿|广告合作|关于本站|游戏开发论坛 ( 闽ICP备17032699号-3 )

GMT+8, 2025-4-18 03:09

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表