Index: /XIOS/trunk/src/attribute.hpp
===================================================================
--- /XIOS/trunk/src/attribute.hpp	(revision 777)
+++ /XIOS/trunk/src/attribute.hpp	(revision 778)
@@ -52,4 +52,7 @@
 //            virtual void toBinary  (StdOStream & os) const = 0;
 //            virtual void fromBinary(StdIStream & is) = 0;
+
+            //! Returns true if and only if the attribute should be publicly exposed in the API
+            virtual bool isPublic() const { return true; }
 
             virtual void generateCInterface(ostream& oss, const string& className) = 0 ;
Index: /XIOS/trunk/src/attribute_array.hpp
===================================================================
--- /XIOS/trunk/src/attribute_array.hpp	(revision 777)
+++ /XIOS/trunk/src/attribute_array.hpp	(revision 778)
@@ -15,5 +15,5 @@
       /// ////////////////////// DÃ©clarations ////////////////////// ///
       template <typename T_numtype, int N_rank>
-         class CAttributeArray : public CAttribute, public CArray<T_numtype, N_rank>, public PublicAttributes
+         class CAttributeArray : public CAttribute, public CArray<T_numtype, N_rank>
       {
         public :
Index: /XIOS/trunk/src/attribute_array_impl.hpp
===================================================================
--- /XIOS/trunk/src/attribute_array_impl.hpp	(revision 777)
+++ /XIOS/trunk/src/attribute_array_impl.hpp	(revision 778)
@@ -133,6 +133,5 @@
       void CAttributeArray<T_numtype, N_rank>::generateCInterface(ostream& oss,const string& className)
       {
-        if (this->isAttributePublic())
-          CInterface::AttributeCInterface<CArray<T_numtype, N_rank> >(oss, className, this->getName()) ;
+        CInterface::AttributeCInterface<CArray<T_numtype, N_rank> >(oss, className, this->getName());
       }
 
@@ -140,6 +139,5 @@
       void CAttributeArray<T_numtype, N_rank>::generateFortran2003Interface(ostream& oss,const string& className)
       {
-        if (this->isAttributePublic())
-          CInterface::AttributeFortran2003Interface<CArray<T_numtype, N_rank> >(oss, className, this->getName()) ;
+        CInterface::AttributeFortran2003Interface<CArray<T_numtype, N_rank> >(oss, className, this->getName());
       }
 
@@ -147,6 +145,5 @@
       void CAttributeArray<T_numtype, N_rank>::generateFortranInterfaceDeclaration_(ostream& oss,const string& className)
       {
-        if (this->isAttributePublic())
-          CInterface::AttributeFortranInterfaceDeclaration<CArray<T_numtype, N_rank> >(oss, className, this->getName()+"_") ;
+        CInterface::AttributeFortranInterfaceDeclaration<CArray<T_numtype, N_rank> >(oss, className, this->getName() + "_");
       }
 
@@ -154,6 +151,5 @@
       void CAttributeArray<T_numtype, N_rank>::generateFortranInterfaceBody_(ostream& oss,const string& className)
       {
-        if (this->isAttributePublic())
-          CInterface::AttributeFortranInterfaceBody<CArray<T_numtype, N_rank> >(oss, className, this->getName()) ;
+        CInterface::AttributeFortranInterfaceBody<CArray<T_numtype, N_rank> >(oss, className, this->getName());
       }
 
@@ -161,6 +157,5 @@
       void CAttributeArray<T_numtype, N_rank>::generateFortranInterfaceDeclaration(ostream& oss,const string& className)
       {
-        if (this->isAttributePublic())
-          CInterface::AttributeFortranInterfaceDeclaration<CArray<T_numtype, N_rank> >(oss, className, this->getName()) ;
+        CInterface::AttributeFortranInterfaceDeclaration<CArray<T_numtype, N_rank> >(oss, className, this->getName());
       }
 
@@ -168,6 +163,5 @@
       void CAttributeArray<T_numtype, N_rank>::generateFortranInterfaceGetDeclaration_(ostream& oss,const string& className)
       {
-        if (this->isAttributePublic())
-          CInterface::AttributeFortranInterfaceGetDeclaration<CArray<T_numtype, N_rank> >(oss, className, this->getName()+"_") ;
+        CInterface::AttributeFortranInterfaceGetDeclaration<CArray<T_numtype, N_rank> >(oss, className, this->getName() + "_");
       }
 
@@ -175,6 +169,5 @@
       void CAttributeArray<T_numtype, N_rank>::generateFortranInterfaceGetBody_(ostream& oss,const string& className)
       {
-        if (this->isAttributePublic())
-          CInterface::AttributeFortranInterfaceGetBody<CArray<T_numtype, N_rank> >(oss, className, this->getName()) ;
+        CInterface::AttributeFortranInterfaceGetBody<CArray<T_numtype, N_rank> >(oss, className, this->getName());
       }
 
@@ -182,6 +175,5 @@
       void CAttributeArray<T_numtype, N_rank>::generateFortranInterfaceGetDeclaration(ostream& oss,const string& className)
       {
-        if (this->isAttributePublic())
-          CInterface::AttributeFortranInterfaceGetDeclaration<CArray<T_numtype, N_rank> >(oss, className, this->getName()) ;
+        CInterface::AttributeFortranInterfaceGetDeclaration<CArray<T_numtype, N_rank> >(oss, className, this->getName());
       }
 } // namespace xios
Index: /XIOS/trunk/src/attribute_map.cpp
===================================================================
--- /XIOS/trunk/src/attribute_map.cpp	(revision 777)
+++ /XIOS/trunk/src/attribute_map.cpp	(revision 778)
@@ -226,8 +226,11 @@
          for (; it != end; it++)
          {
-           oss << std::endl << iendl;
-           it->second->generateCInterface(oss, className);
-           oss << iendl;
-           it->second->generateCInterfaceIsDefined(oss, className);
+           if (it->second->isPublic())
+           {
+             oss << std::endl << iendl;
+             it->second->generateCInterface(oss, className);
+             oss << iendl;
+             it->second->generateCInterfaceIsDefined(oss, className);
+           }
          }
       }
@@ -238,8 +241,11 @@
          for (; it != end; it++)
          {
-           oss << std::endl << iendl;
-           it->second->generateFortran2003Interface(oss, className);
-           oss << iendl;
-           it->second->generateFortran2003InterfaceIsDefined(oss, className);
+           if (it->second->isPublic())
+           {
+             oss << std::endl << iendl;
+             it->second->generateFortran2003Interface(oss, className);
+             oss << iendl;
+             it->second->generateFortran2003InterfaceIsDefined(oss, className);
+           }
          }
       }
@@ -258,9 +264,12 @@
          for (it = begin; it != end; it++)
          {
-           oss << ", " << it->second->getName() << "_";
-           if (oss.tellp() - startPos > 90)
-           {
-             oss << "  &" << iendl;
-             startPos = oss.tellp();
+           if (it->second->isPublic())
+           {
+             oss << ", " << it->second->getName() << "_";
+             if (oss.tellp() - startPos > 90)
+             {
+               oss << "  &" << iendl;
+               startPos = oss.tellp();
+             }
            }
          }
@@ -274,12 +283,18 @@
          for (it = begin; it != end; it++)
          {
-           oss << iendl;
-           it->second->generateFortranInterfaceDeclaration_(oss, className);
-         }
-
-         for (it = begin; it != end; it++)
-         {
-           oss << std::endl << iendl;
-           it->second->generateFortranInterfaceBody_(oss, className);
+           if (it->second->isPublic())
+           {
+             oss << iendl;
+             it->second->generateFortranInterfaceDeclaration_(oss, className);
+           }
+         }
+
+         for (it = begin; it != end; it++)
+         {
+           if (it->second->isPublic())
+           {
+             oss << std::endl << iendl;
+             it->second->generateFortranInterfaceBody_(oss, className);
+           }
          }
 
@@ -299,9 +314,12 @@
          for (it = begin; it != end; it++)
          {
-           oss << ", " << it->second->getName() << "_";
-           if (oss.tellp() - startPos > 90)
-           {
-             oss << "  &" << iendl;
-             startPos = oss.tellp();
+           if (it->second->isPublic())
+           {
+             oss << ", " << it->second->getName() << "_";
+             if (oss.tellp() - startPos > 90)
+             {
+               oss << "  &" << iendl;
+               startPos = oss.tellp();
+             }
            }
          }
@@ -315,12 +333,18 @@
          for (it = begin; it != end; it++)
          {
-           oss << iendl;
-           it->second->generateFortranInterfaceGetDeclaration_(oss, className);
-         }
-
-         for (it = begin; it != end; it++)
-         {
-           oss << std::endl << iendl;
-           it->second->generateFortranInterfaceGetBody_(oss, className);
+           if (it->second->isPublic())
+           {
+             oss << iendl;
+             it->second->generateFortranInterfaceGetDeclaration_(oss, className);
+           }
+         }
+
+         for (it = begin; it != end; it++)
+         {
+           if (it->second->isPublic())
+           {
+             oss << std::endl << iendl;
+             it->second->generateFortranInterfaceGetBody_(oss, className);
+           }
          }
 
@@ -340,9 +364,12 @@
          for (it = begin; it != end; it++)
          {
-           oss << ", " << it->second->getName() << "_";
-           if (oss.tellp() - startPos > 90)
-           {
-             oss << "  &" << iendl;
-             startPos = oss.tellp();
+           if (it->second->isPublic())
+           {
+             oss << ", " << it->second->getName() << "_";
+             if (oss.tellp() - startPos > 90)
+             {
+               oss << "  &" << iendl;
+               startPos = oss.tellp();
+             }
            }
          }
@@ -356,12 +383,18 @@
          for (it = begin; it != end; it++)
          {
-           oss << iendl;
-           it->second->generateFortranInterfaceIsDefinedDeclaration_(oss, className);
-         }
-
-         for (it = begin; it != end; it++)
-         {
-           oss << std::endl << iendl;
-           it->second->generateFortranInterfaceIsDefinedBody_(oss, className);
+           if (it->second->isPublic())
+           {
+             oss << iendl;
+             it->second->generateFortranInterfaceIsDefinedDeclaration_(oss, className);
+           }
+         }
+
+         for (it = begin; it != end; it++)
+         {
+           if (it->second->isPublic())
+           {
+             oss << std::endl << iendl;
+             it->second->generateFortranInterfaceIsDefinedBody_(oss, className);
+           }
          }
 
@@ -381,9 +414,12 @@
          for (it = begin; it != end; it++)
          {
-           oss << ", " << it->second->getName();
-           if (oss.tellp() - startPos > 90)
-           {
-             oss << "  &" << iendl;
-             startPos = oss.tellp();
+           if (it->second->isPublic())
+           {
+             oss << ", " << it->second->getName();
+             if (oss.tellp() - startPos > 90)
+             {
+               oss << "  &" << iendl;
+               startPos = oss.tellp();
+             }
            }
          }
@@ -397,6 +433,9 @@
          for (it = begin; it != end; it++)
          {
-           oss << iendl;
-           it->second->generateFortranInterfaceDeclaration(oss, className);
+           if (it->second->isPublic())
+           {
+             oss << iendl;
+             it->second->generateFortranInterfaceDeclaration(oss, className);
+           }
          }
 
@@ -410,9 +449,12 @@
          for (it = begin; it != end; it++)
          {
-           oss << ", " << it->second->getName();
-           if (oss.tellp() - startPos > 90)
-           {
-             oss << "  &" << iendl;
-             startPos = oss.tellp();
+           if (it->second->isPublic())
+           {
+             oss << ", " << it->second->getName();
+             if (oss.tellp() - startPos > 90)
+             {
+               oss << "  &" << iendl;
+               startPos = oss.tellp();
+             }
            }
          }
@@ -434,9 +476,12 @@
          for (it = begin; it != end; it++)
          {
-           oss << ", " << it->second->getName();
-           if (oss.tellp() - startPos > 90)
-           {
-             oss << "  &" << iendl;
-             startPos = oss.tellp();
+           if (it->second->isPublic())
+           {
+             oss << ", " << it->second->getName();
+             if (oss.tellp() - startPos > 90)
+             {
+               oss << "  &" << iendl;
+               startPos = oss.tellp();
+             }
            }
          }
@@ -450,6 +495,9 @@
          for (it = begin; it != end; it++)
          {
-           oss << iendl;
-           it->second->generateFortranInterfaceGetDeclaration(oss, className);
+           if (it->second->isPublic())
+           {
+             oss << iendl;
+             it->second->generateFortranInterfaceGetDeclaration(oss, className);
+           }
          }
 
@@ -463,9 +511,12 @@
          for (it = begin; it != end; it++)
          {
-           oss << ", " << it->second->getName();
-           if (oss.tellp() - startPos > 90)
-           {
-             oss << "  &" << iendl;
-             startPos = oss.tellp();
+           if (it->second->isPublic())
+           {
+             oss << ", " << it->second->getName();
+             if (oss.tellp() - startPos > 90)
+             {
+               oss << "  &" << iendl;
+               startPos = oss.tellp();
+             }
            }
          }
@@ -487,9 +538,12 @@
          for (it = begin; it != end; it++)
          {
-           oss << ", " << it->second->getName();
-           if (oss.tellp() - startPos > 90)
-           {
-             oss << "  &" << iendl;
-             startPos = oss.tellp();
+           if (it->second->isPublic())
+           {
+             oss << ", " << it->second->getName();
+             if (oss.tellp() - startPos > 90)
+             {
+               oss << "  &" << iendl;
+               startPos = oss.tellp();
+             }
            }
          }
@@ -503,6 +557,9 @@
          for (it = begin; it != end; it++)
          {
-           oss << iendl;
-           it->second->generateFortranInterfaceIsDefinedDeclaration(oss, className);
+           if (it->second->isPublic())
+           {
+             oss << iendl;
+             it->second->generateFortranInterfaceIsDefinedDeclaration(oss, className);
+           }
          }
 
@@ -516,9 +573,12 @@
          for (it = begin; it != end; it++)
          {
-           oss << ", " << it->second->getName();
-           if (oss.tellp() - startPos > 90)
-           {
-             oss << "  &" << iendl;
-             startPos = oss.tellp();
+           if (it->second->isPublic())
+           {
+             oss << ", " << it->second->getName();
+             if (oss.tellp() - startPos > 90)
+             {
+               oss << "  &" << iendl;
+               startPos = oss.tellp();
+             }
            }
          }
@@ -540,9 +600,12 @@
          for (it = begin; it != end; it++)
          {
-           oss << ", " << it->second->getName();
-           if (oss.tellp() - startPos > 90)
-           {
-             oss << "  &" << iendl;
-             startPos = oss.tellp();
+           if (it->second->isPublic())
+           {
+             oss << ", " << it->second->getName();
+             if (oss.tellp() - startPos > 90)
+             {
+               oss << "  &" << iendl;
+               startPos = oss.tellp();
+             }
            }
          }
@@ -558,6 +621,9 @@
          for (it = begin; it != end; it++)
          {
-           oss << iendl;
-           it->second->generateFortranInterfaceDeclaration(oss, className);
+           if (it->second->isPublic())
+           {
+             oss << iendl;
+             it->second->generateFortranInterfaceDeclaration(oss, className);
+           }
          }
 
@@ -571,9 +637,12 @@
          for (it = begin; it != end; it++)
          {
-           oss << ", " << it->second->getName();
-           if (oss.tellp() - startPos > 90)
-           {
-             oss << "  &" << iendl;
-             startPos = oss.tellp();
+           if (it->second->isPublic())
+           {
+             oss << ", " << it->second->getName();
+             if (oss.tellp() - startPos > 90)
+             {
+               oss << "  &" << iendl;
+               startPos = oss.tellp();
+             }
            }
          }
@@ -595,9 +664,12 @@
          for (it = begin; it != end; it++)
          {
-           oss << ", " << it->second->getName();
-           if (oss.tellp() - startPos > 90)
-           {
-             oss << "  &" << iendl;
-             startPos = oss.tellp();
+           if (it->second->isPublic())
+           {
+             oss << ", " << it->second->getName();
+             if (oss.tellp() - startPos > 90)
+             {
+               oss << "  &" << iendl;
+               startPos = oss.tellp();
+             }
            }
          }
@@ -613,6 +685,9 @@
          for (it = begin; it != end; it++)
          {
-           oss << iendl;
-           it->second->generateFortranInterfaceGetDeclaration(oss, className);
+           if (it->second->isPublic())
+           {
+             oss << iendl;
+             it->second->generateFortranInterfaceGetDeclaration(oss, className);
+           }
          }
 
@@ -626,9 +701,12 @@
          for (it = begin; it != end; it++)
          {
-           oss << ", " << it->second->getName();
-           if (oss.tellp() - startPos > 90)
-           {
-             oss << "  &" << iendl;
-             startPos = oss.tellp();
+           if (it->second->isPublic())
+           {
+             oss << ", " << it->second->getName();
+             if (oss.tellp() - startPos > 90)
+             {
+               oss << "  &" << iendl;
+               startPos = oss.tellp();
+             }
            }
          }
@@ -650,9 +728,12 @@
          for (it = begin; it != end; it++)
          {
-           oss << ", " << it->second->getName();
-           if (oss.tellp() - startPos > 90)
-           {
-             oss << "  &" << iendl;
-             startPos = oss.tellp();
+           if (it->second->isPublic())
+           {
+             oss << ", " << it->second->getName();
+             if (oss.tellp() - startPos > 90)
+             {
+               oss << "  &" << iendl;
+               startPos = oss.tellp();
+             }
            }
          }
@@ -668,6 +749,9 @@
          for (it = begin; it != end; it++)
          {
-           oss << iendl;
-           it->second->generateFortranInterfaceIsDefinedDeclaration(oss, className);
+           if (it->second->isPublic())
+           {
+             oss << iendl;
+             it->second->generateFortranInterfaceIsDefinedDeclaration(oss, className);
+           }
          }
 
@@ -681,9 +765,12 @@
          for (it = begin; it != end; it++)
          {
-           oss << ", " << it->second->getName();
-           if (oss.tellp() - startPos > 90)
-           {
-             oss << "  &" << iendl;
-             startPos = oss.tellp();
+           if (it->second->isPublic())
+           {
+             oss << ", " << it->second->getName();
+             if (oss.tellp() - startPos > 90)
+             {
+               oss << "  &" << iendl;
+               startPos = oss.tellp();
+             }
            }
          }
Index: OS/trunk/src/attribute_public.hpp
===================================================================
--- /XIOS/trunk/src/attribute_public.hpp	(revision 777)
+++ 	(revision )
@@ -1,25 +1,0 @@
-/*!
-   \file attribute_public.hpp
-   \author Ha NGUYEN
-   \since 27 Oct 2015
-   \date 27 Oct 2015
-
-   \brief Class for public attributes
- */
-
-#ifndef __XIOS_ATTRIBUTE_PUBLIC_HPP__
-#define __XIOS_ATTRIBUTE_PUBLIC_HPP__
-
-namespace xios
-{
-/*!
-  This class allows to chose whether to expose the attributes in config file to C interface and Fortran Interface
-*/
-class PublicAttributes
-{
-public:
-  virtual bool isAttributePublic() {return true;}
-};
-}
-
-#endif // __UTILS_HPP__
Index: /XIOS/trunk/src/attribute_template.hpp
===================================================================
--- /XIOS/trunk/src/attribute_template.hpp	(revision 777)
+++ /XIOS/trunk/src/attribute_template.hpp	(revision 778)
@@ -18,5 +18,5 @@
       /// ////////////////////// DÃ©clarations ////////////////////// ///
       template <class T>
-         class CAttributeTemplate : public CAttribute, public CType<T>, public PublicAttributes
+         class CAttributeTemplate : public CAttribute, public CType<T>
       {
             typedef CAttribute SuperClass;
Index: /XIOS/trunk/src/attribute_template_impl.hpp
===================================================================
--- /XIOS/trunk/src/attribute_template_impl.hpp	(revision 777)
+++ /XIOS/trunk/src/attribute_template_impl.hpp	(revision 778)
@@ -245,7 +245,5 @@
       void CAttributeTemplate<T>::generateCInterface(ostream& oss,const string& className)
       {
-        if (this->isAttributePublic())
-          CInterface::AttributeCInterface<T>(oss, className, this->getName()) ;
-//        CInterface::AttributeIsDefinedCInterface(oss, className, this->getName()) ;
+        CInterface::AttributeCInterface<T>(oss, className, this->getName());
       }
 
@@ -253,7 +251,5 @@
       void CAttributeTemplate<T>::generateFortran2003Interface(ostream& oss,const string& className)
       {
-        if (this->isAttributePublic())
-          CInterface::AttributeFortran2003Interface<T>(oss, className, this->getName()) ;
-//        CInterface::AttributeIsDefinedFortran2003Interface(oss, className, this->getName()) ;
+        CInterface::AttributeFortran2003Interface<T>(oss, className, this->getName());
       }
 
@@ -261,6 +257,5 @@
       void CAttributeTemplate<T>::generateFortranInterfaceDeclaration_(ostream& oss,const string& className)
       {
-        if (this->isAttributePublic())
-          CInterface::AttributeFortranInterfaceDeclaration<T>(oss, className, this->getName()+"_") ;
+        CInterface::AttributeFortranInterfaceDeclaration<T>(oss, className, this->getName() + "_");
       }
 
@@ -268,6 +263,5 @@
       void CAttributeTemplate<T>::generateFortranInterfaceBody_(ostream& oss,const string& className)
       {
-        if (this->isAttributePublic())
-          CInterface::AttributeFortranInterfaceBody<T>(oss, className, this->getName()) ;
+        CInterface::AttributeFortranInterfaceBody<T>(oss, className, this->getName());
       }
 
@@ -275,6 +269,5 @@
       void CAttributeTemplate<T>::generateFortranInterfaceDeclaration(ostream& oss,const string& className)
       {
-        if (this->isAttributePublic())
-          CInterface::AttributeFortranInterfaceDeclaration<T>(oss, className, this->getName()) ;
+        CInterface::AttributeFortranInterfaceDeclaration<T>(oss, className, this->getName());
       }
 
@@ -282,6 +275,5 @@
       void CAttributeTemplate<T>::generateFortranInterfaceGetDeclaration_(ostream& oss,const string& className)
       {
-        if (this->isAttributePublic())
-          CInterface::AttributeFortranInterfaceGetDeclaration<T>(oss, className, this->getName()+"_") ;
+        CInterface::AttributeFortranInterfaceGetDeclaration<T>(oss, className, this->getName() + "_");
       }
 
@@ -290,6 +282,5 @@
       void CAttributeTemplate<T>::generateFortranInterfaceGetBody_(ostream& oss,const string& className)
       {
-        if (this->isAttributePublic())
-          CInterface::AttributeFortranInterfaceGetBody<T>(oss, className, this->getName()) ;
+        CInterface::AttributeFortranInterfaceGetBody<T>(oss, className, this->getName());
       }
 
@@ -297,6 +288,5 @@
       void CAttributeTemplate<T>::generateFortranInterfaceGetDeclaration(ostream& oss,const string& className)
       {
-        if (this->isAttributePublic())
-          CInterface::AttributeFortranInterfaceGetDeclaration<T>(oss, className, this->getName()) ;
+        CInterface::AttributeFortranInterfaceGetDeclaration<T>(oss, className, this->getName());
       }
 
Index: /XIOS/trunk/src/declare_attribute.hpp
===================================================================
--- /XIOS/trunk/src/declare_attribute.hpp	(revision 777)
+++ /XIOS/trunk/src/declare_attribute.hpp	(revision 778)
@@ -27,5 +27,5 @@
          type operator=(const type & value)                       \
          { return (CAttributeTemplate<type>::operator=(value)); } \
-         virtual bool isAttributePublic()                         \
+         virtual bool isPublic() const                            \
          { return false; }                                        \
          virtual ~name##_attr(void)                               \
@@ -48,5 +48,5 @@
          using CAttributeArray<T_num, T_rank>::operator = ;       \
          name##_attr(void) : CAttributeArray<T_num, T_rank> (#name, *CAttributeMap::Current) {} \
-         virtual bool isAttributePublic()                         \
+         virtual bool isPublic() const                            \
          { return false; }                                        \
          virtual ~name##_attr(void) {}                            \
