certi-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[certi-cvs] certi RTIA/RTIA_federate.cc libCERTI/fed.cc


From: certi-cvs
Subject: [certi-cvs] certi RTIA/RTIA_federate.cc libCERTI/fed.cc
Date: Thu, 10 Jul 2008 14:05:30 +0000

CVSROOT:        /sources/certi
Module name:    certi
Changes by:     Eric NOULARD <erk>      08/07/10 14:05:30

Modified files:
        RTIA           : RTIA_federate.cc 
        libCERTI       : fed.cc 

Log message:
        merge patch #6564 : Remove Fed file dump from Rtia
        from Patrice Carle
        Avoid printing FED file on RTIA start-up

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/certi/RTIA/RTIA_federate.cc?cvsroot=certi&r1=3.86&r2=3.87
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/fed.cc?cvsroot=certi&r1=3.15&r2=3.16

Patches:
Index: RTIA/RTIA_federate.cc
===================================================================
RCS file: /sources/certi/certi/RTIA/RTIA_federate.cc,v
retrieving revision 3.86
retrieving revision 3.87
diff -u -b -r3.86 -r3.87
--- RTIA/RTIA_federate.cc       9 Jul 2008 13:48:28 -0000       3.86
+++ RTIA/RTIA_federate.cc       10 Jul 2008 14:05:30 -0000      3.87
@@ -198,7 +198,7 @@
                   if ( is_a_fed )
                       {        
                      int result = certi::fedparser::build(filename.c_str(),
-                                                          rootObject, true);  
+                                                          rootObject, false);  
                       if (result != 0 ) throw ErrorReadingFED("invalid .fed");
                       }
                   else if ( is_an_xml )

Index: libCERTI/fed.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/fed.cc,v
retrieving revision 3.15
retrieving revision 3.16
diff -u -b -r3.15 -r3.16
--- libCERTI/fed.cc     20 Nov 2007 09:14:07 -0000      3.15
+++ libCERTI/fed.cc     10 Jul 2008 14:05:30 -0000      3.16
@@ -19,7 +19,7 @@
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 // USA
 //
-// $Id: fed.cc,v 3.15 2007/11/20 09:14:07 erk Exp $
+// $Id: fed.cc,v 3.16 2008/07/10 14:05:30 erk Exp $
 // ----------------------------------------------------------------------------
 
 // CERTI header
@@ -117,10 +117,12 @@
 void
 indent()
 {
+       if(verbose) {
     cout << endl ;
     for (int i = 0 ; i < indentation ; ++i) {
        cout << " " << " " << " " << " " ;
     }
+       }
 }
 
 // ----------------------------------------------------------------------------
@@ -128,7 +130,9 @@
 startFed()
 {
     indent();
-    cout << "(FED" ;
+    if(verbose) {
+         cout << "(FED";
+    }
     ++indentation ;
 }
 
@@ -137,7 +141,9 @@
 endFed()
 {
     --indentation ;
+    if(verbose) {
     cout << ")" << endl << endl ;
+    }
 }
 
 // ----------------------------------------------------------------------------
@@ -145,7 +151,9 @@
 addFederation()
 {
     indent();
+    if(verbose) {
     cout << "(federation \"" << arg.c_str() << "\")" ;
+    }
 }
 
 // ----------------------------------------------------------------------------
@@ -153,7 +161,9 @@
 addFedVersion()
 {
     indent();
+    if(verbose) {
     cout << "(FEDversion \"" << arg.c_str() << "\")" ;
+    }
 }
 
 // ----------------------------------------------------------------------------
@@ -161,7 +171,9 @@
 startSpaces()
 {
     indent();
+    if(verbose) {
     cout << "(spaces" ;
+    }
     ++indentation ;
 }
 
@@ -170,7 +182,9 @@
 end()
 {
     --indentation ;
+    if(verbose) {
     cout << ")" ;
+    }
 }
 
 // ----------------------------------------------------------------------------
@@ -178,7 +192,9 @@
 startObjects()
 {
      indent();
+     if(verbose) {
      cout << "(objects" ;    
+     }
      ++indentation ;
 }
 
@@ -187,7 +203,9 @@
 startInteractions()
 {
      indent();
+     if(verbose) {
      cout << "(interactions" ;    
+     }
      ++indentation ;
 }
 
@@ -205,8 +223,10 @@
     SecurityLevelID level = root_object->GetSecurityLevelID(arg.c_str());
     root_object->registerFederate(federate.c_str(), level);
     indent();
+    if(verbose) {
     cout <<"(federate \"" << federate.c_str() << "\" \"" 
         << arg.c_str() << "\")" ;
+    }
 }
 
 // ----------------------------------------------------------------------------
