BEAST/BSE - Better Audio System and Sound Engine  0.8.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
sfidl-clientcxx.hh
Go to the documentation of this file.
00001  // Licensed GNU LGPL v2.1 or later: http://www.gnu.org/licenses/lgpl.html
00002 #ifndef __SFIDL_CLIENTCXX_H__
00003 #define __SFIDL_CLIENTCXX_H__
00004 
00005 #include "sfidl-cxxbase.hh"
00006 #include "sfidl-namespace.hh"
00007 
00008 namespace Sfidl {
00009 
00010   class CodeGeneratorClientCxx : public CodeGeneratorCxxBase {
00011   protected:
00012     NamespaceHelper nspace;
00013 
00014     using CodeGeneratorCBase::createTypeCode;
00015     String createTypeCode (const String& type, const String& name, 
00016                            TypeCodeModel model);
00017 
00018     String typeArg (const String& type);
00019     String typeField (const String& type);
00020     String typeRet (const String& type);
00021     String funcNew (const String& type);
00022     String funcCopy (const String& type);
00023     String funcFree (const String& type);
00024 
00025     void printChoicePrototype   (NamespaceHelper& nspace);
00026     void printChoiceImpl        (NamespaceHelper& nspace);
00027     void printRecSeqForwardDecl (NamespaceHelper& nspace);
00028     void printRecSeqDefinition (NamespaceHelper& nspace);
00029     void printRecSeqImpl (NamespaceHelper& nspace);
00030 
00031     enum Style { STYLE_LOWER, STYLE_MIXED };
00032     Style style;
00033 
00034     String makeStyleName (const String& name);
00035     String makeProcName (const String& className, const String& procName);
00036 
00037     void printMethods (const Class& cdef);
00038     void printProperties (const Class& cdef);
00039 
00040   public:
00041     CodeGeneratorClientCxx (const Parser& parser) : CodeGeneratorCxxBase (parser), nspace (stdout), style (STYLE_LOWER) {
00042     }
00043     void help ();
00044     bool run ();
00045 
00046     OptionVector getOptions();
00047     void setOption (const String& option, const String& value);
00048   };
00049 };
00050 
00051 #endif  /* __SFIDL_CLIENTCXX_H__ */
00052 
00053 /* vim:set ts=8 sts=2 sw=2: */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines