[GME-commit]
GMESRC/SDK/BON BONImpl.cpp,1.18,1.19 BONImpl.h,1.12,1.13
gme-commit at list.isis.vanderbilt.edu
gme-commit at list.isis.vanderbilt.edu
Sat Jul 24 15:52:19 CDT 2004
Update of /var/lib/gme/GMESRC/SDK/BON
In directory braindrain:/tmp/cvs-serv18682/SDK/BON
Modified Files:
BONImpl.cpp BONImpl.h
Log Message:
GME Console is accessible from BON2
CVS User: volgy
Index: BONImpl.cpp
===================================================================
RCS file: /var/lib/gme/GMESRC/SDK/BON/BONImpl.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** BONImpl.cpp 20 Jul 2004 10:48:36 -0000 1.18
--- BONImpl.cpp 24 Jul 2004 19:52:17 -0000 1.19
***************
*** 367,370 ****
--- 367,371 ----
m_spProject = NULL;
m_pRootFolder = NULL;
+ m_gme = NULL;
m_meta = MON::Project();
}
***************
*** 600,603 ****
--- 601,610 ----
}
+ void ProjectImpl::consoleMsg(const std::string& msg, msgtype_enum type)
+ {
+ GMEAppPtr pGME = getGME();
+ COMTHROW(pGME->ConsoleMessage(Util::Copy( msg ), type));
+ }
+
//===============================================================================================================================================
// C L A S S : BON::ProjectImpl // Relations - Find and Search
***************
*** 680,683 ****
--- 687,710 ----
findByKindI( MGACOLL_ITER, meta );
} MGACOLL_ITERATE_END;
+ }
+
+ GMEAppPtr ProjectImpl::getGME()
+ {
+ if (!m_gme) {
+ CComBSTR bstrName("GME.Application");
+ CComQIPtr<IMgaClient> pClient;
+ COMTHROW(m_spProject->GetClientByName(bstrName, &pClient));
+ if (pClient) {
+ CComQIPtr<IDispatch> pDispatch;
+ COMTHROW(pClient->get_OLEServer(&pDispatch));
+ if (pDispatch) {
+ COMTHROW(pDispatch.QueryInterface(m_gme.Addr()));
+ }
+ }
+ }
+ if (!m_gme) {
+ ASSERTTHROW( Exception( "Unable to retrieve GME Application object" ) );
+ }
+ return m_gme;
}
Index: BONImpl.h
===================================================================
RCS file: /var/lib/gme/GMESRC/SDK/BON/BONImpl.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** BONImpl.h 20 Jul 2004 10:48:36 -0000 1.12
--- BONImpl.h 24 Jul 2004 19:52:17 -0000 1.13
***************
*** 80,83 ****
--- 80,85 ----
typedef Util::ComPtr<IMgaFCOs> FCOsPtr;
+ typedef Util::ComPtr<IGMEOLEApp> GMEAppPtr;
+
typedef std::set<ObjectImpl*> ObjectSet;
typedef std::pair<bool,ObjectSet> ObjectSetPair;
***************
*** 120,123 ****
--- 122,127 ----
MON::Project m_meta;
+ GMEAppPtr m_gme;
+
bool m_bAutoCommit;
bool m_bIsDestructionActive;
***************
*** 163,166 ****
--- 167,173 ----
void assignTerritory(TerritoryPtr terr);
+ void consoleMsg(const std::string& msg, msgtype_enum type);
+
+
// Relations // ----> Interface Methods
public :
***************
*** 179,182 ****
--- 186,191 ----
ObjectSet findByKindI( const MON::Folder& meta );
void findByKindI( FolderPtr spFolder, const MON::Folder& meta );
+
+ GMEAppPtr getGME();
// Event Handlers
More information about the GME-commit
mailing list