1 /*!
2  * \file   mfront/include/MFront/ExcelMaterialPropertyInternalInterface.hxx
3  * \brief  This file declares the ExcelMaterialPropertyInternalInterface class
4  * \author Thomas Helfer
5  * \date   06 mai 2008
6  * \copyright Copyright (C) 2006-2018 CEA/DEN, EDF R&D. All rights
7  * reserved.
8  * This project is publicly released under either the GNU GPL Licence
9  * or the CECILL-A licence. A copy of thoses licences are delivered
10  * with the sources of TFEL. CEA or EDF may also distribute this
11  * project under specific licensing conditions.
12  */
13 
14 #ifndef LIB_MFRONT_MFRONTEXCELLAWINTERNALINTERFACE_HXX
15 #define LIB_MFRONT_MFRONTEXCELLAWINTERNALINTERFACE_HXX
16 
17 #include"MFront/CMaterialPropertyInterface.hxx"
18 
19 namespace mfront{
20 
21   /*!
22    * An interface used to generate the dll to be called by excel.
23    * This interface is called by the Excel interface: the Excel
24    * generates a VBA file who refers to the library that is generated
25    * by this interface.
26    * The only difference between this interface and the `C` interface
27    * is the calling convention used by 32 bits windows: the `C`
28    * interface uses the `__cdecl` calling convention whereas the
29    * `Excel` interface uses the `__stdcall` one.
30    */
31   struct ExcelMaterialPropertyInternalInterface
32     : public CMaterialPropertyInterface
33   {
34     /*!
35      * \return the name of this interface
36      */
37     static std::string getName();
38     //! constructor
39     ExcelMaterialPropertyInternalInterface();
40     /*!
41      * \param[out] os:  output file stream
42      * \param[in]  mpd: material property description
43      */
44     void writeInterfaceSymbol(std::ostream&,
45 			      const MaterialPropertyDescription&) const override;
46     //! destructor
47     ~ExcelMaterialPropertyInternalInterface() override;
48   private:
49 
50     std::string getCallingConvention() const override;
51     /*!
52      * \return the name of the generated library
53      * \param[in] mpd: material property description
54      */
55     std::string getGeneratedLibraryName(const MaterialPropertyDescription&) const override;
56     /*!
57      * \brief write the header preprocessor directives
58      * \param[in] os:  output stream
59      * \param[in] mpd: material property description
60      */
61     void writeHeaderPreprocessorDirectives(std::ostream&,
62 					   const MaterialPropertyDescription&) const override;
63     /*!
64      * \param[in] m: material name
65      * \param[in] c: class name
66      */
67     std::string getHeaderFileName(const std::string&,
68 				  const std::string&) const override;
69     /*!
70      * \param[in] m: material name
71      * \param[in] c: class name
72      */
73     std::string getSrcFileName(const std::string&,
74 			       const std::string&) const override;
75   }; // end of MfrontExcelLawInternalInterface
76 
77 } // end of namespace mfront
78 
79 #endif /* LIB_MFRONT_MFRONTEXCELLAWINTERNALINTERFACE_HXX */
80 
81