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)
1241
1241
*
1242
1242
* @return Document's filename for this object.
1243
1243
*/
1244
- string Object::
1245
- getDocumentFileName () const
1244
+ string Object::getDocumentFileName () const
1246
1245
{
1247
1246
return _document ? _document->getFileName () : " " ;
1248
1247
}
1249
1248
1250
1249
1250
+ int Object::getDocumentFileVersion () const
1251
+ {
1252
+ return _document ? _document->getDocumentVersion () : -1 ;
1253
+ }
1254
+
1255
+
1251
1256
// -----------------------------------------------------------------------------
1252
1257
// GENERATE XML DOCUMENT
1253
1258
// -----------------------------------------------------------------------------
Original file line number Diff line number Diff line change @@ -573,6 +573,13 @@ class OSIMCOMMON_API Object
573
573
/* * If there is a document associated with this object then return the
574
574
file name maintained by the document. Otherwise return an empty string. **/
575
575
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
+
576
583
void setAllPropertiesUseDefault (bool aUseDefault);
577
584
578
585
/* * Write this %Object into an XML file of the given name; conventionally
You can’t perform that action at this time.
0 commit comments