PICout refactoring, new SHSTKMacros

This commit is contained in:
2022-08-07 22:07:26 +03:00
parent 1eaecb288f
commit 8551499a5e
36 changed files with 106 additions and 106 deletions

View File

@@ -312,30 +312,30 @@ PIString datetime2string(const PIDateTime & date, const PIString & format) {
PICout operator <<(PICout s, const PITime & v) {
s.space();
s.setControl(0, true);
s.saveAndSetControls(0);
s << "PITime(" << v.hours << ":";
s << PIString::fromNumber(v.minutes).expandLeftTo(2, '0') << ":";
s << PIString::fromNumber(v.seconds).expandLeftTo(2, '0') << ":";
s << PIString::fromNumber(v.milliseconds).expandLeftTo(3, '0') << ")";
s.restoreControl();
s.restoreControls();
return s;
}
PICout operator <<(PICout s, const PIDate & v) {
s.space();
s.setControl(0, true);
s.saveAndSetControls(0);
s << "PIDate(" << v.day << "-";
s << PIString::fromNumber(v.month).expandLeftTo(2, '0') << "-";
s << v.year << ")";
s.restoreControl();
s.restoreControls();
return s;
}
PICout operator <<(PICout s, const PIDateTime & v) {
s.space();
s.setControl(0, true);
s.saveAndSetControls(0);
s << "PIDateTime(";
s << v.day << "-";
s << PIString::fromNumber(v.month).expandLeftTo(2, '0') << "-";
@@ -344,7 +344,7 @@ PICout operator <<(PICout s, const PIDateTime & v) {
s << PIString::fromNumber(v.minutes).expandLeftTo(2, '0') << ":";
s << PIString::fromNumber(v.seconds).expandLeftTo(2, '0') << ":";
s << PIString::fromNumber(v.milliseconds).expandLeftTo(3, '0') << ")";
s.restoreControl();
s.restoreControls();
return s;
}