Shadowrun: Awakened 29 September 2011 - Build 871
UScriptSetRoutineParam.cs
Go to the documentation of this file.
00001 using System;
00002 using System.Collections.Generic;
00003 using System.Linq;
00004 using System.Text;
00005 
00006 namespace RoutineAnalyzer
00007 {
00008     class UScriptSetRoutineParam : RoutineParamBase
00009     {
00010         #region Static Methods
00011 
00019         static string GetUScriptType(ParameterTypes type)
00020         {
00021             switch (type)
00022             {
00023                 case ParameterTypes.IntByReference: return "out int";
00024                 case ParameterTypes.IntByValue: return "int";
00025                 case ParameterTypes.StringByReference: return "out string";
00026                 case ParameterTypes.StringByValue: return "string";
00027 
00028                 default:
00029                     throw new Exception("Error: UnrealScript type not implemented!");
00030             }
00031         }
00032 
00033         #endregion
00034 
00035         #region Methods
00036 
00037         public UScriptSetRoutineParam(string sql, int index)
00038             : base(sql, index)
00039         {
00040         }
00041 
00042         public override string GetDeclaration()
00043         {
00044             string typeName = GetUScriptType(_type);
00045             string name = ParseHelper.ConvertUnderscoreToCamelCase(Name);
00046             return string.Format("{0} {1}", typeName, name);
00047         }
00048 
00049         public override string GetPreExecuteCode()
00050         {
00051             return "";
00052         }
00053 
00054         public override string GetPostExecuteCode()
00055         {
00056             return "";
00057         }
00058 
00059         #endregion
00060     }
00061 }

Copyright © 2007-2010 by The Shadowrun: Awakened Team. This work is licensed under the GNU Lesser General Public License 3.

GNU Lesser General Public License 3 Sourceforge.net