void nImO::Array::printToStringBuffer (nImO::StringBuffer & outBuffer, const bool squished) const { ODL_OBJENTER(); //#### ODL_P1("outBuffer = ", &outBuffer); //#### ODL_B1("squished = ", squished); //#### bool first = true; outBuffer.addChar(kStartArrayChar); for (const_iterator walker(inherited2::begin()); inherited2::end() != walker; ++walker) { SpValue aValue(*walker); if (nullptr != aValue) { if ((! squished) || (! first)) { outBuffer.addChar(' '); } aValue->printToStringBuffer(outBuffer, squished); first = false; } } if (! squished) { outBuffer.addChar(' '); } outBuffer.addChar(kEndArrayChar); ODL_OBJEXIT(); //#### } // nImO::Array::printToStringBuffer
nImO::Array::~Array (void) { ODL_OBJENTER(); //#### clear(); ODL_OBJEXIT(); //#### } // nImO::Array::~Array
void ServiceEntity::positionChangeComplete(void) { ODL_OBJENTER(); //#### _panel.getOwner().moveEntityToEndOfForegroundList(this); _selected = _drawMoveMarker = false; // something to do?? ODL_OBJEXIT(); //#### } // ServiceEntity::positionChangeComplete
void ServiceEntity::handlePositionChange(void) { ODL_OBJENTER(); //#### // Here we re-adjust any lines attached to the entity. _panel.getOwner().movementStarted(); _selected = _drawMoveMarker = true; ODL_OBJEXIT(); //#### } // ServiceEntity::handlePositionChange
void ServiceEntity::setup(string entityName, const float xx, const float yy) { ODL_OBJENTER(); //#### ODL_S1s("entityName = ", entityName); //#### ODL_D2("xx = ", xx, "yy = ", yy); //#### _panel.setup(); _panel.setName(entityName); setPosition(xx, yy); _panel.setTracker(this); ODL_OBJEXIT(); //#### } // ServiceEntity::setup
MovementTracker::~MovementTracker(void) { ODL_OBJENTER(); //#### ODL_OBJEXIT(); //#### } // MovementTracker::~MovementTracker
ServiceEntity::~ServiceEntity(void) { ODL_OBJENTER(); //#### ODL_OBJEXIT(); //#### } // ServiceEntity::~ServiceEntity
void ServiceEntity::draw(void) { ODL_OBJENTER(); //#### ServiceViewerApp & owner = _panel.getOwner(); _panel.draw(); if (_drawConnectMarker) { ofPoint markerPos(_panel.getWidth() / 2, _panel.getHeader()); ofSetColor(ServiceViewerApp::getMarkerColor()); ofFill(); ofCircle(markerPos + getShape().getTopLeft(), kMarkerSide / 2); } else if (_drawDisconnectMarker) { ofPoint markerPos(_panel.getWidth() / 2, _panel.getHeader()); ofSetColor(ServiceViewerApp::getMarkerColor()); ofNoFill(); ofSetLineWidth(2); ofCircle(markerPos + getShape().getTopLeft(), kMarkerSide / 2); } else if (_drawMoveMarker) { ofPoint markerPos(_panel.getWidth() / 2, _panel.getHeader()); ofSetColor(ServiceViewerApp::getMarkerColor()); ofFill(); markerPos += getShape().getTopLeft() - ofPoint(kMarkerSide / 2, kMarkerSide / 2); ofRect(markerPos, kMarkerSide, kMarkerSide); } for (int ii = 0, mm = _panel.getNumPorts(); mm > ii; ++ii) { PortEntry * anEntry = _panel.getPort(ii); if (anEntry) { ofPoint aCentre(anEntry->getCentre()); const PortEntry::Connections & connex = anEntry->getOutputConnections(); for (PortEntry::Connections::const_iterator walker(connex.begin()); connex.end() != walker; ++walker) { PortEntry::AnchorSide anchorHere; PortEntry::AnchorSide anchorThere; MplusM::Common::ChannelMode mode = walker->_connectionMode; PortEntry * otherEntry = walker->_otherPort; ofPoint otherCentre(otherEntry->getCentre()); ofPoint fromHere; ofPoint toThere; // Check if the destination is above the source, in which case we // determine the anchors in the reverse order. if (aCentre.y < otherCentre.y) { anchorHere = anEntry->calculateClosestAnchor(fromHere, true, false, otherCentre); anchorThere = otherEntry->calculateClosestAnchor(toThere, false, PortEntry::kAnchorBottomCentre == anchorHere, aCentre); } else { anchorThere = otherEntry->calculateClosestAnchor(toThere, false, false, aCentre); anchorHere = anEntry->calculateClosestAnchor(fromHere, true, PortEntry::kAnchorBottomCentre == anchorThere, otherCentre); } if (otherEntry->isService()) { ofSetLineWidth(owner.getServiceConnectionWidth()); } else if (otherEntry->isInputOutput()) { ofSetLineWidth(owner.getInputOutputConnectionWidth()); } else { ofSetLineWidth(owner.getNormalConnectionWidth()); } switch (mode) { case MplusM::Common::kChannelModeTCP : ofSetColor(ServiceViewerApp::getTcpConnectionColor()); break; case MplusM::Common::kChannelModeUDP : ofSetColor(ServiceViewerApp::getUdpConnectionColor()); break; default : ofSetColor(ServiceViewerApp::getOtherConnectionColor()); break; } DrawBezier(fromHere, toThere, aCentre, otherCentre); ofSetLineWidth(1); PortEntry::drawSourceAnchor(anchorHere, fromHere); PortEntry::drawTargetAnchor(anchorThere, toThere); } } } ODL_OBJEXIT(); //#### } // ServiceEntity::draw