Value indent delta format
This commit is contained in:
+3
-3
@@ -19,7 +19,7 @@ struct FmtDelta {
|
||||
if(verytop && !val.isMarked())
|
||||
return;
|
||||
|
||||
strm<<prefix;
|
||||
strm<<indent{}<<prefix;
|
||||
if(!verytop)
|
||||
strm<<" ";
|
||||
strm<<val.type().name();
|
||||
@@ -82,7 +82,7 @@ struct FmtDelta {
|
||||
|
||||
for(auto idx : range(aval.size())) {
|
||||
std::ostringstream strm;
|
||||
strm<<prefix<<'['<<idx<<']';
|
||||
strm<<indent{}<<prefix<<'['<<idx<<']';
|
||||
|
||||
top(strm.str(), aval[idx], false);
|
||||
}
|
||||
@@ -100,7 +100,7 @@ struct FmtDelta {
|
||||
void top(const std::string& prefix, const Value& val, bool verytop)
|
||||
{
|
||||
if(!val) {
|
||||
strm<<prefix;
|
||||
strm<<indent{}<<prefix;
|
||||
if(!verytop)
|
||||
strm<<' ';
|
||||
strm<<"null\n";
|
||||
|
||||
+3
-1
@@ -111,7 +111,9 @@ int main(int argc, char *argv[])
|
||||
ops.push_back(ctxt.get(argv[n])
|
||||
.pvRequest(request)
|
||||
.result([&argv, n, &remaining, &done, format, arrLimit](client::Result&& result) {
|
||||
std::cout<<argv[n]<<"\n"<<result()
|
||||
std::cout<<argv[n]<<"\n";
|
||||
Indented I(std::cout);
|
||||
std::cout<<result()
|
||||
.format()
|
||||
.format(format)
|
||||
.arrayLimit(arrLimit);
|
||||
|
||||
Reference in New Issue
Block a user