+
+ //=======================================================================
+ void ComplexBlackBox::Check(bool recursive)
+ {
+ bbtkMessage("debug",1,"**** Checking Complex Black Box "<<(void*)this
+ <<" ["<<bbGetFullName()<<"]"<<std::endl);
+
+ BlackBoxMapType::const_iterator i;
+ for ( i = mBlackBoxMap.begin(); i != mBlackBoxMap.end(); ++i )
+ {
+ i->second->Check(recursive);
+ }
+ ConnectionListType::const_iterator j;
+ for ( j = mConnectionList.begin();
+ j != mConnectionList.end(); ++j )
+ {
+ (*j)->Check();
+ }
+ bbtkMessage("debug",1,"**** Checking Complex Black Box "<<(void*)this
+ <<" ["<<bbGetFullName()<<"] ... OK"<<std::endl);
+
+ }
+ //=======================================================================
+
+ //=========================================================================
+ /// Returns the name with the name of the parent prepended if any
+ std::string ComplexBlackBox::bbGetNameWithParent() const
+ {
+ if (!IsAPrototype()) return BlackBox::bbGetNameWithParent();
+ if (bbGetDescriptor())
+ {
+ return bbGetDescriptor()->GetFullTypeName() + ":" + bbGetName();
+ }
+ else
+ {
+ return std::string(":") + bbGetName();
+ }
+ }
+ //=========================================================================
+
+ //==========================================================================
+ std::string ComplexBlackBox::GetObjectName() const
+ {
+ return std::string("ComplexBlackBox '")+bbGetNameWithParent()
+ +std::string("'");
+ }
+ //==========================================================================
+
+ //==========================================================================
+ std::string ComplexBlackBox::GetObjectInfo() const
+ {
+ std::stringstream i;
+ i << " - "<<mBlackBoxMap.size() << " boxes / "
+ <<mConnectionList.size() << " connections" << std::endl;
+ return i.str();
+ }
+ //==========================================================================
+
+ //==========================================================================
+ size_t ComplexBlackBox::GetObjectSize() const
+ {
+ size_t s = Superclass::GetObjectSize();
+ s += ComplexBlackBox::GetObjectInternalSize();
+ return s;
+ }
+ //==========================================================================
+ //==========================================================================
+ size_t ComplexBlackBox::GetObjectInternalSize() const
+ {
+ size_t s = sizeof(ComplexBlackBox);
+ return s;
+ }
+ //==========================================================================
+ //==========================================================================
+ size_t ComplexBlackBox::GetObjectRecursiveSize() const
+ {
+ size_t s = Superclass::GetObjectRecursiveSize();
+ s += ComplexBlackBox::GetObjectInternalSize();
+ BlackBoxMapType::const_iterator i;
+ for ( i = mBlackBoxMap.begin(); i != mBlackBoxMap.end(); ++i )
+ {
+ s += i->second->GetObjectRecursiveSize();
+ }
+ ConnectionListType::const_iterator j;
+ for ( j = mConnectionList.begin();
+ j != mConnectionList.end(); ++j )
+ {
+ s += (*j)->GetObjectRecursiveSize();
+ }
+ return s;
+ }
+ //==========================================================================
+