Make old type countObjectsOfType functions protected
This commit is contained in:
@@ -338,7 +338,6 @@ public:
|
||||
/// Returns an array with the correct types already.
|
||||
template<typename T>
|
||||
inline std::vector<T*> getObjectsOfType() const;
|
||||
int countObjectsOfType(const Base::Type& typeId) const;
|
||||
template<typename T>
|
||||
inline int countObjectsOfType() const;
|
||||
int countObjectsOfType(const char* typeName) const;
|
||||
@@ -593,6 +592,7 @@ protected:
|
||||
std::vector<App::DocumentObject*> readObjects(Base::XMLReader& reader);
|
||||
void writeObjects(const std::vector<App::DocumentObject*>&, Base::Writer& writer) const;
|
||||
bool saveToFile(const char* filename) const;
|
||||
int countObjectsOfType(const Base::Type& typeId) const;
|
||||
|
||||
void onBeforeChange(const Property* prop) override;
|
||||
void onChanged(const Property* prop) override;
|
||||
|
||||
@@ -387,14 +387,9 @@ public:
|
||||
* If no document name is given the active document is assumed.
|
||||
*
|
||||
* Set 'resolve' to true to resolve any sub object inside selection SubName
|
||||
* field
|
||||
*/
|
||||
unsigned int countObjectsOfType(const Base::Type& typeId=App::DocumentObject::getClassTypeId(),
|
||||
const char* pDocName=nullptr, ResolveMode resolve = ResolveMode::OldStyleElement) const;
|
||||
|
||||
/**
|
||||
* A convenience template-based method that returns the number of objects of the given type.
|
||||
* \a T must be based on Base::BaseClass, otherwise 0 is returned.
|
||||
* field.
|
||||
*
|
||||
* The typename T must be based on App::DocumentObject.
|
||||
*/
|
||||
template<typename T> inline unsigned int countObjectsOfType(
|
||||
const char* pDocName=nullptr, ResolveMode resolve = ResolveMode::OldStyleElement) const;
|
||||
@@ -715,6 +710,9 @@ protected:
|
||||
static App::DocumentObject *getObjectOfType(_SelObj &sel, Base::Type type,
|
||||
ResolveMode resolve, const char **subelement=nullptr);
|
||||
|
||||
unsigned int countObjectsOfType(const Base::Type& typeId=App::DocumentObject::getClassTypeId(),
|
||||
const char* pDocName=nullptr, ResolveMode resolve = ResolveMode::OldStyleElement) const;
|
||||
|
||||
static SelectionSingleton* _pcSingleton;
|
||||
|
||||
std::string DocName;
|
||||
|
||||
Reference in New Issue
Block a user