void ScriptingSoundRandomizer::archive (const std::shared_ptr<Archive> &archive) { ScriptingSoundBase::archive(archive); archive->push_domain (class_id ()); *archive << ARCHIVE_PLUG(_in_weight_1, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_in_weight_2, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_in_weight_3, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_in_weight_4, DATA_PERSISTENT | DATA_SETTABLE); archive->pop_domain (); }
void ScriptingComponentsToVector3::archive (const std::shared_ptr<Archive> &archive) { ScriptingBase::archive(archive); archive->push_domain (class_id ()); *archive << ARCHIVE_PLUG(_in_x, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_in_y, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_in_z, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_out, DATA_PERSISTENT); archive->pop_domain (); }
void ScriptingDelayOff::archive (const std::shared_ptr<Archive> &archive) { ScriptingBase::archive(archive); archive->push_domain (class_id ()); *archive << ARCHIVE_DATA(_time, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_in, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_DATA(_delay, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_out, DATA_PERSISTENT); archive->pop_domain (); }
void ScriptingXOR::archive (const std::shared_ptr<Archive> &archive) { ScriptingBase::archive(archive); archive->push_domain (class_id ()); *archive << ARCHIVE_PLUG(_in1, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_in2, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_out, DATA_PERSISTENT); *archive << ARCHIVE_PLUG(_out_inv, DATA_PERSISTENT); archive->pop_domain (); }
void ScriptingGlobalPoll::archive (const std::shared_ptr<Archive> &archive) { ScriptingBase::archive(archive); archive->push_domain (class_id ()); *archive << ARCHIVE_PLUG(_global, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_value, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_read, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_DATA(_substitute, DATA_PERSISTENT | DATA_SETTABLE); archive->pop_domain (); }
void ScriptingTimerUpReset::archive (const std::shared_ptr<Archive> &archive) { ScriptingBase::archive(archive); archive->push_domain (class_id ()); *archive << ARCHIVE_DATA(_upper_range, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_speed, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_active, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_time, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_t, DATA_PERSISTENT); *archive << ARCHIVE_DATA(_reset_when_inactive, DATA_PERSISTENT | DATA_SETTABLE); archive->pop_domain (); }
void AnimationTrack::archive (const std::shared_ptr<Archive> &archive) { BaseClass::archive(archive); archive->push_domain (class_id ()); *archive << ARCHIVE_DATA_RAW(_name, DATA_PERSISTENT); *archive << ARCHIVE_DATA_RAW(_name_hash, DATA_PERSISTENT); DTsize size = _keyframes.size(); *archive << ARCHIVE_DATA_RAW(size, DATA_PERSISTENT); _keyframes.resize(size); for (auto &keyframe : _keyframes) keyframe.archive(archive); archive->pop_domain (); }
void PlaceableObject::archive (const std::shared_ptr<Archive> &archive) { ObjectBase::archive(archive); archive->push_domain (class_id ()); *archive << ARCHIVE_DATA_ACCESSORS("Pickable_In_Editor", PlaceableObject::is_pickable, PlaceableObject::set_pickable, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_translation, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_radius, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_orientation, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_scale, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_velocity, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_angular_velocity, DATA_PERSISTENT | DATA_SETTABLE); archive->pop_domain (); }
void ScriptingStringSwitcher::archive (const std::shared_ptr<Archive> &archive) { ScriptingBase::archive(archive); archive->push_domain (class_id ()); *archive << ARCHIVE_PLUG(_in1, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_in_string1, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_in2, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_in_string2, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_in3, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_in_string3, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_in4, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_in_string4, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_in5, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_in_string5, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_in6, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_in_string6, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_in7, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_in_string7, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_in8, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_in_string8, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_in9, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_in_string9, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_in10, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_in_string10, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_in11, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_in_string11, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_in12, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_in_string12, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_in13, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_in_string13, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_in14, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_in_string14, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_in15, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_in_string15, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_in16, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_in_string16, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_DATA(_buffer_output, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_out, DATA_PERSISTENT); archive->pop_domain (); }
void ScriptingIntSwitcher::archive (const std::shared_ptr<Archive> &archive) { ScriptingBase::archive(archive); archive->push_domain (class_id ()); *archive << ARCHIVE_PLUG(_in1, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_in_int1, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_in2, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_in_int2, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_in3, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_in_int3, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_in4, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_in_int4, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_DATA(_buffer_output, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_out, DATA_PERSISTENT); archive->pop_domain (); }
void ClassInfo::print_name_on(Stream* st) { #if USE_DEBUG_PRINTING if (!check_valid_for_print(st)) { return; } Symbol::Raw n = name(); if (n.equals(Symbols::unknown())) { n = ROM::get_original_class_name(this); } if (TraceGC) { st->print("[id %d] ", class_id()); } if (n.not_null()) { n().print_symbol_on(st); } else { st->print("NULL"); } #endif }
void ComponentGUIDrawIcon::archive (const std::shared_ptr<Archive> &archive) { ComponentBase::archive(archive); archive->push_domain (class_id ()); *archive << ARCHIVE_DATA_ACCESSORS("Material", ComponentGUIDrawIcon::material, ComponentGUIDrawIcon::set_material, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_DATA_ACCESSORS("Pressed_Material", ComponentGUIDrawIcon::pressed_material, ComponentGUIDrawIcon::set_pressed_material, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_DATA_ACCESSORS("Shader", ComponentGUIDrawIcon::shader, ComponentGUIDrawIcon::set_shader, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_DATA_ACCESSORS("Draw_Style", ComponentGUIDrawIcon::draw_style, ComponentGUIDrawIcon::set_draw_style, DATA_PERSISTENT | DATA_SETTABLE) .add_enum("Stretch Center 3x3") .add_enum("Stretch Center 2x2") .add_enum("Rectangle"); *archive << ARCHIVE_DATA(_corner_width, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_DATA(_corner_height, DATA_PERSISTENT | DATA_SETTABLE); archive->pop_domain (); }
void ScriptingTouch::archive (const std::shared_ptr<Archive> &archive) { ScriptingBase::archive(archive); archive->push_domain (class_id ()); *archive << ARCHIVE_PLUG(_touch_pos_1, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_touch_vel_1, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_touch_initial_1, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_touch_active_1, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_touch_pos_2, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_touch_vel_2, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_touch_initial_2, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_touch_active_2, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_touch_pos_3, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_touch_vel_3, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_touch_initial_3, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_touch_active_3, DATA_PERSISTENT | DATA_SETTABLE); archive->pop_domain (); }
void ScriptingKeyframesBool::archive (const std::shared_ptr<Archive> &archive) { ScriptingKeyframes::archive(archive); archive->push_domain (class_id ()); *archive << ARCHIVE_PLUG(_t, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_PLUG(_out, DATA_PERSISTENT); DTint keyCount = (DTint) _keyframes.size(); *archive << ARCHIVE_DATA(keyCount,DATA_PERSISTENT); _keyframes.resize(keyCount); for (DTint i = 0; i < keyCount; ++i) { *archive << ARCHIVE_DATA_RAW(_keyframes[i]._time, DATA_PERSISTENT); *archive << ARCHIVE_DATA_RAW(_keyframes[i]._value, DATA_PERSISTENT); if (archive->is_reading()) _keyframes[i]._id = _id++; } archive->pop_domain (); }
void CameraObject::archive (const std::shared_ptr<Archive> &archive) { PlaceableObject::archive(archive); archive->push_domain (class_id ()); *archive << ARCHIVE_DATA(_perspective, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_DATA(_perspective_fill_width, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_DATA(_left, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_DATA(_right, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_DATA(_top, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_DATA(_bottom, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_DATA(_near, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_DATA(_far, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_DATA(_post_projection, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_DATA_ACCESSORS("Far_Plane", CameraObject::far_plane, CameraObject::set_far_plane, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_DATA_ACCESSORS("Near_Plane", CameraObject::near_plane, CameraObject::set_near_plane, DATA_PERSISTENT | DATA_SETTABLE); *archive << ARCHIVE_DATA_ACCESSORS("Angle", CameraObject::angle, CameraObject::set_angle, DATA_PERSISTENT | DATA_SETTABLE) .add_range(0.0F,180.0F); *archive << ARCHIVE_DATA_ACCESSORS("Aspect_Ratio_Mul", CameraObject::aspect_ratio_mul, CameraObject::set_aspect_ratio_mul, DATA_PERSISTENT | DATA_SETTABLE); archive->pop_domain (); }
//+---------------------------------------------------------------------------- // // method : SimulatorCCDClass::write_class_property // // description : Set class description as property in database // //----------------------------------------------------------------------------- void SimulatorCCDClass::write_class_property() { // First time, check if database used //-------------------------------------------- if (Tango::Util::_UseDb == false) return; Tango::DbData data; string classname = get_name(); string header; string::size_type start, end; // Put title Tango::DbDatum title("ProjectTitle"); string str_title(""); title << str_title; data.push_back(title); // Put Description Tango::DbDatum description("Description"); vector<string> str_desc; str_desc.push_back(" "); description << str_desc; data.push_back(description); // put cvs or svn location string filename(classname); filename += "Class.cpp"; // Create a string with the class ID to // get the string into the binary string class_id(ClassId); // check for cvs information string src_path(CvsPath); start = src_path.find("/"); if (start!=string::npos) { end = src_path.find(filename); if (end>start) { string strloc = src_path.substr(start, end-start); // Check if specific repository start = strloc.find("/cvsroot/"); if (start!=string::npos && start>0) { string repository = strloc.substr(0, start); if (repository.find("/segfs/")!=string::npos) strloc = "ESRF:" + strloc.substr(start, strloc.length()-start); } Tango::DbDatum cvs_loc("cvs_location"); cvs_loc << strloc; data.push_back(cvs_loc); } } // check for svn information else { string src_path(SvnPath); start = src_path.find("://"); if (start!=string::npos) { end = src_path.find(filename); if (end>start) { header = "$HeadURL: "; start = header.length(); string strloc = src_path.substr(start, (end-start)); Tango::DbDatum svn_loc("svn_location"); svn_loc << strloc; data.push_back(svn_loc); } } } // Get CVS or SVN revision tag // CVS tag string tagname(TagName); header = "$Name: "; start = header.length(); string endstr(" $"); end = tagname.find(endstr); if (end!=string::npos && end>start) { string strtag = tagname.substr(start, end-start); Tango::DbDatum cvs_tag("cvs_tag"); cvs_tag << strtag; data.push_back(cvs_tag); } // SVN tag string svnpath(SvnPath); header = "$HeadURL: "; start = header.length(); end = svnpath.find(endstr); if (end!=string::npos && end>start) { string strloc = svnpath.substr(start, end-start); string tagstr ("/tags/"); start = strloc.find(tagstr); if ( start!=string::npos ) { start = start + tagstr.length(); end = strloc.find(filename); string strtag = strloc.substr(start, end-start-1); Tango::DbDatum svn_tag("svn_tag"); svn_tag << strtag; data.push_back(svn_tag); } } // Get URL location string httpServ(HttpServer); if (httpServ.length()>0) { Tango::DbDatum db_doc_url("doc_url"); db_doc_url << httpServ; data.push_back(db_doc_url); } // Put inheritance Tango::DbDatum inher_datum("InheritedFrom"); vector<string> inheritance; inheritance.push_back("Device_4Impl"); inher_datum << inheritance; data.push_back(inher_datum); // Call database and and values //-------------------------------------------- get_db_class()->put_property(data); }
void PlugNode::archive (const std::shared_ptr<Archive> &archive) { BaseClass::archive(archive); archive->push_domain (class_id ()); *archive << ARCHIVE_DATA(_name, DATA_PERSISTENT | DATA_SETTABLE); if (archive->is_reading()) { DTsize num_plugs = 0; *archive << ARCHIVE_DATA(num_plugs, DATA_PERSISTENT); // Read in a bunch of plugs for (DTsize i = 0; i < num_plugs; ++i) { archive->add_post_process(ARCHIVE_PROCESS_PLUGS(archive, (PlugBase*) NULL)); // NULL because the plug will be searched for later } DTsize num_events = 0; *archive << ARCHIVE_DATA(num_events, DATA_PERSISTENT); // Read in a bunch of plugs for (DTsize i = 0; i < num_events; ++i) { archive->add_post_process(ARCHIVE_PROCESS_EVENTS(archive, (Event*) NULL)); // NULL because the plug will be searched for later } } else { // Count the number of plugs that are connected DTsize num_plugs = 0; for (PlugIter iter(this); iter; ++iter) { if (iter()->incoming_connection()) ++num_plugs; } // Write out the plugs *archive << ARCHIVE_DATA(num_plugs, DATA_PERSISTENT); for (PlugIter iter(this); iter; ++iter) { if (iter()->incoming_connection()) archive->add_post_process(ARCHIVE_PROCESS_PLUGS(archive, iter())); } // Count the number of plugs that are connected DTsize num_events = 0; for (EventIter iter(this); iter; ++iter) { if (iter()->incoming_connections().size() > 0) ++num_events; } // Write out the events *archive << ARCHIVE_DATA(num_events, DATA_PERSISTENT); for (EventIter iter(this); iter; ++iter) { if (iter()->incoming_connections().size() > 0) archive->add_post_process(ARCHIVE_PROCESS_EVENTS(archive, iter())); } } archive->pop_domain (); }