[GME-commit] GMESRC/GME/XmlBackEnd xmga.dtd, NONE, 1.1 CoreXmlFile.cpp, 1.20, 1.21 CoreXmlFile.h, 1.7, 1.8 FilesInUseDetailsDlg.cpp, 1.2, 1.3 FilesInUseDetailsDlg.h, 1.1, 1.2 FilesInUseDlg.cpp, 1.1, 1.2 FilesInUseDlg.h, 1.1, 1.2 VSSLoginDlg.cpp, 1.1, 1.2 VSSLoginDlg.h, 1.1, 1.2 XmlBackEnd.rc, 1.4, 1.5 XmlBackEnd.vcproj, 1.2, 1.3

gme-commit at list.isis.vanderbilt.edu gme-commit at list.isis.vanderbilt.edu
Wed Sep 26 15:30:34 CDT 2007


Update of /project/gme-repository/GMESRC/GME/XmlBackEnd
In directory escher:/tmp/cvs-serv24147

Modified Files:
	CoreXmlFile.cpp CoreXmlFile.h FilesInUseDetailsDlg.cpp 
	FilesInUseDetailsDlg.h FilesInUseDlg.cpp FilesInUseDlg.h 
	VSSLoginDlg.cpp VSSLoginDlg.h XmlBackEnd.rc XmlBackEnd.vcproj 
Added Files:
	xmga.dtd 
Log Message:
Major checkin for september.


CVS User: Zoltan Molnar, ISIS (zolmol)

Index: XmlBackEnd.vcproj
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/XmlBackEnd/XmlBackEnd.vcproj,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** XmlBackEnd.vcproj	15 Jun 2007 16:31:52 -0000	1.2
--- XmlBackEnd.vcproj	26 Sep 2007 20:30:31 -0000	1.3
***************
*** 389,392 ****
--- 389,395 ----
  			</File>
  			<File
+ 				RelativePath=".\Ssauto.h">
+ 			</File>
+ 			<File
  				RelativePath="StdAfx.h">
  			</File>
***************
*** 405,410 ****
--- 408,419 ----
  			RelativePath=".\edf.dtd">
  		</File>
+ 		<File
+ 			RelativePath=".\xmga.dtd">
+ 		</File>
  	</Files>
  	<Globals>
+ 		<Global
+ 			Name="RESOURCE_FILE"
+ 			Value="XmlBackEnd.rc"/>
  	</Globals>
  </VisualStudioProject>

Index: XmlBackEnd.rc
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/XmlBackEnd/XmlBackEnd.rc,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** XmlBackEnd.rc	15 Jun 2007 16:30:02 -0000	1.4
--- XmlBackEnd.rc	26 Sep 2007 20:30:31 -0000	1.5
***************
*** 111,120 ****
  END
  
! IDD_DIALOG_FILESAREUSED DIALOG  0, 0, 199, 59
  STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
  CAPTION "Files in use"
! FONT 8, "MS Sans Serif"
  BEGIN
!     LTEXT           "Cannot perform this operation because some necessery files are checked out by other users.",
                      IDC_STATIC,7,7,185,22
      DEFPUSHBUTTON   "OK",IDCANCEL,45,35,50,14
--- 111,120 ----
  END
  
! IDD_DIALOG_FILESAREUSED DIALOGEX 0, 0, 199, 59
  STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
  CAPTION "Files in use"
! FONT 8, "MS Sans Serif", 0, 0, 0x0
  BEGIN
!     LTEXT           "Cannot perform this operation because some necessary files are checked out by other users.",
                      IDC_STATIC,7,7,185,22
      DEFPUSHBUTTON   "OK",IDCANCEL,45,35,50,14
***************
*** 122,129 ****
  END
  
! IDD_DIALOG_FILESUSEDETAILS DIALOG  0, 0, 332, 183
  STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
  CAPTION "Files in use"
! FONT 8, "MS Sans Serif"
  BEGIN
      DEFPUSHBUTTON   "Close",IDOK,141,162,50,14
--- 122,129 ----
  END
  
! IDD_DIALOG_FILESUSEDETAILS DIALOGEX 0, 0, 332, 183
  STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
  CAPTION "Files in use"
! FONT 8, "MS Sans Serif", 0, 0, 0x0
  BEGIN
      DEFPUSHBUTTON   "Close",IDOK,141,162,50,14
