From: <mog...@li...> - 2010-04-13 04:33:29
|
Revision: 309 http://mogre.svn.sourceforge.net/mogre/?rev=309&view=rev Author: mzanin Date: 2010-04-13 04:33:19 +0000 (Tue, 13 Apr 2010) Log Message: ----------- Using new helper class Mogre17 Modified Paths: -------------- trunk/Mogre/AutoWrap/Meta/DefMember.cs trunk/Mogre/AutoWrap/Meta/DefType.cs Modified: trunk/Mogre/AutoWrap/Meta/DefMember.cs =================================================================== --- trunk/Mogre/AutoWrap/Meta/DefMember.cs 2010-04-13 04:31:06 UTC (rev 308) +++ trunk/Mogre/AutoWrap/Meta/DefMember.cs 2010-04-13 04:33:19 UTC (rev 309) @@ -111,7 +111,6 @@ { if (_type == null) { - if (Container != "") { _type = CreateExplicitContainerType(Container, ContainerKey, (ContainerValue != "") ? ContainerValue : TypeName); @@ -159,7 +158,6 @@ } public string TypeName = null; - public string Definition; public ProtectionType ProtectionType; public PassedByType PassedByType; @@ -205,19 +203,6 @@ _name = child.InnerText; break; case "type": - //(MOGRE 1.7) - //shameless fix :) change container type into the std version - - /*string CustomOgreType = child.InnerText; - int iWhiteSpace = CustomOgreType.IndexOf(" "); - - if (iWhiteSpace != -1) - { - CustomOgreType = CustomOgreType.Substring(0, iWhiteSpace); - CustomOgreType = ReplaceCustomOgreType(CustomOgreType); - }*/ - - //(END MOGRE 1.7) this.TypeName = child.InnerText; this._container = child.GetAttribute("container"); this._containerKey = child.GetAttribute("containerKey"); @@ -232,27 +217,8 @@ } } } - - /* public string ReplaceCustomOgreType(string pCustomOgreType) - { - switch (pCustomOgreType) - { - case "vector": - case "set": - case "deque": - case "list": - case "map": - case "multimap": - case "pair": - return "std::" + pCustomOgreType; - } - - return pCustomOgreType; - }*/ } - - public enum VirtualType { Virtual, NonVirtual, PureVirtual } public enum PassedByType { Value, Reference, Pointer, PointerPointer } Modified: trunk/Mogre/AutoWrap/Meta/DefType.cs =================================================================== --- trunk/Mogre/AutoWrap/Meta/DefType.cs 2010-04-13 04:31:06 UTC (rev 308) +++ trunk/Mogre/AutoWrap/Meta/DefType.cs 2010-04-13 04:33:19 UTC (rev 309) @@ -256,6 +256,11 @@ get { return _elem.GetAttribute("name"); } } + public override string ToString() + { + return Name; + } + public virtual string CLRName { get @@ -685,11 +690,6 @@ { foreach (DefMember m in Members) { - if (m.Name == "getWindowPlanes") - { - - } - if (m is DefFunction) yield return m; } @@ -1464,13 +1464,13 @@ case "function": DefFunction func = new DefFunction(child); func.Class = this; - if (func.Name != "DECLARE_INIT_CLROBJECT_METHOD_OVERRIDE") - AddNewFunction(func); - break; + if (func.Name != "DECLARE_INIT_CLROBJECT_METHOD_OVERRIDE" && !func.Name.StartsWith("OGRE_")) + AddNewFunction(func); + break; case "variable": DefField field = new DefField(child); - if (field.Name != this.Name) + if (field.Name != this.Name && !field.Name.StartsWith("OGRE_")) { field.Class = this; Members.Add(field); @@ -1646,51 +1646,14 @@ { DefTypeDef expl = null; - //(Mogre 1.7) change type to reflect code change of ogre - //get the real base type name - if (!string.IsNullOrEmpty(typedef.BaseTypeName)) + if (typedef.BaseTypeName.Contains("<") || + typedef.BaseTypeName.Contains("std::") || + Mogre17.IsCollection(typedef.BaseTypeName) ) { - // if(typedef. - - // && typedef.BaseTypeName.IndexOf('<') != -1 - //string BaseTypeName = typedef.BaseTypeName; - //int CharPos = BaseTypeName.IndexOf("<"); - string OgreTypeDef = typedef.BaseTypeName; - - - switch (OgreTypeDef) + if (typedef.BaseTypeName == "std::vector" || typedef.BaseTypeName == "std::list") { - case "vector": - case "set": - case "deque": - case "list": - case "map": - case "multimap": - case "pair": - typedef.BaseTypeName = "std::" + OgreTypeDef; - break; - case "HashedVector": - typedef.BaseTypeName = OgreTypeDef; - break; - } - } - - //End (MOGRE 1.7) - - - - if (typedef.BaseTypeName.Contains("<") - || typedef.BaseTypeName.Contains("std::")) - { - if (typedef.BaseTypeName == "std::vector" - || typedef.BaseTypeName == "std::list") - { expl = DefTemplateOneType.CreateExplicitType(typedef); } - else if (typedef.BaseTypeName == "std::basic_stringstream") - { - - } else { switch (typedef.TypeNames.Length) @@ -1699,7 +1662,7 @@ expl = DefTemplateOneType.CreateExplicitType(typedef); break; case 2: - expl = DefTemplateTwoTypes.CreateExplicitType(typedef); + expl = DefTemplateTwoTypes.CreateExplicitType(typedef); break; default: throw new Exception("Unexpected"); @@ -1708,7 +1671,7 @@ } else if (typedef.Name == "String") { - expl = new DefStringTypeDef(typedef.Element); + expl = new DefStringTypeDef(typedef.Element); } if (expl != null) @@ -1722,7 +1685,7 @@ return typedef; } - public override bool IsIgnored + public override bool IsIgnored { get { @@ -1774,7 +1737,8 @@ protected PassedByType[] _passed; private ITypeMember[] _types; - public virtual ITypeMember[] TypeMembers + + public virtual ITypeMember[] TypeMembers { get { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |