2
using System.Collections.Generic;
4
using DoxygenWrapper.Wrappers.Interfaces;
5
using DoxygenWrapper.Wrappers.Compounds;
6
using DoxygenWrapper.Wrappers.Types;
7
using DoxygenWrapper.Wrappers.Compounds.Types;
9
namespace DoxygenWrapper.Wrappers.Replacers
11
public class EventReplacer :
14
public EventReplacer(CompoundVariable _variable)
16
mReplace["DelegateName"] = _variable.EventName;
18
CompoundType eventType = CompoundUtility.GetEventType(_variable);
21
foreach (var type in eventType.TemplateTypes)
23
mReplace["OriginalTypeName" + index.ToString()] = type.TypeName;
24
mReplace["ValueName" + index.ToString()] = GetValueName(index - 1, _variable.ValueNames);
26
TypeInfo parameInfo = WrapperManager.Instance.GetTypeInfo(type.TypeName);
27
if (parameInfo != null)
29
foreach (var value in parameInfo.Values)
30
mReplace[value.First + index.ToString()] = value.Second;
37
private string GetValueName(int _index, List<string> _values)
39
if (_index < _values.Count)
40
return _values[_index];
41
return string.Format("_value{0}", _index + 1);
44
public string Replace(string _tag)
47
if (mReplace.TryGetValue(_tag, out result))
52
private Dictionary<string, string> mReplace = new Dictionary<string, string>();