File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -1241,13 +1241,18 @@ updateDefaultObjectsXMLNode(SimTK::Xml::Element& aParent)
12411241 *
12421242 * @return Document's filename for this object.
12431243 */
1244- string Object::
1245- getDocumentFileName () const
1244+ string Object::getDocumentFileName () const
12461245{
12471246 return _document ? _document->getFileName () : " " ;
12481247}
12491248
12501249
1250+ int Object::getDocumentFileVersion () const
1251+ {
1252+ return _document ? _document->getDocumentVersion () : -1 ;
1253+ }
1254+
1255+
12511256// -----------------------------------------------------------------------------
12521257// GENERATE XML DOCUMENT
12531258// -----------------------------------------------------------------------------
Original file line number Diff line number Diff line change @@ -573,6 +573,13 @@ class OSIMCOMMON_API Object
573573 /* * If there is a document associated with this object then return the
574574 file name maintained by the document. Otherwise return an empty string. **/
575575 std::string getDocumentFileName () const ;
576+
577+ /* * If there is a document associated with this object then return its
578+ version number. For example this is 30000 for OpenSim 3.x documents
579+ and is 305xx for OpenSim 4.0 beta and above. If there is no document
580+ associated with the object, the method returns -1.*/
581+ int getDocumentFileVersion () const ;
582+
576583 void setAllPropertiesUseDefault (bool aUseDefault);
577584
578585 /* * Write this %Object into an XML file of the given name; conventionally
You can’t perform that action at this time.
0 commit comments