diff options
author | Steve Huston <shuston@riverace.com> | 2004-10-18 21:49:35 +0000 |
---|---|---|
committer | Steve Huston <shuston@riverace.com> | 2004-10-18 21:49:35 +0000 |
commit | fd9d67d4dece8b62059eacb4790c3a26d6cab782 (patch) | |
tree | 07cbcad1737a9272afc3240ccb6fee696a2d57ee /examples/APG | |
parent | 232c7685d102a53c831dab6764581c70957e08df (diff) | |
download | ATCD-fd9d67d4dece8b62059eacb4790c3a26d6cab782.tar.gz |
ChangeLogTag:Mon Oct 18 17:45:29 2004 Steve Huston <shuston@riverace.com>
Diffstat (limited to 'examples/APG')
-rw-r--r-- | examples/APG/Naming/Graph.cpp | 30 | ||||
-rw-r--r-- | examples/APG/Naming/Temperature_Grapher.cpp | 2 |
2 files changed, 19 insertions, 13 deletions
diff --git a/examples/APG/Naming/Graph.cpp b/examples/APG/Naming/Graph.cpp index cff8e37244e..79d0def14f3 100644 --- a/examples/APG/Naming/Graph.cpp +++ b/examples/APG/Naming/Graph.cpp @@ -3,16 +3,20 @@ #include "ace/Log_Msg.h" #include "Graph.h" -void Graph::graph( char * filename, Graphable_Element_List & data ) +void Graph::graph (char *filename, Graphable_Element_List &data) { - data.sort(); +#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) + ACE_UNUSED_ARG (filename); + ACE_UNUSED_ARG (data); +#else + data.sort (); - ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Save graph to %s\n"), filename )); + 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 ) + for (int j = 0; j < 10; ++j ) { h[n][j] = ' '; } @@ -20,29 +24,29 @@ void Graph::graph( char * filename, Graphable_Element_List & data ) int l[10]; int k = 0; - for ( Graphable_Element_List::iterator i = data.begin() ; - i != data.end() ; + for (Graphable_Element_List::iterator i = data.begin (); + i != data.end (); ++i, ++k ) { - l[k] = (*i).when(); + l[k] = (*i).when (); - int temp = (int) ((*i).temp() - 80.0); + int temp = (int)((*i).temp () - 80.0); - for ( int j = 0 ; j <= temp ; ++j ) + for (int j = 0; j <= temp; ++j) { h[k][j] = '#'; } } - for (int m = 0 ; m < 10 ; ++m ) + for (int m = 0 ; m < 10 ; ++m) { - ACE_DEBUG ((LM_INFO, ACE_TEXT ("%d "), l[m] )); + ACE_DEBUG ((LM_INFO, ACE_TEXT ("%d "), l[m])); - for ( int j = 0 ; j < 10 ; ++j ) + for (int j = 0; j < 10; ++j) { ACE_DEBUG ((LM_INFO, ACE_TEXT ("%c"), h[m][j])); } ACE_DEBUG ((LM_INFO, ACE_TEXT ("\n"))); } +#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ } - diff --git a/examples/APG/Naming/Temperature_Grapher.cpp b/examples/APG/Naming/Temperature_Grapher.cpp index e11367af4a0..4f1ef1bcff1 100644 --- a/examples/APG/Naming/Temperature_Grapher.cpp +++ b/examples/APG/Naming/Temperature_Grapher.cpp @@ -54,6 +54,7 @@ void Temperature_Grapher::update_graph (void) } // Listing 4 +#if !defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) // Listing 5 code/ch21 Graphable_Element_List graphable; ACE_BINDING_ITERATOR set_iterator (set); @@ -78,4 +79,5 @@ void Temperature_Grapher::update_graph (void) this->naming_context_.rebind ("lastGraphed", lastUpdate->int_value ()); // Listing 6 +#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ } |