Commit b85fa6247e8ebd1f8dce1463ecbb9c92253b3594
1 parent
250ef122
Rename Object::arguments, restore a const modifier, update comments
Showing
2 changed files
with
9 additions
and
5 deletions
openbr/openbr_plugin.cpp
| ... | ... | @@ -585,7 +585,7 @@ QStringList Object::parameters() const |
| 585 | 585 | return parameters; |
| 586 | 586 | } |
| 587 | 587 | |
| 588 | -QStringList Object::arguments(bool expanded) | |
| 588 | +QStringList Object::prunedArguments(bool expanded) | |
| 589 | 589 | { |
| 590 | 590 | QStringList arguments; |
| 591 | 591 | |
| ... | ... | @@ -650,7 +650,7 @@ QString Object::argument(int index, bool expanded) const |
| 650 | 650 | QString Object::description(bool expanded) |
| 651 | 651 | { |
| 652 | 652 | (void) expanded; |
| 653 | - QString argumentString = arguments(expanded).join(","); | |
| 653 | + QString argumentString = prunedArguments(expanded).join(","); | |
| 654 | 654 | if (argumentString.endsWith(",")) |
| 655 | 655 | argumentString.chop(1); |
| 656 | 656 | ... | ... |
openbr/openbr_plugin.h
| ... | ... | @@ -590,7 +590,7 @@ public: |
| 590 | 590 | File file; /*!< \brief The file used to construct the plugin. */ |
| 591 | 591 | |
| 592 | 592 | virtual void init() {} /*!< \brief Overload this function instead of the default constructor to initialize the derived class. It should be safe to call this function multiple times. */ |
| 593 | - virtual void store(QDataStream &stream) const; /*!< \brief Serialize the object. If force is true, classes must serialize directly on the stream not to e.g. a separate file. */ | |
| 593 | + virtual void store(QDataStream &stream) const; /*!< \brief Serialize the object. */ | |
| 594 | 594 | virtual void load(QDataStream &stream); /*!< \brief Deserialize the object. Default implementation calls init() after deserialization. */ |
| 595 | 595 | |
| 596 | 596 | /*!< \brief Serialize an object created via the plugin system, including the string used to build the base object, allowing re-creation of the object without knowledge of its base string*/ |
| ... | ... | @@ -601,7 +601,7 @@ public: |
| 601 | 601 | } |
| 602 | 602 | |
| 603 | 603 | QStringList parameters() const; /*!< \brief A string describing the parameters the object takes. */ |
| 604 | - QStringList arguments(bool expanded = false); /*!< \brief A string describing the values the object has. If expanded is true, all abbreviations and model file names should be replaced with a description of the object generated from those names. */ | |
| 604 | + QStringList prunedArguments(bool expanded = false); /*!< \brief A string describing the values the object has, default valued parameters will not be listed. If expanded is true, all abbreviations and model file names should be replaced with a description of the object generated from those names. */ | |
| 605 | 605 | QString argument(int index, bool expanded) const; /*!< \brief A string value for the argument at the specified index. */ |
| 606 | 606 | virtual QString description(bool expanded = false); /*!< \brief Returns a string description of the object. */ |
| 607 | 607 | |
| ... | ... | @@ -1291,6 +1291,10 @@ public: |
| 1291 | 1291 | return res; |
| 1292 | 1292 | } |
| 1293 | 1293 | |
| 1294 | + /*! | |
| 1295 | + * \brief Return a pointer to a simplified version of this transform (if possible). Transforms which are only active during training should remove | |
| 1296 | + * themselves by either returning their child transforms (where relevant) or returning NULL. Set newTransform to true if the transform returned is newly allocated. | |
| 1297 | + */ | |
| 1294 | 1298 | virtual Transform * simplify(bool & newTransform) { newTransform = false; return this; } |
| 1295 | 1299 | |
| 1296 | 1300 | protected: |
| ... | ... | @@ -1319,7 +1323,7 @@ inline TemplateList &operator>>(TemplateList &srcdst, const Transform &f) |
| 1319 | 1323 | /*! |
| 1320 | 1324 | * \brief Convenience function equivalent to store(). |
| 1321 | 1325 | */ |
| 1322 | -inline QDataStream &operator<<(QDataStream &stream, Transform &f) | |
| 1326 | +inline QDataStream &operator<<(QDataStream &stream, const Transform &f) | |
| 1323 | 1327 | { |
| 1324 | 1328 | f.store(stream); |
| 1325 | 1329 | return stream; | ... | ... |