
 // -*- C++ -*-


 namespace Hurricane {

 /*! \class        Technology
  *  \brief        Technological rules description (\b API).
  *
  *  \section      sTechnologyIntro  Introduction
  *
  *                The Technology object provides the description of all the technology
  *                rules needed by the tools, currently it is limited to the description
  *                of all layers available. This object must be created once within the
  *                DataBase, and, in principle never destroyed (this would destroy layers
  *                and all objects laying on them ...).
  *
  *  \remark       There is only one technology for the current DataBase, and only one
  *                Database object, so only one technology defined.
  */


 /*! \function     Technology* Technology::create ( DataBase* dataBase, const Name& name );
  *  \Return       a newly created technology named \c \<name\> for the data base \c \<dataBase\>.
  *
  *  \caution      Throws an exception if the \c dataBase is \NULL, if the name is empty or if
  *                the \c dataBase has already a technology.
  */


 /*! \function     bool Technology::isMetal (const Layer* layer) const;
  *  \Return       \true if the \c layer is indeed of type BasicLayer::Material::metal.
  */

 /*! \function     DataBase* Technology::getDataBase () const;
  *  \Return       the DataBase owning the technology.
  */

 /*! \function     const Name& Technology::getName () const;
  *  \Return       the technology name.
  */

 /*! \function     Layer* Technology::getLayer ( const Name& name ) const;
  *  \Return       the Layer named \c \<name\> if it exists, else \NULL.
  */

 /*! \function     BasicLayer* Technology::getBasicLayer ( const Name& name ) const;
  *  \Return       the Layer named \c \<name\> if it exists and is a BasicLayer, else \NULL.
  */

 /*! \function     BasicLayer* Technology::getRegularLayer ( const Name& name ) const;
  *  \Return       the Layer named \c \<name\> if it exists and is a RegularLayer, else \NULL.
  */

 /*! \function     BasicLayer* Technology::getViaLayer ( const Name& name ) const;
  *  \Return       the Layer named \c \<name\> if it exists and is a ViaLayer, else \NULL.
  */

 /*! \function     Layers  Technology::getLayers () const;
  *  \Return       the collection of layers of the technology.
  *
  *  \remark       The layers are traversed according to their
  *                creation order. This order is very important,
  *                notably for the graphical display. Therefore deeper
  *                basic layers must be created first and upper layers
  *                later (the order of composite layers has no
  *                importance).
  */

 /*! \function     BasicLayers  Technology::getBasicLayers () const;
  *  \Return       the collection of basic layers of the technology
  *                (uses the same order).
  */

 /*! \function     BasicLayers  Technology::getBasicLayers ( const Layer::Mask& mask ) const;
  *  \Return       the collection of basic layers of the technology
  *                which matches the Layer mask \c \<mask\> (uses the same order).
  */

 /*! \function     RegularLayers  Technology::getRegularLayers () const;
  *  \Return       the collection of regular layers of the technology
  *                (uses the same order).
  */

 /*! \function     ViaLayers  Technology::getViaLayers () const;
  *  \Return       the collection of via layers of the technology
  *                (uses the same order).
  */

 /*! \function     Layer* Technology::getLayer ( const Layer::Mask& mask, bool useWorking=true) const;
  *  \Return       the layer whose mask equal \c mask and is flagged as working layer.
  *                if there is no working layer, returns the first layer that matches.
  */

 /*! \function     Layer* Technology::getMetalAbove ( const Layer* layer, bool useWorking=true) const;
  *  \Return       the first layer of metal type whose mask is above the current one. 
  *                if there is no working layer, returns the first layer that matches.
  */

 /*! \function     Layer* Technology::getMetalBelow ( const Layer* layer, bool useWorking=true) const;
  *  \Return       the first layer of metal type whose mask is below the current one. 
  *                if there is no working layer, returns the first layer that matches.
  */

 /*! \function     Layer* Technology::getCutAbove ( const Layer* layer, bool useWorking=true) const;
  *  \Return       the first layer of cut type whose mask is above the current one. 
  *                if there is no working layer, returns the first layer that matches.
  */

 /*! \function     Layer* Technology::getCutBelow ( const Layer* layer, bool useWorking=true) const;
  *  \Return       the first layer of cut type whose mask is below the current one. 
  *                if there is no working layer, returns the first layer that matches.
  */

 /*! \function     Layer* Technology::getViaBetween ( const Layer* layer1, const Layer* layer2) const;
  *  \Return       the cut layer between \c layer1 and \c layer2. They must be both of
  *                metal kind and contiguous.
  */

 /*! \function     Layer* Technology::getNthMetal ( int depth ) const;
  *  \Return       the \c Nth metal layer from the substrate. So a \c depth of zero should
  *                mean \c metal1.
  */


 /*! \function     void  Technology::setName ( const Name& name );
  *                Allows to change the technology name (if empty name, throws an exception).
  */

 /*! \function     bool  Technology::setWorkingLayer ( const Name& name );
  *                Sets the layer \c name as the working layer for it's mask.
  *                Returns \true on success (the layer exists).
  */

 /*! \function     bool  Technology::setWorkingLayer ( const Layer* layer );
  *                Sets the \c layer as the working layer for it's mask.
  *                Returns \true on success (the layer exists).
  */

 }