@@ -227,8 +247,10 @@
     root_object->ObjectClasses->addClass(object);
 
     indent();
+    if(verbose) {
     cout << "(class \"" << arg.c_str() << "\" (id " 
             << object->getHandle()     << ")" ;
+    }
     ++indentation ;
 }
 
@@ -239,7 +261,9 @@
     SecurityLevelID level = root_object->GetSecurityLevelID(name.c_str());
     objects.back()->setLevelId(level);
     indent();
+    if(verbose) {
     cout << "(sec_level \"" << name.c_str() << "\")" ;
+    }
 }
 
 // ----------------------------------------------------------------------------
@@ -253,18 +277,24 @@
     objects.back()->addAttribute(attribute);
     
     indent();
+    if(verbose) {
     cout << "(attribute \"" << arg.c_str() << "\" (id "
         << attribute->getHandle() << ")" ;
+    }
     printTransport();
     printOrder();
+    if(verbose) {
     cout << ")" ;
+    }
 }
 
 // ----------------------------------------------------------------------------
 void
 endObject()
 {
+    if(verbose) {
     cout << ")" ;
+    }
     objects.pop_back();    
     if (objects.size() == 0) attributeHandle = 1 ;
     --indentation ;
@@ -288,6 +318,7 @@
     root_object->Interactions->addClass(interaction);
 
     indent();
+    if(verbose)
     cout << "(interaction \"" << arg.c_str() << "\" (id "
         << interaction->getHandle() << ")" ;
     printTransport();
@@ -302,6 +333,7 @@
     SecurityLevelID level = root_object->GetSecurityLevelID(arg.c_str());
     interactions.back()->setLevelId(level);
     indent();
+    if(verbose)
     cout << "(sec_level \"" << arg.c_str() << "\")" ;
 }
 
@@ -312,7 +344,9 @@
     SecurityLevelID level = root_object->GetSecurityLevelID(arg.c_str());
     objects.back()->setLevelId(level);
     indent();
+    if(verbose) {
     cout << "(sec_level \"" << arg.c_str() << "\")" ;
+    }
 }
 
 // ----------------------------------------------------------------------------
@@ -325,15 +359,19 @@
     interactions.back()->addParameter(parameter);
 
     indent();
+    if(verbose) {
     cout << "(parameter \"" << arg.c_str() << "\" (id "
         << parameter->getHandle() << "))" << std::flush;
+    }
 }
 
 // ----------------------------------------------------------------------------
 void
 endInteraction()
 {
+    if(verbose) {
     cout << ")" ;
+    }
     interactions.pop_back();
     if (interactions.size() == 0) parameterHandle = 1 ;
     --indentation ;
@@ -344,8 +382,10 @@
 printOrder()
 {
     switch (order) {
-      case RECEIVE: cout << " receive" ; break ;
-      case TIMESTAMP: cout << " timestamp" ; break ;
+      case RECEIVE: if(verbose)
+               cout << " receive" ; break ;
+      case TIMESTAMP: if(verbose)
+               cout << " timestamp" ; break ;
     }
 }
 
@@ -354,8 +394,10 @@
 printTransport()
 {
     switch (transport) {
-      case RELIABLE: cout << " reliable" ; break ;
-      case BEST_EFFORT: cout << " best_effort" ; break ;
+      case RELIABLE: if(verbose)
+               cout << " reliable" ; break ;
+      case BEST_EFFORT: if(verbose)
+               cout << " best_effort" ; break ;
     }
 }
 
@@ -369,8 +411,10 @@
     dimensionHandle = 1 ;
 
     indent();
+       if(verbose) {
     cout << "(space \"" << arg.c_str() << "\" (id " 
         << routing_space.getHandle() << ")" ;
+       }
     ++indentation ;
 }
 
@@ -381,7 +425,9 @@
     root_object->addRoutingSpace(routing_space);
  
     --indentation ;
+    if(verbose) {
     cout << ")" ;
+    }
 }
 
 // ----------------------------------------------------------------------------
@@ -393,10 +439,12 @@
     routing_space.addDimension(dimension);
 
     indent();
+    if(verbose) {
     cout << "(dimension \"" << arg.c_str() << "\" (id "
         << dimension.getHandle() << "))" ;
+    }
 }
 
 }} // namespaces
 
-// $Id: fed.cc,v 3.15 2007/11/20 09:14:07 erk Exp $
+// $Id: fed.cc,v 3.16 2008/07/10 14:05:30 erk Exp $




reply via email to

[Prev in Thread] Current Thread [Next in Thread]