![]() |
Shadowrun: Awakened 29 September 2011 - Build 871
|
00001 using System; 00002 using System.Collections.Generic; 00003 using System.Linq; 00004 using System.Text; 00005 00006 namespace RoutineAnalyzer 00007 { 00008 class CppGetRoutineParam : RoutineParamBase 00009 { 00015 public CppGetRoutineParam(string sql, int index) 00016 : base(sql, index) 00017 { 00018 } 00019 00024 public override string GetDeclaration() 00025 { 00026 string cppType = CppSetRoutineParam.GetCppWrapperType(_type); 00027 string cppName = GetCppName(); 00028 return string.Format("{0} {1}", cppType, cppName); 00029 } 00030 00031 00032 public string GetCppName() 00033 { 00034 return ParseHelper.ConvertUnderscoreToCamelCase(Name); 00035 } 00036 00041 public override string GetPreExecuteCode() 00042 { 00043 return ParseHelper.ConvertUnderscoreToCamelCase(Name); 00044 } 00045 00046 public override string GetPostExecuteCode() 00047 { 00048 string cppName = GetCppName(); 00049 return string.Format("*{0} = stream->{1}({2});", cppName, CppSetRoutineParam.GetCppGetOperation(_type), _index); 00050 } 00051 } 00052 }
Copyright © 2007-2010 by The Shadowrun: Awakened Team. This work is licensed under the GNU Lesser General Public License 3.