Chic documentation
Houlder Technologies


Qualification
Home
Features
Tutorial
Examples
FAQ
Reference
Download
Mailing list
Contact

When Chic generates the definition for a variable or a function, the types and the id composing the variable or function are qualified. The types are qualified with the path of the type to which they looked up. Types for which the lookup didn't succeed are not qualified. The id is qualified with the path of the scope in which the variable or function was found in the hic-file. If the id of a variable or function is already partially qualified and the qualifier does not refer to the current scope, Chic assumes that the qualifier refers to a scope below the current scope. Example:

Hic-file:
  namespace M
  {
    struct S {};
  }

  namespace N
  {
    using namespace M;

    // Qualify return type.
    S f() {}
    // Id is qualified with the current scope.
    void N::g() {}

    struct R
    {
      // Qualify all types in return type.  Don't
      // qualify arguments or exception specifications.
      std::list<S>* h(S) throw (S) {}
      void i();
    };
    // Assume R refers to N::R.
    void R::i() {}
  }
Cc-file:
  // ...

  M::S N::f() {}
  void N::g() {}

  std::list<M::S>* N::R::h(S) throw (S) {}
  void N::R::i() {}




Home