***************
*** 131,135 ****
                      LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
      LTEXT           "Used files: user, model/folder name, type (model/folder)",
!                     IDC_STATIC,7,7,168,8
  END
  
--- 131,135 ----
                      LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
      LTEXT           "Used files: user, model/folder name, type (model/folder)",
!                     IDC_STATIC,7,7,307,8
  END
  
***************
*** 187,190 ****
--- 187,191 ----
  
  EDF.DTD                 DTD                     "edf.dtd"
+ XMGA.DTD                DTD                     "xmga.dtd"
  
  /////////////////////////////////////////////////////////////////////////////

Index: CoreXmlFile.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/XmlBackEnd/CoreXmlFile.cpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** CoreXmlFile.cpp	21 Jun 2007 19:09:43 -0000	1.20
--- CoreXmlFile.cpp	26 Sep 2007 20:30:31 -0000	1.21
***************
*** 5,8 ****
--- 5,10 ----
  #include <direct.h>
  #include <fstream>
+ #include <time.h>
+ #include <sys/timeb.h>
  #include "CoreXmlFile.h"
  #include "CommonCollection.h"
***************
*** 10,17 ****
--- 12,59 ----
[...7164 lines suppressed...]
! 				}
! 			}
  
! 			if( !mod_hasports)
! 			{
! 				if( mod_longref != 0)
! 					m_portless[ mod_longref] = true;
! 			}
! 		}
  
! 		delete parser;
! 	}
! 	catch(...)
! 	{
! 		if( parser) delete parser;
! 		return false;
! 	}
  
! 	return true;
  }

Index: CoreXmlFile.h
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/XmlBackEnd/CoreXmlFile.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** CoreXmlFile.h	21 Jun 2007 19:09:43 -0000	1.7
--- CoreXmlFile.h	26 Sep 2007 20:30:31 -0000	1.8
***************
*** 15,18 ****
--- 15,72 ----
  const metaobjidpair_type ROOT_ID_PAIR = {METAID_ROOT, OBJID_ROOT};
  
+ enum OpCode
+ {
+ 	  ELEM_DELETED
+ 	, ELEM_MOVED
+ 	, ELEM_DERIVED
+ 	, ELEM_REFERRED
+ 	, ELEM_CONNECTED
+ 	, ELEM_TAKESPARTINCONN
+ 	, ELEM_REF_REDIRECTED
+ 	, ELEM_TOTAL
+ };
+ 
+ class ParserLiterals
+ {
+ public:
+ 	class Signer
+ 	{
+ 	public:
+ 		static const char * users;
+ 		static const char * user;
+ 		static const char * name;
+ 		static const char * since;
+ 		static const char * until;
+ 	};
+ 	class Protector
+ 	{
+ 	public:
+ 		static const char * item;
+ 		static const char * when;
+ 		static const char * oper;
+ 		static const char * gd;
+ 		static const char * objects;
+ 	};
+ 	class Main
+ 	{
+ 	public:
+ 		static const char * deleted;
+ 		static const char * metaId;
+ 		static const char * id;
+ 		static const char * parent;
+ 	};
+ 
+ 	static const char * newln;
+ 	static const char * empty;
+ };
+ 
+ class HelperFiles
+ {
+ public:
+ 	static const char * signFileName;
+ 	static const char * protFileName;
+ 	static const char * protFileExt;
+ };
+ 
  struct GUID_less
  {
***************
*** 99,102 ****
--- 153,158 ----
  protected:
      long    m_value;
+ 
+ 	friend class CCoreXmlFile;
  };
  
***************
*** 232,237 ****
      bool               m_deleted;
      bool               m_modified;
-     bool               m_sourceControlInfoRegNode;  
-     bool               m_sourceControlStatRegNode;
      CTime              m_lastWriteTime;
  
--- 288,291 ----
***************
*** 302,320 ****
  class OperatingOptions
  {
  public:
  	OperatingOptions();
! 	void load( const std::string& p_folder, CCoreXmlFile * const p_parent);
  
  	// members
! 	const std::string    m_fileName;
  	bool                 m_defCheckInOnSave;
  	bool                 m_defCheckOutOnAction;
  	bool                 m_alwaysFullLock;
  	bool                 m_onDeleteAlwaysFullLock;
  	bool                 m_useParadigmFile;
  	std::string          m_nameParadigmFile;
  	ParadigmInformation  m_paradigmInfo;
  };
  
  class ATL_NO_VTABLE CCoreXmlFile : 
  	public CComObjectRootEx<CComSingleThreadModel>,
