/*
Copyright (C) 2001-2006, William Joseph.
All Rights Reserved.
This file is part of GtkRadiant.
GtkRadiant is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
GtkRadiant is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GtkRadiant; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
///\file
///\brief EntityClass plugin that supports the .ent xml entity-definition format.
///
/// the .ent xml format expresses entity-definitions.
///
///
///
///
///
///
///
///
///
///
///
///
/// the attributes of an entity type are defined like this:
///
/// <[name of attribute type]
/// key="[entity key name]"
/// name="[name shown in gui]"
/// value="[default entity key value]"
/// >[comment text shown in gui][name of attribute type]>
///
/// each attribute type has a specialised attribute-editor GUI
///
/// currently-supported attribute types:
///
/// string a string
/// array an array of strings - value is a semi-colon-delimited string
/// integer an integer value
/// boolean an integer - shows as a checkbox - true = non-zero
/// integer2 two integer values //not supported
/// integer3 three integer values //not supported
/// real floating-point value
/// angle specialisation of real - Yaw angle
/// direction specialisation of real - Yaw angle, -1 = up, -2 = down
/// real3 three floating-point values
/// angles specialisation of real3 - Pitch Yaw Roll
/// color specialisation of real3 - RGB floating-point colour
/// target a string that uniquely identifies an entity or group of entities
/// targetname a string that uniquely identifies an entity or group of entities
/// sound the VFS path to a sound file
/// texture the VFS path to a texture file or a shader name
/// model the VFS path to a model file
/// skin the VFS path to a skin file
///
///
/// flag attributes define a flag in the "spawnflags" key:
///
/// [comment text shown in gui]
///
/// the default value for a flag bit is always 0.
///
///
/// List attributes have a set of valid values.
/// Create new list attribute types like this:
///
///
///
///
///
///
/// these can then be used as attribute types.
///
///
/// An attribute definition should specify a default value that corresponds
/// with the default value given by the game. If the default value is not
/// specified in the attribute definition, it is assumed to be an empty string.
///
/// If the currently-selected entity in Radiant does not specify a value for
/// the key of an attribute, the default value from the attribute-definition
/// will be displayed in the attribute-editor and used when visualising the
/// entity in the preview windows. E.g. the Doom3 "light" entity has a
/// "light_radius" key. Light entities without a "light_radius" key are
/// displayed in Doom3 with a radius of 300. The default value for the
/// "light_radius" attribute definition should be specified as "300 300 300".
///
#include "eclass_xml.h"
#include "ieclass.h"
#include "irender.h"
#include "ifilesystem.h"
#include "xml/xmlparser.h"
#include "generic/object.h"
#include "generic/reference.h"
#include "stream/stringstream.h"
#include "stream/textfilestream.h"
#include "os/path.h"
#include "eclasslib.h"
#include "modulesystem/moduleregistry.h"
#include "stringio.h"
#include