本文整理汇总了C#中DataTypes.ToCppFullName方法的典型用法代码示例。如果您正苦于以下问题:C# DataTypes.ToCppFullName方法的具体用法?C# DataTypes.ToCppFullName怎么用?C# DataTypes.ToCppFullName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataTypes
的用法示例。
在下文中一共展示了DataTypes.ToCppFullName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GenerateCppHeaderWriter
public void GenerateCppHeaderWriter(DataTypes types, LrpStream stream)
{
var cppType = types.ToCppFullName(this.Type);
stream.Write("const {0}& {1}", cppType, this.Name);
}
示例2: GenerateCppSignature
public void GenerateCppSignature(DataTypes types, LrpStream stream)
{
if (this.Direction == ParameterDirection.InOut || this.Direction == ParameterDirection.Out)
{
stream.Write("{0}& {1}", types.ToCppFullName(this.Type), this.Name);
}
else if (this.Type == EmbeddedDataTypes.LocalPointer || this.Type == EmbeddedDataTypes.RemotePointer)
{
stream.Write("{0} {1}", types.ToCppFullName(this.Type), this.Name);
}
else
{
stream.Write("const {0}& {1}", types.ToCppFullName(this.Type), this.Name);
}
}
示例3: GenerateCppServerRequest
public void GenerateCppServerRequest(DataTypes types, LrpStream stream)
{
var type = this.Type;
stream.BeginLine();
if (type == EmbeddedDataTypes.Raw)
stream.Write("auto& arg{0} = ", this.Id);
else
stream.Write("auto arg{0} = ", this.Id);
if (this.Direction == ParameterDirection.In || this.Direction == ParameterDirection.InOut)
{
stream.Write("Read{0}(buffer);", this.Type.Suffix);
}
else if (this.Direction == ParameterDirection.Out)
{
if (type != EmbeddedDataTypes.LocalPointer && type != EmbeddedDataTypes.RemotePointer)
{
stream.Write("{0}();", types.ToCppFullName(this.Type));
}
else
{
stream.Write("(void*)nullptr;");
}
}
stream.EndLine();
}