--- 356,507 ----
  class OperatingOptions
  {
+ 	bool parseBool( const std::string& p_line, const std::string& p_optStr);
+ 	void loadFrom( const std::string& p_folder, const std::string& p_name);
  public:
  	OperatingOptions();
! 	void reset();
! 	void load( const std::string& p_folder);
! 	void display( CCoreXmlFile * const p_parent);
  
  	// members
! 	static const std::string    m_usrConfName;
! 	static const std::string    m_sysConfName;
  	bool                 m_defCheckInOnSave;
  	bool                 m_defCheckOutOnAction;
  	bool                 m_alwaysFullLock;
  	bool                 m_onDeleteAlwaysFullLock;
+ 	bool                 m_onLoadShowStatus;
  	bool                 m_useParadigmFile;
+ 	bool                 m_measureTime;
+ 	bool                 m_createLog;
+ 	bool                 m_doRefTargetLock;
+ 	bool                 m_doConnEndPointLock;
+ 	bool                 m_doConnSegmentLock;
+ 	bool                 m_doModelParentLock;
+ 	bool                 m_doBaseTypeLock;
+ 	bool                 m_partialLoad;
+ 	bool                 m_useAccountInfo;
+ 	bool                 m_automaticLogin;
+ 	double               m_purgeDelayFactor;
  	std::string          m_nameParadigmFile;
+ 	std::string          m_defUserName;
+ 	std::string          m_defPassword;
  	ParadigmInformation  m_paradigmInfo;
  };
  
+ class  SignFileEntry
+ {
+ public:
+ 	SignFileEntry( const std::string& p_username, const CTime& p_time) : m_username( p_username), m_time( p_time) { }
+ 	std::string      m_username;
+ 	CTime            m_time;
+ };
+ 
+ class LoggedIn
+ {
+ public:
+ 	LoggedIn( const std::string& p_nm, char flag) : m_nm( p_nm), m_fl( flag) { }
+ 	std::string      m_nm;
+ 	char             m_fl;
+ 	bool             operator==( const LoggedIn& peer) const { return m_nm == peer.m_nm; }
+ };
+ 
+ class SignFileData
+ {
+ public:
+ 	SignFileData( const std::string& pn, const std::string& ps, const std::string& pu) : m_user( pn), m_since( ps), m_until( pu) { }
+ 	std::string              m_user;
+ 	std::string              m_since;
+ 	std::string              m_until;
+ 	bool         operator==( const SignFileData& peer) const { return m_user == peer.m_user; }
+ };
+ 
+ 
+ class ProtectEntry
+ {
+ public:
+ 	ProtectEntry( GUID p_gd, OpCode p_op, CTime p_time);
+ 	GUID              m_guid;
+ 	OpCode            m_op;
+ 	CTime             m_time;
+ };
+ 
+ class PublicStorage
+ {
+ protected:
+ 	std::string                       m_fileName;
+ 	std::string                       m_localFileName;
+ 	std::vector< ProtectEntry >       m_list;
+ 	CCoreXmlFile*                     m_parent;
+ 
+ 	CComObjPtr<IVSSItem>              m_vssItem;
+ 	const char *                      m_ccsItem;
+ private:
+ 	void acquireSS               ( CComObjPtr<IVSSItem>& obj);
+ 	void releaseSS               ( CComObjPtr<IVSSItem>& obj);
+ 	void acquireCC               ( const char * obj);
+ 	void releaseCC               ( const char * obj);
+ 
+ protected:
+ 	void                   acquireFile ();
+ 	void                   releaseFile ();
+ 	inline std::string     userName    ();
+ 	inline bool            isSS        ();
+ 	inline bool            isCC        ();
+ 
+ public:
+ 	PublicStorage               ();
+ 	void setParent              ( CCoreXmlFile* p_parent);
+ 	void init                   ( const std::string& p_initialContent);
+ };
+ 
+ class SignManager : public PublicStorage
+ {
+ 	void in_or_off              ( bool in);
+ 	bool anybodyElseHolding     ();
+ 
+ 	void update                 ( bool p_in, const SignFileEntry& p_entry);
+ 
+ public:
+ 	typedef std::vector< SignFileData> SignFileDataVec;
+ 
+ 	void setParent              ( CCoreXmlFile* p_parent); // hides parent's setParent
+ 	void in                     () { in_or_off( true); }
+ 	void off                    () { in_or_off( false); }
+ 	SignFileDataVec getUserData ();
+ 
+ };
+ 
+ 
+ class ProtectList : public PublicStorage
+ {
+ 	std::vector< ProtectEntry >       m_list;
+ 
+ 	void writeProtList        ();
+ 	void writeProtLisp        ();
+ 	void purgeProtList        ( CTime& p_lastSyncTime);
+ 	void clearProtList        ();
+ 	bool needed               ();
+ 
+ public:
+ 	void setParent            ( CCoreXmlFile* p_parent); // hides parent's setParent
+ 	void addEntry             ( const ProtectEntry& p_pe);
+ 
+ 	static std::string getProtListFileName( const std::string& p_username);
+ 
+ 	void onCommited           ();
+ 	void onAborted            ();
+ 	void onLoad               ();
+ };
+ 
+ class ProtFileEntry
+ {
+ public:
+ 	ProtFileEntry( const std::string& p_guid, OpCode p_op, CTime& p_time) : m_guid( p_guid), m_op( p_op), m_time( p_time) { }
+ 	std::string              m_guid;
+ 	OpCode                   m_op;
+ 	CTime                    m_time;
+ };
+ 
  class ATL_NO_VTABLE CCoreXmlFile : 
  	public CComObjectRootEx<CComSingleThreadModel>,
***************
*** 338,341 ****
--- 525,538 ----
      };
  
+ 	enum FileStatusBitList
+ 	{
+ 		//  FS_UTD = 0x0
+ 		  FS_LOCAL = 0x1
+ 		, FS_OTHER = 0x2
+ 		, FS_MODIFIEDBYOTHERS = 0x100
+ 		, FS_NOTYETSAVED      = 0x200
+ 
+ 	};
+ 
  public:
  	CCoreXmlFile();
***************
*** 414,422 ****
      void         resolvePointers        (UnresolvedPointerVec& pointers);
  
!     void         createSourceControlInfoRegNode(XmlObject * obj);
! 
!     void         createSourceControlInfoRegNodes();
! 
!     void         createSourceControlStatRegNode(XmlObject * obj);
  
      // getting connections
--- 611,617 ----
      void         resolvePointers        (UnresolvedPointerVec& pointers);
  
!     void         resetSourceControlForAll();
!     void         resetSourceControlInfo (XmlObject * obj);
!     void         resetSourceControlStat (XmlObject * obj, bool freshObj);
  
      // getting connections
***************
*** 430,436 ****
  
      // check out
!     void         getCheckOutContainers  (XmlObjSet& objects, XmlObjSet& containers);
  
!     void         getDependentContainers (XmlObject * obj, XmlObjSet& containers, XmlObjSet& processedObjects);
  
      bool         checkOutFiles          (XmlObjSet& containers);
--- 625,647 ----
  
      // check out
!     void         getCheckOutContainers  (XmlObjSet& objects, XmlObjSet& containers, bool thorough = false);
  
!     void         getDependentContainers (XmlObject * obj, XmlObjSet& containers, XmlObjSet& processedObjects, bool thorough = false);
! 
!     void         getMyDepObj            ( XmlObject * obj, XmlObjSet& containers, XmlObjSet& processedObjects, bool thorough);
! 
!     void         getMyDepObjConts       ( XmlObjSet& objects, XmlObjSet& containers, bool thorough);
! 
!     void         getAllTheWayDown       ( XmlObject * obj, XmlObjSet& containers);
! 
!     void         getAllUpAndDown        ( XmlObjSet& objects, XmlObjSet& containers);
! 
!     void         getBasesOfObj          ( XmlObject * obj, XmlObjSet& containers);
! 
!     void         getBasesOf             ( XmlObjSet& objects, XmlObjSet& containers);
! 
! 	void         getDeriveds            ( XmlObject * obj, XmlObjSet& containers);
! 
! 	void         applySmallChange       ( XmlObjSet& p_conts);
  
      bool         checkOutFiles          (XmlObjSet& containers);
***************
*** 446,449 ****
--- 657,662 ----
      bool         readBinaryCache        ();
  
+ 	void         timestampOfCache       ( FILETIME* p_fTime);
+ 
      void         createProjectFile      ();
  
***************
*** 486,490 ****
      bool         isContinerCheckedOut   (XmlObject * obj);
  
