void PseudoStateCanvas::save(QTextStream & st, bool ref, QString & warning) const { if (ref) { st << "pseudostatecanvas_ref " << get_ident() << " // " << browser_node->full_name(); } else { nl_indent(st); st << "pseudostatecanvas " << get_ident() << ' '; browser_node->save(st, TRUE, warning); indent(+1); nl_indent(st); if (horiz) st << "horizontal "; if (manual_size) save_xyzwh(st, this, " xyzwh"); else save_xyz(st, this, " xyz"); if (label != 0) save_xy(st, label, " label_xy"); save_stereotype_property(st, warning); indent(-1); nl_indent(st); st << "end"; } }
void SdLostFoundMsgSupportCanvas::save(QTextStream & st, bool ref, QString &) const { if (ref) st << "lostfoundmsgsupport_ref " << get_ident(); else { nl_indent(st); st << "lostfoundmsgsupport " << get_ident(); save_xyz(st, this, " xyz"); } }
void HubCanvas::save(QTextStream & st, bool ref, QString &) const { if (ref) st << "hubcanvas_ref " << get_ident(); else { nl_indent(st); st << "hubcanvas " << get_ident(); save_xyz(st, this, " xyz"); } }
void SdDurationCanvas::save(Q3TextStream & st, bool ref, QString & warning) const { if (ref) st << "durationcanvas_ref " << get_ident(); else if (!support->isaDuration()) { nl_indent(st); st << "durationcanvas " << get_ident() << ' '; ((DiagramCanvas *) ((SdLifeLineCanvas *) support)->get_obj())->save(st, TRUE, warning); save_internal(st); } }
void NoteCanvas::save(Q3TextStream & st, bool ref, QString &) const { if (ref) { st << "note_ref " << get_ident(); } else { nl_indent(st); st << "note " << get_ident() << ' '; save_internal(st); } }
void InfoCanvas::save(QTextStream & st, bool ref, QString &) const { if (ref) { st << "information_ref " << get_ident(); } else { nl_indent(st); st << "information " << get_ident() << ' '; save_internal(st); } }
void ImageCanvas::save(QTextStream & st, bool ref, QString &) const { if (ref) { st << "image_ref " << get_ident(); } else { nl_indent(st); st << "image " << get_ident() << ' '; save_string(fromUnicode(path), st); save_xyz(st, this, " xyz"); st << " end"; } }
void FlowCanvas::save(Q3TextStream & st, bool ref, QString & warning) const { if (ref) st << "flowcanvas_ref " << get_ident(); else if (begin->type() != UmlArrowPoint) { // relation canvas start nl_indent(st); st << "flowcanvas " << get_ident() << ' '; data->get_start()->save(st, TRUE, warning); // data doesn't have id indent(+1); if (geometry != NoGeometry) { nl_indent(st); st << "geometry " << stringify(geometry); if (!fixed_geometry) st << " unfixed"; } if (decenter_begin >= 0) { // float output/input bugged nl_indent(st); st << "decenter_begin " << ((int) (decenter_begin * 1000)); } if (decenter_end >= 0) { // float output/input bugged nl_indent(st); st << "decenter_end " << ((int) (decenter_end * 1000)); } nl_indent(st); (const FlowCanvas *) ArrowCanvas::save_lines(st, TRUE, TRUE, warning); settings.save(st); st << " write_horizontally " << stringify(write_horizontally); if (selection != 0) { nl_indent(st); st << "selection "; selection->save(st, FALSE, warning); } if (transformation != 0) { nl_indent(st); st << "transformation "; transformation->save(st, FALSE, warning); } if (stereotypeproperties != 0) stereotypeproperties->save(st, FALSE, warning); indent(-1); nl_indent(st); st << "end"; } }
BrowserColDiagram::~BrowserColDiagram() { if (deletedp() && !modifiedp()) { QString fn; fn.sprintf("%d.diagram", get_ident()); QDir d = BrowserView::get_dir(); QFile::remove(d.absFilePath(fn)); } all.remove(get_ident()); delete def; }
void StereotypePropertiesCanvas::save(QTextStream & st, bool ref, QString &) const { if (ref) { st << "stereotypeproperties_ref " << get_ident(); } else { nl_indent(st); st << "stereotypeproperties " << get_ident(); indent(+1); nl_indent(st); save_internal(st); indent(-1); } }
void SubjectCanvas::save(Q3TextStream & st, bool ref, QString &) const { if (ref) { st << "subject_ref " << get_ident(); } else { nl_indent(st); st << "subject " << get_ident() << ' '; save_string(fromUnicode(name), st); nl_indent(st); if (itscolor != UmlDefaultColor) st << " color " << stringify(itscolor); save_xyzwh(st, this, " xyzwh"); } }
BrowserFlow::~BrowserFlow() { all.remove(get_ident()); if (def) delete def; }
BrowserSimpleRelation::~BrowserSimpleRelation() { all.remove(get_ident()); if (def) delete def; }
void pack_report(object *obj, int print_message, char *message) { /* Notify the user */ if (print_message) { if (!terse) addmsg(message); msg("(%c%c) %s.", obj->o_type, print_letters[get_ident(obj)], inv_name(obj, !terse)); } if (obj->o_type == ARTIFACT) { has_artifact |= (1 << obj->o_which); picked_artifact |= (1 << obj->o_which); if (!(obj->ar_flags & ISUSED)) { obj->ar_flags |= ISUSED; pstats.s_exp += arts[obj->o_which].ar_worth / 10; check_level(); } } updpack(); return; }
int bt_l2cap_chan_disconnect(struct bt_l2cap_chan *chan) { struct bt_conn *conn = chan->conn; struct net_buf *buf; struct bt_l2cap_disconn_req *req; struct bt_l2cap_le_chan *ch; if (!conn) { return -ENOTCONN; } if (IS_ENABLED(CONFIG_BLUETOOTH_BREDR) && conn->type == BT_CONN_TYPE_BR) { return bt_l2cap_br_chan_disconnect(chan); } ch = BT_L2CAP_LE_CHAN(chan); BT_DBG("chan %p scid 0x%04x dcid 0x%04x", chan, ch->rx.cid, ch->tx.cid); ch->chan.ident = get_ident(); buf = l2cap_create_le_sig_pdu(BT_L2CAP_DISCONN_REQ, ch->chan.ident, sizeof(*req)); req = net_buf_add(buf, sizeof(*req)); req->dcid = sys_cpu_to_le16(ch->tx.cid); req->scid = sys_cpu_to_le16(ch->rx.cid); l2cap_chan_send_req(ch, buf, L2CAP_DISC_TIMEOUT); bt_l2cap_chan_set_state(chan, BT_L2CAP_DISCONNECT); return 0; }
int bt_l2cap_update_conn_param(struct bt_conn *conn, const struct bt_le_conn_param *param) { struct bt_l2cap_sig_hdr *hdr; struct bt_l2cap_conn_param_req *req; struct net_buf *buf; buf = bt_l2cap_create_pdu(&le_sig); if (!buf) { return -ENOBUFS; } hdr = net_buf_add(buf, sizeof(*hdr)); hdr->code = BT_L2CAP_CONN_PARAM_REQ; hdr->ident = get_ident(); hdr->len = sys_cpu_to_le16(sizeof(*req)); req = net_buf_add(buf, sizeof(*req)); req->min_interval = sys_cpu_to_le16(param->interval_min); req->max_interval = sys_cpu_to_le16(param->interval_max); req->latency = sys_cpu_to_le16(param->latency); req->timeout = sys_cpu_to_le16(param->timeout); bt_l2cap_send(conn, BT_L2CAP_CID_LE_SIG, buf); return 0; }
BrowserTransition::~BrowserTransition() { all.remove(get_ident()); if (def) delete def; }
static void ident(void) { char buffer[IDENT_SIZE]; get_ident(buffer); printf("Ident: %s\n", buffer); }
static void l2cap_chan_update_credits(struct bt_l2cap_le_chan *chan) { struct net_buf *buf; struct bt_l2cap_le_credits *ev; uint16_t credits; /* Only give more credits if it went bellow the defined threshold */ if (k_sem_count_get(&chan->rx.credits) > L2CAP_LE_CREDITS_THRESHOLD(chan->rx.init_credits)) { goto done; } /* Restore credits */ credits = chan->rx.init_credits - k_sem_count_get(&chan->rx.credits); l2cap_chan_rx_give_credits(chan, credits); buf = l2cap_create_le_sig_pdu(BT_L2CAP_LE_CREDITS, get_ident(), sizeof(*ev)); ev = net_buf_add(buf, sizeof(*ev)); ev->cid = sys_cpu_to_le16(chan->rx.cid); ev->credits = sys_cpu_to_le16(credits); bt_l2cap_send(chan->chan.conn, BT_L2CAP_CID_LE_SIG, buf); done: BT_DBG("chan %p credits %u", chan, k_sem_count_get(&chan->rx.credits)); }
void BrowserRelation::prepare_update_lib() const { all.memo_id_oid(get_ident(), original_id); if (def->is_a(this)) def->prepare_update_lib(); }
void c_common_write_pch (void) { timevar_push (TV_PCH_SAVE); targetm.prepare_pch_save (); (*debug_hooks->handle_pch) (1); cpp_write_pch_deps (parse_in, pch_outfile); gt_pch_save (pch_outfile); timevar_push (TV_PCH_CPP_SAVE); cpp_write_pch_state (parse_in, pch_outfile); timevar_pop (TV_PCH_CPP_SAVE); if (fseek (pch_outfile, 0, SEEK_SET) != 0 || fwrite (get_ident (), IDENT_LENGTH, 1, pch_outfile) != 1) fatal_error ("can%'t write %s: %m", pch_file); fclose (pch_outfile); timevar_pop (TV_PCH_SAVE); }
void IconCanvas::save(Q3TextStream & st, bool, QString & warning) const { nl_indent(st); st << "iconcanvas " << get_ident() << ' '; browser_node->save(st, TRUE, warning); nl_indent(st); save_xyz(st, this, " xyz"); }
BrowserRelation::~BrowserRelation() { all.remove(get_ident()); if (def) def->garbage(this); }
void TextCanvas::save(QTextStream & st, bool ref, QString &) const { if (ref) st << "textcanvas_ref " << get_ident(); else { nl_indent(st); st << "textcanvas " << get_ident() << ' '; save_string(fromUnicode(text), st); nl_indent(st); if (itsfont != UmlNormalFont) st << " font " << stringify(itsfont); if (fg_c != UmlBlack) st << " fg " << stringify(fg_c); if (bg_c != UmlTransparent) st << " bg " << stringify(bg_c); save_xyzwh(st, this, " xyzwh"); } }
void BrowserArtifact::prepare_update_lib() const { all.memo_id_oid(get_ident(), original_id); for (BrowserNode * child = firstChild(); child != 0; child = child->nextSibling()) ((BrowserNode *) child)->prepare_update_lib(); }
void ArrowJunctionCanvas::save(Q3TextStream & st, bool, QString & warning) const { nl_indent(st); st << "arrowjunctioncanvas " << get_ident() << ' '; interface->save(st, TRUE, warning); nl_indent(st); save_xyz(st, this, " xyz"); save_xy(st, label, " label_xy"); }
void Attribute::display(string& output) { //std::cout << get_name() << "(" << get_ident() << ") \t"; char temp[5]; itoa(get_ident(), temp, 10); output.append(get_name()); output.append("("); output.append(temp); output.append(")"); }
BrowserObjectDiagram::~BrowserObjectDiagram() { if (deletedp() && !modifiedp()) { QString fn; fn.sprintf("%d.diagram", get_ident()); QDir d = BrowserView::get_dir(); QFile::remove(d.absFilePath(fn)); } on_close(); // if(window) // window->set_browser_diagram(0); all.remove(get_ident()); delete def; }
void ParameterSetCanvas::save(QTextStream & st, bool ref, QString & warning) const { if (ref) { st << "parametersetcanvas_ref " << get_ident() << " // " << browser_node->full_name(); } else { nl_indent(st); st << "parametersetcanvas " << get_ident() << ' '; browser_node->save(st, TRUE, warning); nl_indent(st); if (itscolor != UmlDefaultColor) st << " color " << stringify(itscolor); save_xyz(st, this, " xyz"); save_stereotype_property(st, warning); nl_indent(st); st << "end"; } }
void UcClassCanvas::save(Q3TextStream & st, bool ref, QString & warning) const { if (ref) st << "classcanvas_ref " << get_ident() << " // " << browser_node->get_name(); else { nl_indent(st); st << "classcanvas " << get_ident() << ' '; browser_node->save(st, TRUE, warning); indent(+1); settings.save(st); nl_indent(st); if (itscolor != UmlDefaultColor) st << "color " << stringify(itscolor) << ' '; save_xyz(st, this, "xyz"); save_stereotype_property(st, warning); indent(-1); nl_indent(st); st << "end"; } }