DDSVector<be_CppName> be_CppEnclosingScope::FullNameToScope (UTL_ScopedName & utlScopedName) { DDSVector<be_CppName> result; UTL_ScopedNameActiveIterator iter (&utlScopedName); while (!iter.is_done()) { result.push_back (be_CppName (iter.item()->get_string ())); iter.next (); } return result; }
// Get the RepositoryID: UTL_String * UTL_Pragmas::get_repositoryID () { if (!pd_name) { return NULL; } char * repID = new char [4096]; UTL_String * ret; if (pd_pragma_ID) { // got an id already, don't need to build one. os_strcpy(repID, pd_pragma_ID->get_string()); } else { // build id from version and prefix info. // standard id's have IDL: os_strcpy(repID, "IDL:"); // add a prefix if one exists if (pd_pragma_prefix) { os_strcat(repID, pd_pragma_prefix->get_string()); os_strcat(repID, "/"); } // add the scope with '/' separators UTL_ScopedNameActiveIterator *i = new UTL_ScopedNameActiveIterator(pd_name); long firsttime = 1; for (;!i->is_done();i->next()) // skip first one cuz its blank { if (firsttime) { firsttime = 0; } else { os_strcat(repID, "/"); } os_strcat(repID, i->item()->get_string()); } delete i; // add ':' separator before version os_strcat(repID, ":"); // add version, default is '1.0' if (pd_pragma_version) { os_strcat(repID, pd_pragma_version->get_string()); } else { os_strcat(repID, "1.0"); } } ret = new UTL_String(repID); delete [] repID; return ret; }