!     void         getSSCheckOutUser      (XmlObject * obj, std::string& user);
  
      void         checkOutContainer      (XmlObject * obj);
--- 699,705 ----
      bool         isContinerCheckedOut   (XmlObject * obj);
  
!     void         getSSCheckOutUser      (XmlObject * obj, std::string& user, bool& newfile);
! 
! 	void         getSSLastCommiter      (XmlObject * obj, std::string& user);
  
      void         checkOutContainer      (XmlObject * obj);
***************
*** 516,553 ****
      void         getLatestVerCC         ( const char * path );
  
!     void         showUsedFiles          ( XmlObjSet& containers );
! 
!     void         setSourceControlInfo   ( XmlObject * container, const char * scInfo );
! 
!     void         set2SourceControlNodes ( XmlObject * container, const char * scInfo, const char * scStat);
! 
!     void         getSourceControlInfo   ( XmlObject * container, std::string& scInfo );
  
!     void         getSourceControlStat   ( XmlObject * container, std::string& scInfo );
  
      void         updateSourceControlInfo( XmlObject * container );
- 
      void         updateSourceControlInfo();
  
      void         dumpSourceControlInfo  ();
  
      bool         filesModifiedByOthers  ();
  
!     typedef      std::pair<bool, bool>  BOOLPAIR;
!     BOOLPAIR     filesModifiedByOthersV2( XmlObjSet& readOnlyFiles );
  
      bool         fileModifiedByOthers   ( XmlObject * obj );
  
!     void         decidePointerOperationTrivials();
  
!     bool         portlessModel          ( XmlObject * obj);
  
!     bool         fcoInFolder            ( XmlObject * obj);
  
!     bool         objIsPort              ( XmlObject * obj);
  
  public:
      // this can be used by other classes too
      void         sendMsg                ( const std::string&, int mtype );
  
  protected:
--- 731,780 ----
      void         getLatestVerCC         ( const char * path );
  
!     void         showUsedFiles          ( XmlObjSet& containers, bool p_latentMessage = false );
  
! 	void         setSourceControlNodes  ( XmlObject * container, long lInfo, long lStat);
  
      void         updateSourceControlInfo( XmlObject * container );
      void         updateSourceControlInfo();
  
+ 	void         whoControlsThis        ( XmlObject * container = 0);
+ 
      void         dumpSourceControlInfo  ();
  
      bool         filesModifiedByOthers  ();
  
! 	bool         filesModifiedByOthersV3( XmlObjSet& readOnlyFiles, XmlObjSet& latentFiles );
  
      bool         fileModifiedByOthers   ( XmlObject * obj );
  
! 	bool         makeSureFileExistsInVerSys( const std::string& p_fname, const std::string& p_initialcontent);
! 	// previously was called getStatusFileSS
! 	bool         getFileHandleSS        ( const std::string& p_fname, CComObjPtr<IVSSItem>& ptr);
! 	//bool         getStatusFileCC        ( const std::string& p_fname, const std::string& p_initialcontent);
  
! 	void         protect                ( XmlObject * obj, OpCode oc);
  
! 	bool         findOnProtectedLists   ( GUID p_gd, std::string& p_scapegoatUser);
! 	std::string  refreshProtectionFile  ( const std::string& p_username);
! 	bool         refreshOneFile         ( const std::string& p_filename);
! 	bool         findInFile             ( const std::string& p_filename, const std::string& p_gd);
  
! 	bool         refreshSignFile        ();
! 	std::string  userName               ();
! 	bool         isSS                   ();
! 	bool         isCC                   ();
  
+ 	bool                        userFilter             ( CTimeSpan& p_elapsed);
+ 
+ 	std::vector< LoggedIn>      allusers               ();
+ 	std::vector< LoggedIn>      getUsersFromSignFile   ();
+ 	CTime                       lastSyncTimeForAllUsers();
+ 	CTime                       findEarliestLogin      ( int p_nbOfDays, int p_nbOfHours, int p_nbOfMinutes);
+ 
+ 	bool         specialUserInquiryHandled( VARIANT p);
  public:
      // this can be used by other classes too
      void         sendMsg                ( const std::string&, int mtype );
+ 	std::string  makelink               ( XmlObject * ptr);
  
  protected:
***************
*** 604,608 ****
  #ifdef _DEBUG
      std::string                     mylog;
