+ //=========================================================================
+
+ std::string GPortModel::getStatusText()
+ {
+ std::string temp = "Name:";
+
+ temp+=_bbtkName;
+ temp+=" Type:";
+ temp+=_bbtkType;
+ temp+=" Box:";
+ temp+=_parentBox->getBBTKType();
+ if(_portType==GOUTPUTPORT)
+ {
+ temp+=" [Output Port]";
+ }
+ else if(_portType==GINPUTPORT)
+ {
+ if(isValueSet())
+ {
+ temp+=" Value:";
+ temp+=_value;
+ }
+ temp+=" [Input Port]";
+ }
+
+ return temp;
+ }
+
+ //=========================================================================
+
+ GBlackBoxModel* GPortModel::getParentBox()
+ {
+ return _parentBox;
+ }
+
+ //=========================================================================
+
+ bool GPortModel::isConnected()
+ {
+ return _isConnected;
+ }
+
+ //=========================================================================
+
+ void GPortModel::setConnected(bool value)
+ {
+ _isConnected=value;
+ notifyObservers(_objectId);
+ }
+
+ //=========================================================================
+
+ void GPortModel::setValue(std::string value)
+ {
+ _value = value;
+ if(_value=="")
+ {
+ _isValueSet=false;
+ }
+ else
+ {
+ _isValueSet=true;
+ }
+ notifyObservers(_objectId);
+ }
+
+ //=========================================================================
+
+ std::string GPortModel::getValue()
+ {
+ return _value;
+ }
+
+ //=========================================================================
+
+ bool GPortModel::isValueSet()
+ {
+ return _isValueSet;
+ }
+
+ //=========================================================================
+