SIMLIB/C++
3.09
Toggle main menu visibility
Loading...
Searching...
No Matches
src
output1.cc
Go to the documentation of this file.
1
/////////////////////////////////////////////////////////////////////////////
2
//! \file output1.cc Output subsystem implementation
3
//
4
// Copyright (c) 1991-2004 Petr Peringer
5
//
6
// This library is licensed under GNU Library GPL. See the file COPYING.
7
//
8
9
//
10
// Output methods for all continuous-part classes
11
//#error Split into parts!!!!
12
//
13
14
////////////////////////////////////////////////////////////////////////////
15
// interface
16
//
17
18
#include "
simlib.h
"
19
#include "
internal.h
"
20
21
#include <cstdio>
// sprintf()
22
23
24
////////////////////////////////////////////////////////////////////////////
25
// implementation
26
//
27
28
namespace
simlib3
{
29
30
SIMLIB_IMPLEMENTATION
;
31
32
////////////////////////////////////////////////////////////////////////////
33
// Event::Output
34
//
35
void
Event::Output
()
const
36
{
37
Print
(
" EVENT %-48s \n"
,
Name
().c_str());
38
}
39
40
41
////////////////////////////////////////////////////////////////////////////
42
// List::Output
43
//
44
void
List::Output
()
const
45
{
46
Print
(
"+----------------------------------------------------------+\n"
);
47
Print
(
"| LIST %-51s |\n"
,
Name
().c_str());
48
Print
(
"+----------------------------------------------------------+\n"
);
49
#ifdef XXX_PRINT_LIST_
50
{
51
Print
(
"Contents:\n"
);
52
unsigned
u;
53
iterator
p;
54
for
(p =
begin
(), u = 1; p !=
end
(); ++p, u++) {
55
Print
(
" [%u]:\t"
, u);
56
(*p)->Output();
57
}
58
Print
(
"End of list.\n"
);
59
}
60
#endif
61
}
62
63
void
SIMLIB_statistics_t::Output
()
const
64
{
65
Print
(
"#\n"
);
66
Print
(
"# SIMLIB run-time statistics:\n"
);
67
Print
(
"# StartTime = %g\n"
,
StartTime
);
68
Print
(
"# EndTime = %g\n"
,
EndTime
);
69
Print
(
"# EventCount = %ld\n"
,
EventCount
);
70
Print
(
"# StepCount = %ld\n"
,
StepCount
);
71
if
(
StepCount
>0) {
72
Print
(
"# MinStep = %g\n"
,
MinStep
);
73
Print
(
"# MaxStep = %g\n"
,
MaxStep
);
74
}
75
Print
(
"#\n"
);
76
}
77
78
}
// namespace
79
simlib3::Event::Output
virtual void Output() const override
print object to default output
Definition
output1.cc:35
simlib3::Event::Name
virtual std::string Name() const override
name of object
Definition
event.cc:71
simlib3::List::iterator
Definition
simlib.h:640
simlib3::List::begin
iterator begin()
Definition
simlib.h:677
simlib3::List::end
iterator end()
Definition
simlib.h:678
simlib3::List::Output
virtual void Output() const override
print object to default output
Definition
output1.cc:44
simlib3::SimObject::Name
virtual std::string Name() const
get object name
Definition
object.cc:134
internal.h
Internal header file for SIMLIB/C++.
simlib3
Implementation of class CalendarList interface is static - using global functions in SQS namespace.
Definition
algloop.cc:32
simlib3::SIMLIB_IMPLEMENTATION
SIMLIB_IMPLEMENTATION
Definition
algloop.cc:34
simlib3::Print
int Print(const char *fmt,...)
for Output methods, can be redirected
Definition
print.cc:92
simlib.h
Main SIMLIB/C++ interface.
simlib3::SIMLIB_statistics_t::Output
void Output() const
print run-time statistics to output
Definition
output1.cc:63
simlib3::SIMLIB_statistics_t::EndTime
double EndTime
Definition
simlib.h:1808
simlib3::SIMLIB_statistics_t::StepCount
long StepCount
Definition
simlib.h:1810
simlib3::SIMLIB_statistics_t::MinStep
double MinStep
Definition
simlib.h:1811
simlib3::SIMLIB_statistics_t::StartTime
double StartTime
Definition
simlib.h:1807
simlib3::SIMLIB_statistics_t::EventCount
long EventCount
Definition
simlib.h:1809
simlib3::SIMLIB_statistics_t::MaxStep
double MaxStep
Definition
simlib.h:1812
Generated on
for SIMLIB/C++ by
1.18.0