-     std::vector< std::pair<int,int> > m_relsChanged;
  #endif
  
--- 831,834 ----
***************
*** 614,619 ****
--- 840,853 ----
      //XmlObjSet                       m_checkOutContainers;
  
+ 	// protection list
+ 	ProtectList                     m_protectList;
+ 	SignManager                     m_signer;
  	
      OperatingOptions                m_userOpts;
+ 	std::vector< XmlObject*>        m_deldObjs;
+ 
+ 	friend PublicStorage;
+ 	friend SignManager;
+ 	friend ProtectList;
  };
  

Index: VSSLoginDlg.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/XmlBackEnd/VSSLoginDlg.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** VSSLoginDlg.cpp	14 Sep 2004 15:40:01 -0000	1.1
--- VSSLoginDlg.cpp	26 Sep 2007 20:30:31 -0000	1.2
***************
*** 5,8 ****
--- 5,9 ----
  #include "resource.h"
  #include "VSSLoginDlg.h"
+ #include ".\vsslogindlg.h"
  
  #ifdef _DEBUG
***************
*** 48,49 ****
--- 49,60 ----
  /////////////////////////////////////////////////////////////////////////////
  // CVSSLoginDlg message handlers
+ 
+ BOOL CVSSLoginDlg::OnInitDialog()
+ {
+ 	CDialog::OnInitDialog();
+ 
+ 	// TODO:  Add extra initialization here
+ 
+ 	return TRUE;  // return TRUE unless you set the focus to a control
+ 	// EXCEPTION: OCX Property Pages should return FALSE
+ }

Index: VSSLoginDlg.h
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/XmlBackEnd/VSSLoginDlg.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** VSSLoginDlg.h	14 Sep 2004 15:40:01 -0000	1.1
--- VSSLoginDlg.h	26 Sep 2007 20:30:31 -0000	1.2
***************
*** 42,45 ****
--- 42,47 ----
  	//}}AFX_MSG
  	DECLARE_MESSAGE_MAP()
+ public:
+ 	virtual BOOL OnInitDialog();
  };
  

Index: FilesInUseDlg.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/XmlBackEnd/FilesInUseDlg.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** FilesInUseDlg.cpp	21 Oct 2004 21:22:04 -0000	1.1
--- FilesInUseDlg.cpp	26 Sep 2007 20:30:31 -0000	1.2
***************
*** 5,8 ****
--- 5,9 ----
  #include "resource.h"
  #include "FilesInUseDlg.h"
+ #include ".\filesinusedlg.h"
  
  #ifdef _DEBUG
