本文整理汇总了C++中TextWriter::Write方法的典型用法代码示例。如果您正苦于以下问题:C++ TextWriter::Write方法的具体用法?C++ TextWriter::Write怎么用?C++ TextWriter::Write使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TextWriter
的用法示例。
在下文中一共展示了TextWriter::Write方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SerialiseIndent
void
Array::Serialise(TextWriter &writer, int indent) const
{
writer.Write('[');
if (indent >= 0)
writer.NewLine();
for (auto it = children.begin(), end = children.end(); it != end;) {
if (indent >= 0) {
SerialiseIndent(writer, indent + 1);
(*it)->Serialise(writer, indent + 1);
if (++it != end)
writer.Write(',');
writer.NewLine();
} else {
(*it)->Serialise(writer, indent);
if (++it != end)
writer.Write(',');
}
}
if (indent >= 0)
SerialiseIndent(writer, indent);
writer.Write(']');
}
示例2: WriteTo
void InvokeContainerApiRequest::WriteTo(TextWriter & w, FormatOptions const &) const
{
w.Write("ActivateContainerRequest { ");
w.Write("ApiExecArgs = {0}", apiExecArgs_);
w.Write("TimeoutTicks = {0}", timeoutTicks_);
w.Write("}");
}
示例3: WriteTo
void TestMultiPackageHostContext::WriteTo(TextWriter & w, FormatOptions const &) const
{
w.Write("TestMultiPackageHostContext { ");
w.Write("NodeId = {0}, ", nodeId_);
w.Write("HostId = {0}, ", hostId_);
w.Write("}");
}
示例4: WriteTo
void RegisterContainerActivatorServiceRequest::WriteTo(TextWriter & w, FormatOptions const &) const
{
w.Write("RegisterContainerActivatorServiceRequest { ");
w.Write("ProcessId = {0}", processId_);
w.Write("ListenAddress = {0}", listenAddress_);
w.Write("}");
}
示例5: WriteTo
void WriteTo(TextWriter& w, FormatOptions const&) const
{
// Keep strong references for tracing outside the
// lock since these may the last references and when
// they release, the OnReleaseReference() callback will
// be executed, acquiring the lock again.
//
unordered_map<uint64, ComponentRootSPtr> referencesCopy;
{
AcquireReadLock lock(lock_);
for (auto const & reference : references_)
{
auto sptr = reference.second.lock();
if (sptr.get() != nullptr)
{
referencesCopy[reference.first] = sptr;
}
}
}
w.Write("count={0}\n", referencesCopy.size());
for (auto const & reference : referencesCopy)
{
w.Write(*(reference.second));
}
}
示例6: WriteTo
void PackageSharingPolicyDescription::WriteTo(TextWriter & w, FormatOptions const &) const
{
w.Write("PackageSharingPolicyDescription { ");
w.Write("PackageRef = {0}, ", PackageRef);
w.Write("Scope = {0},", Scope);
w.Write("}");
}
示例7: WriteTo
void FabricHostOperationReply::WriteTo(TextWriter & w, FormatOptions const &) const
{
w.Write("FabricHostOperationReply { ");
w.Write("Error = {0}", error_);
w.Write("Error message = {0}", errorMessage_);
w.Write("Data = {0}", data_);
w.Write("}");
}
示例8: WriteTo
void UpdateCodePackageContextRequest::WriteTo(TextWriter & w, FormatOptions const &) const
{
w.Write("UpdateCodePackageContextRequest { ");
w.Write("CodeContext = {0}, ", CodeContext);
w.Write("ActivationId = {0}, ", ActivationId);
w.Write("Timeout = {0}, ", Timeout);
w.Write("}");
}
示例9: WriteTo
void SecurityAccessPolicyDescription::WriteTo(TextWriter & w, FormatOptions const &) const
{
w.Write("SecurityAccessPolicyDescription { ");
w.Write("ResourceRef = {0}, ", ResourceRef);
w.Write("PrincipalRef = {0}, ", PrincipalRef);
w.Write("Rights = {0}", Rights);
w.Write("}");
}
示例10: WriteTo
void DeactivateCodePackageRequest::WriteTo(TextWriter & w, FormatOptions const &) const
{
w.Write("DeactivateCodePackageRequest { ");
w.Write("CodePackageInstanceId = {0}, ", codePackageInstanceId_);
w.Write("ActivationId = {0}, ", ActivationId);
w.Write("Timeout = {0}, ", Timeout);
w.Write("}");
}
示例11:
void SharableProxy::RecordVector::WriteTo(TextWriter& w, FormatOptions const&) const
{
w.Write("{0}\r\n", instance_);
for (ArbitrationRecord const & record : records_)
{
w.Write("{0}:{1}\r\n", record.Monitor, record.ExpireTime);
}
}
示例12: WriteTo
void LogConfigDescription::WriteTo(TextWriter & w, FormatOptions const &) const
{
w.Write("LogConfigDescription { ");
w.Write("Driver = {0}, ", Driver);
w.Write("DriverOpts {");
for (auto i = 0; i < DriverOpts.size(); i++)
{
w.Write("DriverOpt = {0}", DriverOpts[i]);
}
w.Write("}");
}
示例13: WriteTo
void DllHostEntryPointDescription::WriteTo(TextWriter & w, FormatOptions const &) const
{
w.Write("DllHostEntryPointDescription { ");
w.Write("IsolationPolicyType = {0}, ", IsolationPolicyType);
w.Write("Items = {");
for (auto it = begin(HostedDlls); it != end(HostedDlls); ++it)
{
w.Write("{0}", *it);
}
w.Write("}");
}
示例14: WriteAngleDMM
void
WriteCup(TextWriter &writer, const Waypoint &wp)
{
// Write Title
writer.Format(_T("\"%s\","), wp.name.c_str());
// Write Code
writer.Write(',');
// Write Country
writer.Write(',');
// Write Latitude
WriteAngleDMM(writer, wp.location.latitude, true);
writer.Write(',');
// Write Longitude
WriteAngleDMM(writer, wp.location.longitude, false);
writer.Write(',');
// Write Elevation
WriteAltitude(writer, wp.elevation);
writer.Write(',');
// Write Style
WriteSeeYouFlags(writer, wp);
writer.Write(',');
// Write Runway Direction
if ((wp.type == Waypoint::Type::AIRFIELD ||
wp.type == Waypoint::Type::OUTLANDING) &&
wp.runway.IsDirectionDefined())
writer.Format("%03u", wp.runway.GetDirectionDegrees());
writer.Write(',');
// Write Runway Length
if ((wp.type == Waypoint::Type::AIRFIELD ||
wp.type == Waypoint::Type::OUTLANDING) &&
wp.runway.IsLengthDefined())
writer.Format("%03uM", wp.runway.GetLength());
writer.Write(',');
// Write Airport Frequency
if (wp.radio_frequency.IsDefined()) {
const unsigned freq = wp.radio_frequency.GetKiloHertz();
writer.Format("\"%u.%03u\"", freq / 1000, freq % 1000);
}
writer.Write(',');
// Write Description
writer.FormatLine(_T("\"%s\""), wp.comment.c_str());
}
示例15: GetDigest
void
GRecord::WriteTo(TextWriter &writer) const
{
char digest[DIGEST_LENGTH + 1];
GetDigest(digest);
static constexpr size_t chars_per_line = 16;
static_assert(DIGEST_LENGTH % chars_per_line == 0, "wrong digest length");
for (const char *i = digest, *end = digest + DIGEST_LENGTH;
i != end; i += chars_per_line) {
writer.Write('G');
writer.Write(i, chars_per_line);
writer.NewLine();
}
}