From Merriam Webster
Complete definition of QUALIFY
transitive verb 1 a: reduce from general to a certain or limited form: change b: make it less severe or severe: moderate c: change strength or aroma d: limit or change meaning (as a noun) 2: characterize by naming the attribute: describe 3 a: be consistent with training, skill or ability for special purposes b (1): declare competent or adequate: certify (2): invest in legal capacity: license
Clauses 1 and 2 apply. Java and C ++ have scope / namespaces, and "qualify" means introducing enough areas to distinguish potential candidates.
Cf: If you have two classes with a member called "read".
class Foo { void read(); }; class Bar { void read(); };
In your implementation file, you will perform both functions. But if you wrote (C ++)
void read() {}
This is valid, but it creates a function in the global namespace, and does not perform one of two functions. The same code written inside the class definition of Foo will implement Foo :: read.
So, in order to implement our member functions outside of class definitions, we need to qualify - to reduce from the general, to indicate the attribute of the path to the container - which we are reading.
void Foo::read() {} void Bar::read() {}
The global namespace is "::", so you can even be explicit if you are trying to use it:
void ::read() {} // note: this name is already taken by stdio read() :)
kfsone
source share