***************
*** 16,21 ****
  
  
! CFilesInUseDlg::CFilesInUseDlg(CWnd* pParent /*=NULL*/)
  	: CDialog(CFilesInUseDlg::IDD, pParent)
  {
  	//{{AFX_DATA_INIT(CFilesInUseDlg)
--- 17,23 ----
  
  
! CFilesInUseDlg::CFilesInUseDlg(CWnd* pParent /*=NULL*/, bool changeText /* = false */)
  	: CDialog(CFilesInUseDlg::IDD, pParent)
+ 	, m_alternateText( changeText)
  {
  	//{{AFX_DATA_INIT(CFilesInUseDlg)
***************
*** 42,43 ****
--- 44,62 ----
  /////////////////////////////////////////////////////////////////////////////
  // CFilesInUseDlg message handlers
+ 
+ BOOL CFilesInUseDlg::OnInitDialog()
+ {
+ 	CDialog::OnInitDialog();
+ 
+ 	// TODO:  Add extra initialization here
+ 	if( m_alternateText)
+ 	{
+ 		SetWindowText( "Files have been changed");
+ 		CStatic * p = (CStatic* ) GetDlgItem( IDC_STATIC);
+ 		if( p)
+ 			p->SetWindowText( "Cannot perform this operation because certain parts of the model have been changed and saved by other users.");
+ 	}
+ 
+ 	return TRUE;  // return TRUE unless you set the focus to a control
+ 	// EXCEPTION: OCX Property Pages should return FALSE
+ }

Index: FilesInUseDetailsDlg.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/XmlBackEnd/FilesInUseDetailsDlg.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** FilesInUseDetailsDlg.cpp	26 Jan 2005 17:31:01 -0000	1.2
--- FilesInUseDetailsDlg.cpp	26 Sep 2007 20:30:31 -0000	1.3
***************
*** 16,21 ****
  
  
! CFilesInUseDetailsDlg::CFilesInUseDetailsDlg(CWnd* pParent /*=NULL*/)
  	: CDialog(CFilesInUseDetailsDlg::IDD, pParent)
  {
  	//{{AFX_DATA_INIT(CFilesInUseDetailsDlg)
--- 16,22 ----
  
  
! CFilesInUseDetailsDlg::CFilesInUseDetailsDlg(CWnd* pParent /*=NULL*/, bool p_alternateText /*= false*/)
  	: CDialog(CFilesInUseDetailsDlg::IDD, pParent)
+ 	, m_alternateText( p_alternateText)
  {
  	//{{AFX_DATA_INIT(CFilesInUseDetailsDlg)
***************
*** 46,50 ****
  	CDialog::OnInitDialog();
  
!     for( unsigned int i=0; i<m_fileList.size(); ++i )
          m_list.AddString( m_fileList[i].c_str() );
   
--- 47,59 ----
  	CDialog::OnInitDialog();
  
!     if( m_alternateText)
! 	{
! 		SetWindowText( "Files changed and saved by other users");
! 		CStatic * p = (CStatic* ) GetDlgItem( IDC_STATIC);
! 		if( p)
! 			p->SetWindowText( "Latent changed files: user, model/folder name, type (model/folder)");
! 	}
! 
! 	for( unsigned int i=0; i<m_fileList.size(); ++i )
          m_list.AddString( m_fileList[i].c_str() );
   

--- NEW FILE: xmga.dtd ---
<?xml version="1.0" encoding="UTF-8"?>

<!ENTITY lt     "&#38;#60;"> 
<!ENTITY gt     "&#62;"> 
<!ENTITY amp    "&#38;#38;"> 
<!ENTITY apos   "&#39;"> 
<!ENTITY quot   "&#34;">


<!ELEMENT Root EMPTY>
<!ATTLIST Root
	MetaId		CDATA		#IMPLIED
	Id		CDATA		#IMPLIED
	Name		CDATA		#IMPLIED
	CDate		CDATA		#IMPLIED
	MDate		CDATA		#IMPLIED
	Author		CDATA		#IMPLIED
	GUID		CDATA		#IMPLIED
	VERSION		CDATA		#IMPLIED
	ParadigmGUID		CDATA		#IMPLIED
	ParadigmVersion		CDATA		#IMPLIED
	ExtParadigm		CDATA		#IMPLIED
	Comment		CDATA		#IMPLIED
	MGA_Version	CDATA		#IMPLIED
>


Index: FilesInUseDetailsDlg.h
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/XmlBackEnd/FilesInUseDetailsDlg.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** FilesInUseDetailsDlg.h	21 Oct 2004 21:22:04 -0000	1.1
--- FilesInUseDetailsDlg.h	26 Sep 2007 20:30:31 -0000	1.2
***************
*** 20,24 ****
  // Construction
  public:
! 	CFilesInUseDetailsDlg(CWnd* pParent = NULL);   // standard constructor
  
  // Dialog Data
--- 20,24 ----
  // Construction
  public:
! 	CFilesInUseDetailsDlg(CWnd* pParent = NULL, bool alternateText = false);   // standard constructor
  
  // Dialog Data
***************
*** 45,48 ****
--- 45,49 ----
  	DECLARE_MESSAGE_MAP()
  
+ 	bool    m_alternateText;
  public:
      strVec m_fileList;

Index: FilesInUseDlg.h
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/XmlBackEnd/FilesInUseDlg.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** FilesInUseDlg.h	21 Oct 2004 21:22:04 -0000	1.1
--- FilesInUseDlg.h	26 Sep 2007 20:30:31 -0000	1.2
***************
*** 15,19 ****
  // Construction
  public:
! 	CFilesInUseDlg(CWnd* pParent = NULL);   // standard constructor
  
  // Dialog Data
--- 15,19 ----
  // Construction
  public:
! 	CFilesInUseDlg(CWnd* pParent = NULL, bool changeTxt = false);   // standard constructor
  
  // Dialog Data
***************
*** 39,42 ****
--- 39,46 ----
  	//}}AFX_MSG
  	DECLARE_MESSAGE_MAP()
+ 
+ 	bool         m_alternateText;
+ public:
+ 	virtual BOOL OnInitDialog();
  };
  



More information about the GME-commit mailing list