DumontEXE 0.0.1
typelib.h
00001 
00002 #ifndef TYPELIB_H_4118DA3D_3B8D_4bc3_B2D7_FE8B496ED4E3
00003 #define TYPELIB_H_4118DA3D_3B8D_4bc3_B2D7_FE8B496ED4E3
00004 
00005 #include <string>
00006 #include <iostream>
00007 
00008 #include <windows.h>
00009 
00010 #include "win32_Unicode.h"
00011 
00012 class TypeLib {
00013   public:
00014 
00015     void init(void);
00016     void init( ITypeInfo * i_typeInfo );
00017 
00018     TypeLib();
00019     TypeLib( IDispatch * i_unknown );
00020     TypeLib( ITypeLib * i_typelib );
00021     TypeLib( ITypeInfo * i_typeinfo );
00022 
00023     bool Open(std::string const& type_lib_file);
00024 
00025     void dump(void);
00026 
00027     std::string LibDocumentation();
00028 
00029     int NofTypeInfos();
00030 
00031     bool CurTypeInfo(int);
00032 
00033     std::string TypeDocumentation();
00034 
00035     // within current type info
00036     int   NofFunctions();
00037     // within current function
00038     short NofParameters();
00039     short NofOptionalParameters();
00040 
00041     // within current type info
00042     int NofVariables();
00043 
00044     std::string FunctionName();
00045     std::string VariableName();
00046     std::string ParameterName();
00047 
00048     enum INVOKEKIND {
00049       func   = DISPATCH_METHOD,
00050       get    = DISPATCH_PROPERTYGET,
00051       put    = DISPATCH_PROPERTYPUT,
00052       putref = DISPATCH_PROPERTYPUTREF
00053     };
00054 
00055     INVOKEKIND InvokeKind();
00056 
00057     // See <oaidl.h>
00058     enum VARIABLEKIND {
00059       instance  = VAR_PERINSTANCE,
00060       static_   = VAR_STATIC,
00061       const_    = VAR_CONST,
00062       dispatch  = VAR_DISPATCH
00063     };
00064     VARIABLEKIND VariableKind();
00065 
00066     // See <oaidl.h>
00067     enum TYPEFLAG {
00068       FDEFAULT       = IMPLTYPEFLAG_FDEFAULT,
00069       FSOURCE        = IMPLTYPEFLAG_FSOURCE,
00070       FRESTRICTED    = IMPLTYPEFLAG_FRESTRICTED,
00071       FDEFAULTVTABLE = IMPLTYPEFLAG_FDEFAULTVTABLE,
00072     };
00073 
00074     // TODO? How to be used correctly
00075     bool HasFunctionTypeFlag(TYPEFLAG);
00076 
00077     // see here
00078     bool IsTypeEnum     ();
00079     bool IsTypeRecord   ();
00080     bool IsTypeModule   ();
00081     bool IsTypeInterface();
00082     bool IsTypeDispatch ();
00083     bool IsTypeCoClass  ();
00084     bool IsTypeAlias    ();
00085     bool IsTypeUnion    ();
00086     bool IsTypeMax      ();
00087 
00088     std::string ReturnType();
00089     std::string ParameterType();
00090 
00091     std::string VariableType();
00092 
00093     // Only makes sense if VariableKind == VARIABLEKIND.const_
00094     std::string ConstValue();
00095 
00096     bool NextTypeInfo();
00097 
00098     bool NextFunction();
00099     bool NextVariable();
00100 
00101     bool NextParameter();
00102 
00103     bool ParameterIsIn();
00104     bool ParameterIsOut();
00105     bool ParameterIsFLCID();
00106     bool ParameterIsReturnValue();
00107     bool ParameterIsOptional();
00108     bool ParameterHasDefault();
00109     bool ParameterHasCustumData();
00110 
00111     ITypeLib*     typeLib_;
00112     int           nofTypeInfos_;
00113     int           curTypeInfo_;
00114 
00115     ITypeInfo*    curITypeInfo_;
00116     TYPEATTR*     curTypeAttr_;
00117 
00118     int           curTypeIdx_;
00119 
00120     int           curFunc_;
00121     int           curVar_;
00122     int           curFuncParam_;
00123 
00124     int           curImplTypeFlags_;
00125 
00126     FUNCDESC*     curFuncDesc_;
00127 
00128     VARDESC*      curVarDesc_;
00129 
00130     BSTR*         funcNames_;
00131     unsigned int  nofFuncNames_;
00132 
00133     void          ReleaseFuncNames();
00134     void          GetFuncNames();
00135 
00136     bool          ParameterIsHasX(int);
00137 
00138     bool          IsTypeKind(int);
00139 
00140     std::string   TypeDocumentation_(ITypeInfo*);
00141 
00142     std::string   UserdefinedType(HREFTYPE);
00143     std::string   Type(ELEMDESC const&);
00144 };
00145 
00146 #endif
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties




~ ~ ~ ~ ~ ~
Source Code without Comments is like a Cranberry Garland
without the berries. Comment your Code!
 
Commence Database User Support Group Forum
http://newsgroup.showoff-db.org/
~ ~ ~ ~ ~ ~
Author: Mark Petryk
Lorimark Solutions, LLC
mark@lorimarksolutions.com