GME  13
MgaFolder.h
Go to the documentation of this file.
00001 // MgaFolder.h : Declaration of the CMgaFolder
00002 
00003 #ifndef __MGAFOLDER_H_
00004 #define __MGAFOLDER_H_
00005 
00006 #include "resource.h"       // main symbols
00007 #include "MgaFCO.h"
00009 
00010 // CMgaContainer
00011 
00012 
00013 template <class T> 
00014 class ATL_NO_VTABLE IMgaContainerImpl :         public T {
00015 public:
00016 
00017         STDMETHOD(GetChildrenOfKind)(BSTR kn, IMgaFCOs **pVal) { return inFCO->GetChildrenOfKind(kn, pVal); }
00018         STDMETHOD(GetDescendantFCOs)(IMgaFilter* filt, IMgaFCOs **pVal) { 
00019                                                                                                         return inFCO->GetDescendantFCOs(filt, pVal); };
00020         STDMETHOD(get_ChildFCOs)(IMgaFCOs ** pVal)    { return inFCO->get_ChildFCOs(pVal); };
00021         STDMETHOD(get_ChildFCO)(BSTR n,IMgaFCO**pVal) { return inFCO->get_ChildFCO(n, pVal); };
00022         STDMETHOD(GetChildFCODisp)(BSTR n,IMgaFCO**pVal) { return inFCO->get_ChildFCO(n, pVal); };
00023 
00024 
00025 };
00026 
00027 
00028 // CMgaFolder
00029 class ATL_NO_VTABLE CMgaFolder : 
00030         public CComCoClass<CMgaFolder, &__uuidof(MgaFolder)>,
00031         public IMgaContainerImpl < IMgaFCOImpl <CComObjectRootEx<CComSingleThreadModel> ,
00032                                                                                          IDispatchImpl<IMgaFolder, &__uuidof(IMgaFolder), &__uuidof(__MGALib)> > >,
00033         public ISupportErrorInfoImpl<&__uuidof(IMgaFolder)>
00034 {
00035 public:
00036 
00037 DECLARE_ONLY_AGGREGATABLE(_CoClass)
00038 
00039 DECLARE_PROTECT_FINAL_CONSTRUCT()
00040 
00041 BEGIN_COM_MAP(CMgaFolder)
00042         COM_INTERFACE_ENTRY(IMgaFolder)
00043         COM_INTERFACE_ENTRY_IID(__uuidof(IMgaObject),IMgaFolder)
00044 //      COM_INTERFACE_ENTRY_IID(IID_IMgaContainer,IMgaFolder)
00045         COM_INTERFACE_ENTRY(IDispatch)
00046         COM_INTERFACE_ENTRY_IID(IID_ISupportErrorInfo, IMyErrorInfoBase)
00047 END_COM_MAP()
00048 
00049 // IMgaFolder
00050         STDMETHOD(DeriveRootObject)(IMgaFCO* base, VARIANT_BOOL instance, IMgaFCO **nobj) {
00051                                                                                         return inFCO->DeriveFCO(base, NULL, instance, nobj);    }
00052         STDMETHOD(CreateRootObject)(IMgaMetaFCO* meta, IMgaFCO **nobj) {
00053                                                                                         return inFCO->CreateRootObject(meta,nobj); }
00054         STDMETHOD(CreateFolder)(IMgaMetaFolder *meta, IMgaFolder **nf) {
00055                                                                                         return inFCO->CreateFolder(meta, nf); }
00056         STDMETHOD(get_ChildFolders)(IMgaFolders **pVal) {
00057                                                                                         return inFCO->get_ChildFolders(pVal); }
00058         STDMETHOD(get_ParentFolder)(IMgaFolder **pVal) { return 
00059                 inFCO->GetParent(reinterpret_cast<IMgaContainer **>(pVal),NULL); }
00060 
00061         STDMETHOD(get_MetaFolder)(IMgaMetaFolder **pVal) { return inFCO->get_MetaFolder(pVal); } 
00062         STDMETHOD(CopyFCOs)(IMgaFCOs *list, IMgaFCOs **objs) { return inFCO->CopyFCOs(list, NULL, objs); } 
00063         STDMETHOD(MoveFCOs)(IMgaFCOs *list, IMgaFCOs **objs) { return inFCO->MoveFCOs(list, NULL, objs); } 
00064         STDMETHOD(CopyFolders)(IMgaFolders *list, IMgaFolders **objs) { return inFCO->CopyFolders(list, /*NULL,*/ objs); } 
00065         STDMETHOD(MoveFolders)(IMgaFolders *list, IMgaFolders **objs) { return inFCO->MoveFolders(list, /*NULL,*/ objs); } 
00066         STDMETHOD(CopyFCODisp)(IMgaFCO *obj, IMgaFCO **nobj) { return inFCO->CopyFCODisp( obj, NULL, nobj); } 
00067         STDMETHOD(MoveFCODisp)(IMgaFCO *obj, IMgaFCO **nobj) { return inFCO->MoveFCODisp( obj, NULL, nobj); } 
00068         STDMETHOD(CopyFolderDisp)(IMgaFolder *fol, IMgaFolder **nfol) { return inFCO->CopyFolderDisp( fol, nfol); } 
00069         STDMETHOD(MoveFolderDisp)(IMgaFolder *fol, IMgaFolder **nfol) { return inFCO->MoveFolderDisp( fol, nfol); } 
00070         //STDMETHOD(MoveFCOsAndFolders)(IMgaFolders *list, IMgaFCOs *list2, IMgaFolders **objs, IMgaFCOs **objs2) { return inFCO->MoveFCOsAndFolders(list, list2, objs, objs2); } 
00071         STDMETHOD(RefreshParent)(IMgaFolder *parent) { return inFCO->RefreshParent( parent); }
00072 
00073         STDMETHOD(AttachLibraryV3)(BSTR libname, VARIANT_BOOL ungroup, IMgaFolder **nf) 
00074                                                                                                 { return inFCO->AttachLibraryV3(libname, ungroup, nf); }
00075         STDMETHOD(RefreshLibraryV3)(BSTR libname, VARIANT_BOOL ungroup, long *numOfErrors) 
00076                                                                                                 { return inFCO->RefreshLibraryV3(libname, ungroup, numOfErrors); }
00077 
00078         STDMETHOD(AttachLibrary)(BSTR libname, IMgaFolder **nf) 
00079                                                                                                 { return inFCO->AttachLibrary(libname, nf); }
00080         STDMETHOD(RefreshLibrary)(BSTR libname) 
00081                                                                                                 { return inFCO->RefreshLibrary(libname); }
00082         STDMETHOD(get_LibraryName)(BSTR *libname) 
00083                                                                                                 { return inFCO->get_LibraryName(libname); }
00084         STDMETHOD(put_LibraryName)(BSTR libname) 
00085                                                                                                 { return inFCO->put_LibraryName(libname); }
00086 
00087         STDMETHOD(GetVirtuallyIncludedBy)( IMgaFolders** pDep) { return inFCO->GetVirtuallyIncludedBy( pDep); }
00088         STDMETHOD(SetVirtuallyIncludedBy)( IMgaFolders*  pDep) { return inFCO->SetVirtuallyIncludedBy( pDep); }
00089         STDMETHOD(GetVirtuallyIncludes)  ( IMgaFolders** pDep) { return inFCO->GetVirtuallyIncludes  ( pDep); }
00090         STDMETHOD(SetVirtuallyIncludes)  ( IMgaFolders*  pDep) { return inFCO->SetVirtuallyIncludes  ( pDep); }
00091 
00092         STDMETHOD(GetSourceControlInfo)( long* p_scInfo)    { return inFCO->GetSourceControlInfo( p_scInfo); }
00093 
00094         STDMETHOD(get_ChildRelIDCounter)(long *pVal) { 
00095                 return inFCO->get_ChildRelIDCounter(pVal); }
00096         STDMETHOD(put_ChildRelIDCounter)(long pVal) { 
00097                 return inFCO->put_ChildRelIDCounter(pVal); }
00098         
00099         STDMETHOD(get_Attributes)(/*[out, retval]*/ IMgaAttributes * *pVal)                                                     { return E_MGA_NOT_SUPPORTED; };
00100         STDMETHOD(get_Attribute)(/*[in]*/ IMgaMetaAttribute *meta, /*[out, retval]*/ VARIANT *pVal) { return E_MGA_NOT_SUPPORTED; };
00101         STDMETHOD(get_AttributeByName)(/*[in]*/ BSTR name, /*[out, retval]*/ VARIANT *pVal)                     { return E_MGA_NOT_SUPPORTED; };
00102         STDMETHOD(put_AttributeByName)(/*[in]*/ BSTR name, /*[in]*/ VARIANT newVal)                                     { return E_MGA_NOT_SUPPORTED; };
00103 
00104         STDMETHOD(get_StrAttrByName)( BSTR name,  BSTR *pVal) {  return E_MGA_NOT_SUPPORTED; }
00105         STDMETHOD(put_StrAttrByName)( BSTR name,  BSTR newval) {  return E_MGA_NOT_SUPPORTED; }
00106         STDMETHOD(get_IntAttrByName)( BSTR name,  long *pVal) {  return E_MGA_NOT_SUPPORTED; }
00107         STDMETHOD(put_IntAttrByName)( BSTR name,  long newval) {  return E_MGA_NOT_SUPPORTED; }
00108         STDMETHOD(get_FloatAttrByName)( BSTR name,  double *pVal) {  return E_MGA_NOT_SUPPORTED; }
00109         STDMETHOD(put_FloatAttrByName)( BSTR name,  double newval) {  return E_MGA_NOT_SUPPORTED; }
00110         STDMETHOD(get_BoolAttrByName)( BSTR name,  VARIANT_BOOL *pVal) {  return E_MGA_NOT_SUPPORTED; }
00111         STDMETHOD(put_BoolAttrByName)( BSTR name,  VARIANT_BOOL newval) {  return E_MGA_NOT_SUPPORTED; }
00112         STDMETHOD(get_RefAttrByName)( BSTR name,  IMgaFCO **pVal) {  return E_MGA_NOT_SUPPORTED; }
00113         STDMETHOD(put_RefAttrByName)( BSTR name,  IMgaFCO * newval) {  return E_MGA_NOT_SUPPORTED; }
00114         STDMETHOD(RemoveAttrByName)( BSTR name) {  return E_MGA_NOT_SUPPORTED; }
00115         STDMETHOD(get_Meta)(IMgaMetaFCO * *pVal) { return E_MGA_NOT_SUPPORTED; }
00116         // by ZolMol
00117         //STDMETHOD(get_FolderMeta)(IMgaMetaFolder * *pVal) { return inFCO->get_MetaFolder( pVal); }
00118 
00119 };
00120 
00121 #endif //__MGAFOLDER_H_