Merge pull request #2216 from jwillemsen/jwi-cxxversionchecks
[ACE_TAO.git] / ACE / examples / APG / Naming / Graph.cpp
blob7b30ce2b4de2d20d23a2099e1bce2d6ba60c4977
1 #include "ace/Log_Msg.h"
2 #include "Graph.h"
4 void Graph::graph (char *filename, Graphable_Element_List &data)
6 data.sort ();
8 ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Save graph to %C\n"), filename));
10 char h[10][10];
11 for (int n = 0 ; n < 10 ; ++n )
13 for (int j = 0; j < 10; ++j )
15 h[n][j] = ' ';
19 int l[10];
20 int k = 0;
21 for (Graphable_Element_List::iterator i = data.begin ();
22 i != data.end ();
23 ++i, ++k )
25 l[k] = (*i).when ();
27 int temp = (int)((*i).temp () - 80.0);
29 for (int j = 0; j <= temp; ++j)
31 h[k][j] = '#';
35 for (int m = 0 ; m < 10 ; ++m)
37 ACE_DEBUG ((LM_INFO, ACE_TEXT ("%d "), l[m]));
39 for (int j = 0; j < 10; ++j)
41 ACE_DEBUG ((LM_INFO, ACE_TEXT ("%c"), h[m][j]));
43 ACE_DEBUG ((LM_INFO, ACE_TEXT ("\n")));