diff options
author | William R. Otte <wotte@dre.vanderbilt.edu> | 2008-03-04 14:51:23 +0000 |
---|---|---|
committer | William R. Otte <wotte@dre.vanderbilt.edu> | 2008-03-04 14:51:23 +0000 |
commit | 99aa8c60282c7b8072eb35eb9ac815702f5bf586 (patch) | |
tree | bda96bf8c3a4c2875a083d7b16720533c8ffeaf4 /ACE/examples/APG/Naming/Graph.cpp | |
parent | c4078c377d74290ebe4e66da0b4975da91732376 (diff) | |
download | ATCD-99aa8c60282c7b8072eb35eb9ac815702f5bf586.tar.gz |
undoing accidental deletion
Diffstat (limited to 'ACE/examples/APG/Naming/Graph.cpp')
-rw-r--r-- | ACE/examples/APG/Naming/Graph.cpp | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/ACE/examples/APG/Naming/Graph.cpp b/ACE/examples/APG/Naming/Graph.cpp new file mode 100644 index 00000000000..62ca52afd0d --- /dev/null +++ b/ACE/examples/APG/Naming/Graph.cpp @@ -0,0 +1,47 @@ +// $Id$ + +#include "ace/Log_Msg.h" +#include "Graph.h" + +void Graph::graph (char *filename, Graphable_Element_List &data) +{ + data.sort (); + + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Save graph to %C\n"), filename)); + + char h[10][10]; + for (int n = 0 ; n < 10 ; ++n ) + { + for (int j = 0; j < 10; ++j ) + { + h[n][j] = ' '; + } + } + + int l[10]; + int k = 0; + for (Graphable_Element_List::iterator i = data.begin (); + i != data.end (); + ++i, ++k ) + { + l[k] = (*i).when (); + + int temp = (int)((*i).temp () - 80.0); + + for (int j = 0; j <= temp; ++j) + { + h[k][j] = '#'; + } + } + + for (int m = 0 ; m < 10 ; ++m) + { + ACE_DEBUG ((LM_INFO, ACE_TEXT ("%d "), l[m])); + + for (int j = 0; j < 10; ++j) + { + ACE_DEBUG ((LM_INFO, ACE_TEXT ("%c"), h[m][j])); + } + ACE_DEBUG ((LM_INFO, ACE_TEXT ("\n"))); + } +} |