[GME-commit] GMESRC/GME/MgaDecorators BitmapUtil.cpp,1.2,1.3 BitmapUtil.h,1.1,1.2 BoxDecorator.cpp,1.38,1.39 DecoratorUtil.cpp,1.6,1.7 DecoratorUtil.h,1.4,1.5 MgaDecorators.dsp,1.15,1.16 StdAfx.h,1.7,1.8 StereotypeDecorators.cpp,1.12,1.13 StereotypeDecorators.h,1.4,1.5

gme-commit at list.isis.vanderbilt.edu gme-commit at list.isis.vanderbilt.edu
Wed Oct 13 11:17:59 CDT 2004


Update of /var/lib/gme/GMESRC/GME/MgaDecorators
In directory braindrain:/tmp/cvs-serv20870/MgaDecorators

Modified Files:
	BitmapUtil.cpp BitmapUtil.h BoxDecorator.cpp DecoratorUtil.cpp 
	DecoratorUtil.h MgaDecorators.dsp StdAfx.h 
	StereotypeDecorators.cpp StereotypeDecorators.h 
Log Message:
GME ported to STLport
-std:: prefix added to stl classes and methods



CVS User: zolmol

Index: BitmapUtil.cpp
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/MgaDecorators/BitmapUtil.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** BitmapUtil.cpp	10 Oct 2003 05:17:20 -0000	1.2
--- BitmapUtil.cpp	13 Oct 2004 15:17:55 -0000	1.3
***************
*** 200,204 ****
  void BitmapBase::draw( CDC* pDC, const CRect& cRect, const TileVector& vecTiles ) const
  {
! 	for ( long i = 0 ; i < vecTiles.size() ; i++ ) {
  
  		CPoint srcTopLeft = vecTiles[ i ].getPartTopLeft().calcPoint( m_lWidth, m_lHeight );
--- 200,204 ----
  void BitmapBase::draw( CDC* pDC, const CRect& cRect, const TileVector& vecTiles ) const
  {
! 	for ( unsigned long i = 0 ; i < vecTiles.size() ; i++ ) {//zolmol!
  
  		CPoint srcTopLeft = vecTiles[ i ].getPartTopLeft().calcPoint( m_lWidth, m_lHeight );
***************
*** 333,337 ****
  		if ( ! getFacilities().arePathesValid() )
  			return;
! 		vector<CString> vecPathes = getFacilities().getPathes();
  
  		CString strFName = strName;
--- 333,337 ----
  		if ( ! getFacilities().arePathesValid() )
  			return;
! 		std::vector<CString> vecPathes = getFacilities().getPathes();
  
  		CString strFName = strName;
***************
*** 339,343 ****
  		CFile fDIB;
  		CFileException fexDIB;
! 		for ( int i = 0 ; i < vecPathes.size() ; i++ ) {
  			if ( fDIB.Open( vecPathes[ i ] + strFName, CFile::modeRead | CFile::shareDenyWrite, &fexDIB ) ) {
  				TRY {
--- 339,343 ----
  		CFile fDIB;
  		CFileException fexDIB;
! 		for ( unsigned int i = 0 ; i < vecPathes.size() ; i++ ) {//zolmol!
  			if ( fDIB.Open( vecPathes[ i ] + strFName, CFile::modeRead | CFile::shareDenyWrite, &fexDIB ) ) {
  				TRY {
***************
*** 420,428 ****
  		if ( ! getFacilities().arePathesValid() )
  			return;
! 		vector<CString> vecPathes = getFacilities().getPathes();
  
  		CString strFName = strName;
  
! 		for ( int i = 0 ; i < vecPathes.size() ; i++ ) {
  			CString strPath = vecPathes[ i ];
  			m_pImage = new CImage( vecPathes[ i ] + strFName, CIMAGE_FORMAT_GIF );
--- 420,428 ----
  		if ( ! getFacilities().arePathesValid() )
  			return;
! 		std::vector<CString> vecPathes = getFacilities().getPathes();
  
  		CString strFName = strName;
  
! 		for ( unsigned int i = 0 ; i < vecPathes.size() ; i++ ) {//zolmol!
  			CString strPath = vecPathes[ i ];
  			m_pImage = new CImage( vecPathes[ i ] + strFName, CIMAGE_FORMAT_GIF );

Index: BitmapUtil.h
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/MgaDecorators/BitmapUtil.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** BitmapUtil.h	19 May 2003 14:52:28 -0000	1.1
--- BitmapUtil.h	13 Oct 2004 15:17:55 -0000	1.2
***************
*** 123,127 ****
  };
  
! typedef vector<BackgroundTile> TileVector;
  
  //################################################################################################
--- 123,127 ----
  };
  
! typedef std::vector<BackgroundTile> TileVector;
  
  //################################################################################################

Index: BoxDecorator.cpp
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/MgaDecorators/BoxDecorator.cpp,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -d -r1.38 -r1.39
*** BoxDecorator.cpp	3 Nov 2003 23:46:31 -0000	1.38
--- BoxDecorator.cpp	13 Oct 2004 15:17:55 -0000	1.39
***************
*** 215,219 ****
  	COMTHROW( spFCOs.CoCreateInstance( OLESTR( "Mga.MgaFCOs") ) );
  
! 	vector<Decorator::PortDecorator*>	vecPorts;
  	switch ( m_pDecorator->getType() ) {
  		case OBJTYPE_MODEL :
--- 215,219 ----
  	COMTHROW( spFCOs.CoCreateInstance( OLESTR( "Mga.MgaFCOs") ) );
  
! 	std::vector<Decorator::PortDecorator*>	vecPorts;
  	switch ( m_pDecorator->getType() ) {
  		case OBJTYPE_MODEL :
***************
*** 227,231 ****
  	}
  
! 	for ( int i = 0 ; i < vecPorts.size() ; i++ )
  		COMTHROW( spFCOs->Append( vecPorts[ i ]->getFCO() ) );
  
--- 227,231 ----
  	}
  
! 	for ( unsigned int i = 0 ; i < vecPorts.size() ; i++ )//zolmol!
  		COMTHROW( spFCOs->Append( vecPorts[ i ]->getFCO() ) );
  

Index: DecoratorUtil.cpp
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/MgaDecorators/DecoratorUtil.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** DecoratorUtil.cpp	10 Oct 2003 05:17:20 -0000	1.6
--- DecoratorUtil.cpp	13 Oct 2004 15:17:55 -0000	1.7
***************
*** 150,163 ****
  Facilities::~Facilities()
  {
! 	for ( map<CString,BitmapBase*>::iterator it = m_mapBitmaps.begin() ; it != m_mapBitmaps.end() ; ++it )
  		delete it->second;
! 	for ( map<CString,TileVector*>::iterator it2 = m_mapTileVectors.begin() ; it2 != m_mapTileVectors.end() ; ++it2 )
  		delete it2->second;
! 	for ( map<int,SFont*>::iterator it3 = m_mapFonts.begin() ; it3 != m_mapFonts.end() ; ++it3 ) {
  		it3->second->pFont->DeleteObject();
  		delete it3->second->pFont;
  		delete it3->second;
  	}
! 	for ( map<CString,CPen*>::iterator it4 = m_mapPens.begin() ; it4 != m_mapPens.end() ; ++it4 ) {
  		it4->second->DeleteObject();
  		delete it4->second;
--- 150,163 ----
  Facilities::~Facilities()
  {
! 	for ( std::map<CString,BitmapBase*>::iterator it = m_mapBitmaps.begin() ; it != m_mapBitmaps.end() ; ++it )
  		delete it->second;
! 	for ( std::map<CString,TileVector*>::iterator it2 = m_mapTileVectors.begin() ; it2 != m_mapTileVectors.end() ; ++it2 )
  		delete it2->second;
! 	for ( std::map<int,SFont*>::iterator it3 = m_mapFonts.begin() ; it3 != m_mapFonts.end() ; ++it3 ) {
  		it3->second->pFont->DeleteObject();
  		delete it3->second->pFont;
  		delete it3->second;
  	}
! 	for ( std::map<CString,CPen*>::iterator it4 = m_mapPens.begin() ; it4 != m_mapPens.end() ; ++it4 ) {
  		it4->second->DeleteObject();
  		delete it4->second;
***************
*** 253,257 ****
  }
  
! vector<CString> Facilities::getPathes() const
  {
  	return m_vecPathes;
--- 253,257 ----
  }
  
! std::vector<CString> Facilities::getPathes() const
  {
  	return m_vecPathes;
***************
*** 412,416 ****
  	}
  
! 	map<CString,BitmapBase*>::iterator it = m_mapBitmaps.find( strID );
  	if ( it != m_mapBitmaps.end() )
  		return it->second;
--- 412,416 ----
  	}
  
! 	std::map<CString,BitmapBase*>::iterator it = m_mapBitmaps.find( strID );
  	if ( it != m_mapBitmaps.end() )
  		return it->second;
***************
*** 431,435 ****
  			pBMP = ( bHasBC ) ? new BitmapDIB( strName2, crBC, false ) : new BitmapDIB( strName2);
  		if ( pBMP->isInitialized() ) {
! 			m_mapBitmaps.insert( map<CString,BitmapBase*>::value_type( strID, pBMP ) );
  			return pBMP;
  		}
--- 431,435 ----
  			pBMP = ( bHasBC ) ? new BitmapDIB( strName2, crBC, false ) : new BitmapDIB( strName2);
  		if ( pBMP->isInitialized() ) {
! 			m_mapBitmaps.insert( std::map<CString,BitmapBase*>::value_type( strID, pBMP ) );
  			return pBMP;
  		}
***************
*** 446,450 ****
  			pBMP = ( bHasBC ) ? new BitmapGIF( strName2, crBC, false ) : new BitmapGIF( strName2 );
  		if ( pBMP->isInitialized() ) {
! 			m_mapBitmaps.insert( map<CString,BitmapBase*>::value_type( strID, pBMP ) );
  			return pBMP;
  		}
--- 446,450 ----
  			pBMP = ( bHasBC ) ? new BitmapGIF( strName2, crBC, false ) : new BitmapGIF( strName2 );
  		if ( pBMP->isInitialized() ) {
! 			m_mapBitmaps.insert( std::map<CString,BitmapBase*>::value_type( strID, pBMP ) );
  			return pBMP;
  		}
***************
*** 461,465 ****
  			pBMP = ( bHasBC ) ? new BitmapRES( iID, crBC, false ) : new BitmapRES( iID );
  		if ( pBMP->isInitialized() ) {
! 			m_mapBitmaps.insert( map<CString,BitmapBase*>::value_type( strID, pBMP ) );
  			return pBMP;
  		}
--- 461,465 ----
  			pBMP = ( bHasBC ) ? new BitmapRES( iID, crBC, false ) : new BitmapRES( iID );
  		if ( pBMP->isInitialized() ) {
! 			m_mapBitmaps.insert( std::map<CString,BitmapBase*>::value_type( strID, pBMP ) );
  			return pBMP;
  		}
***************
*** 501,505 ****
  TileVector* Facilities::getTileVector( const CString& strName ) const
  {
! 	map<CString,TileVector*>::const_iterator it = m_mapTileVectors.find( strName );
  	return ( it == m_mapTileVectors.end() ) ? NULL : it->second;
  }
--- 501,505 ----
  TileVector* Facilities::getTileVector( const CString& strName ) const
  {
! 	std::map<CString,TileVector*>::const_iterator it = m_mapTileVectors.find( strName );
  	return ( it == m_mapTileVectors.end() ) ? NULL : it->second;
  }
***************
*** 520,524 ****
  SFont* Facilities::getFont( int iFontKey ) const
  {
! 	map<int,SFont*>::const_iterator it = m_mapFonts.find( iFontKey );
  	return ( it == m_mapFonts.end() ) ? NULL : it->second;
  }
--- 520,524 ----
  SFont* Facilities::getFont( int iFontKey ) const
  {
! 	std::map<int,SFont*>::const_iterator it = m_mapFonts.find( iFontKey );
  	return ( it == m_mapFonts.end() ) ? NULL : it->second;
  }
***************
*** 528,536 ****
  	char chBuffer[ 30 ];
  	sprintf( chBuffer, "%x-%d", crColor, iWidth );
! 	map<CString,CPen*>::iterator it = m_mapPens.find( CString( chBuffer ) );
  	if ( it != m_mapPens.end() )
  		return it->second;
  	CPen* pPen = new CPen( PS_SOLID, iWidth, crColor );
! 	m_mapPens.insert( map<CString,CPen*>::value_type( CString( chBuffer ), pPen ) );
  	return pPen;
  }
--- 528,536 ----
  	char chBuffer[ 30 ];
  	sprintf( chBuffer, "%x-%d", crColor, iWidth );
! 	std::map<CString,CPen*>::iterator it = m_mapPens.find( CString( chBuffer ) );
  	if ( it != m_mapPens.end() )
  		return it->second;
  	CPen* pPen = new CPen( PS_SOLID, iWidth, crColor );
! 	m_mapPens.insert( std::map<CString,CPen*>::value_type( CString( chBuffer ), pPen ) );
  	return pPen;
  }
***************
*** 609,615 ****
  }
  
! vector<CString> Facilities::wrapString( const CString& strIn, int iWrap, int iMax )
  {
! 	vector<CString> vecOut;
  	CString str = strIn;
  	str.TrimLeft();
--- 609,615 ----
  }
  
! std::vector<CString> Facilities::wrapString( const CString& strIn, int iWrap, int iMax )
  {
! 	std::vector<CString> vecOut;
  	CString str = strIn;
  	str.TrimLeft();

Index: DecoratorUtil.h
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/MgaDecorators/DecoratorUtil.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** DecoratorUtil.h	8 Oct 2003 10:08:45 -0000	1.4
--- DecoratorUtil.h	13 Oct 2004 15:17:55 -0000	1.5
***************
*** 26,30 ****
  	struct SFont;
  	class BackgroundTile;
! 	typedef vector<BackgroundTile> TileVector;
  	enum ELocation;
  	enum EPrefStatus;
--- 26,30 ----
  	struct SFont;
  	class BackgroundTile;
! 	typedef std::vector<BackgroundTile> TileVector;
  	enum ELocation;
  	enum EPrefStatus;
***************
*** 42,54 ****
  		private :
  			CComPtr<IMgaProject>		m_spProject;
! 			vector<CString> 				m_vecPathes;
  			bool							m_bArePathesValid;
  			CString							m_strParadigmPath;
  			CString							m_strProjectPath;
  
! 			map<CString,BitmapBase*>	m_mapBitmaps;
! 			map<CString,TileVector*>	m_mapTileVectors;
! 			map<int,SFont*>				m_mapFonts;
! 			map<CString,CPen*>			m_mapPens;
  
  		public :
--- 42,54 ----
  		private :
  			CComPtr<IMgaProject>		m_spProject;
! 			std::vector<CString> 				m_vecPathes;
  			bool							m_bArePathesValid;
  			CString							m_strParadigmPath;
  			CString							m_strProjectPath;
  
! 			std::map<CString,BitmapBase*>	m_mapBitmaps;
! 			std::map<CString,TileVector*>	m_mapTileVectors;
! 			std::map<int,SFont*>				m_mapFonts;
! 			std::map<CString,CPen*>			m_mapPens;
  
  		public :
***************
*** 58,62 ****
  			bool loadPathes( IMgaProject* pProject, bool bRefresh = false );
  			bool arePathesValid() const;
! 			vector<CString> getPathes() const;
  
  			BitmapBase* getBitmap( const CString& strName );
--- 58,62 ----
  			bool loadPathes( IMgaProject* pProject, bool bRefresh = false );
  			bool arePathesValid() const;
! 			std::vector<CString> getPathes() const;
  
  			BitmapBase* getBitmap( const CString& strName );
***************
*** 91,95 ****
  			COLORREF shiftColor( COLORREF crColor, int iShift ) const;
  
! 			vector<CString> wrapString( const CString& str, int iWrap, int iMax );
  
  		private :
--- 91,95 ----
  			COLORREF shiftColor( COLORREF crColor, int iShift ) const;
  
! 			std::vector<CString> wrapString( const CString& str, int iWrap, int iMax );
  
  		private :

Index: MgaDecorators.dsp
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/MgaDecorators/MgaDecorators.dsp,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** MgaDecorators.dsp	19 May 2003 14:52:28 -0000	1.15
--- MgaDecorators.dsp	13 Oct 2004 15:17:55 -0000	1.16
***************
*** 44,48 ****
  # PROP Target_Dir ""
  # ADD BASE CPP /nologo /MTd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /Yu"stdafx.h" /FD /GZ /c
! # ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../Common" /I "..\Interfaces" /I "../include/gifhelp" /I "../include/stl" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_WINDLL" /D "_AFXDLL" /D "OLD_DECORATOR_LOOKANDFEEL" /FR /Yu"stdafx.h" /FD /GZ /c
  # ADD MTL /I "..\Interfaces"
  # ADD BASE RSC /l 0x409 /d "_DEBUG"
--- 44,48 ----
  # PROP Target_Dir ""
  # ADD BASE CPP /nologo /MTd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /Yu"stdafx.h" /FD /GZ /c
! # ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../Common" /I "..\Interfaces" /I "../include/gifhelp" /I "../include/stlport" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_WINDLL" /D "_AFXDLL" /D "OLD_DECORATOR_LOOKANDFEEL" /FR /Yu"stdafx.h" /FD /GZ /c
  # ADD MTL /I "..\Interfaces"
  # ADD BASE RSC /l 0x409 /d "_DEBUG"
***************
*** 53,57 ****
  LINK32=link.exe
  # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
! # ADD LINK32 ..\lib\cimage_D.lib ..\lib\jpeg_D.lib ..\lib\png_D.lib ..\lib\zlib_D.lib /nologo /base:"0x60700000" /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
  # Begin Custom Build - Performing registration
  OutDir=.\Debug
--- 53,57 ----
  LINK32=link.exe
  # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
! # ADD LINK32 ..\lib\cimage_D.lib ..\lib\jpeg_D.lib ..\lib\png_D.lib ..\lib\zlib_D.lib /nologo /base:"0x60700000" /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept /libpath:"..\lib"
  # Begin Custom Build - Performing registration
  OutDir=.\Debug
***************
*** 80,84 ****
  # PROP Target_Dir ""
  # ADD BASE CPP /nologo /MT /W3 /O1 /I "..\Interfaces" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_DLL" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c
! # ADD CPP /nologo /MD /W3 /GX /Zi /O1 /I "../Common" /I "..\Interfaces" /I "../include/gifhelp" /I "../include/stl" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_DLL" /D "_WINDLL" /D "_AFXDLL" /D "OLD_DECORATOR_LOOKANDFEEL" /Yu"stdafx.h" /FD /c
  # ADD MTL /I "..\Interfaces"
  # ADD BASE RSC /l 0x409 /d "NDEBUG"
--- 80,84 ----
  # PROP Target_Dir ""
  # ADD BASE CPP /nologo /MT /W3 /O1 /I "..\Interfaces" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_DLL" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c
! # ADD CPP /nologo /MD /W3 /GX /Zi /O1 /I "../Common" /I "..\Interfaces" /I "../include/gifhelp" /I "../include/stlport" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_DLL" /D "_WINDLL" /D "_AFXDLL" /D "OLD_DECORATOR_LOOKANDFEEL" /Yu"stdafx.h" /FD /c
  # ADD MTL /I "..\Interfaces"
  # ADD BASE RSC /l 0x409 /d "NDEBUG"
***************
*** 89,93 ****
  LINK32=link.exe
  # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
! # ADD LINK32 ..\lib\cimage.lib ..\lib\jpeg.lib ..\lib\png.lib ..\lib\zlib.lib /nologo /base:"0x60700000" /subsystem:windows /dll /map /debug /machine:I386
  # Begin Custom Build - Performing registration
  OutDir=.\Release
--- 89,93 ----
  LINK32=link.exe
  # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
! # ADD LINK32 ..\lib\cimage.lib ..\lib\jpeg.lib ..\lib\png.lib ..\lib\zlib.lib /nologo /base:"0x60700000" /subsystem:windows /dll /map /debug /machine:I386 /libpath:"..\lib"
  # Begin Custom Build - Performing registration
  OutDir=.\Release

Index: StdAfx.h
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/MgaDecorators/StdAfx.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** StdAfx.h	19 May 2003 14:52:28 -0000	1.7
--- StdAfx.h	13 Oct 2004 15:17:55 -0000	1.8
***************
*** 38,44 ****
  // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  
! #include <stl_config.h>
! #undef __SGI_STL_NO_ARROW_OPERATOR
! #define __SGI_STL_INTERNAL_RELOPS
  
  #endif // !defined(AFX_STDAFX_H__8B8917B1_B409_43D6_9604_73055641403B__INCLUDED)
--- 38,43 ----
  // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  
! #include <stl_user_config.h>
! 
  
  #endif // !defined(AFX_STDAFX_H__8B8917B1_B409_43D6_9604_73055641403B__INCLUDED)

Index: StereotypeDecorators.cpp
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/MgaDecorators/StereotypeDecorators.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** StereotypeDecorators.cpp	17 Jul 2004 08:45:30 -0000	1.12
--- StereotypeDecorators.cpp	13 Oct 2004 15:17:55 -0000	1.13
***************
*** 11,15 ****
  #include "DecoratorUtil.h"
  #include "BitmapUtil.h"
! 
  namespace Decorator
  {
--- 11,15 ----
  #include "DecoratorUtil.h"
  #include "BitmapUtil.h"
! #include <algorithm>
  namespace Decorator
  {
***************
*** 389,393 ****
  	dc.SelectObject(getFacilities().getFont( m_iFontKey )->pFont);
  	CSize cSize(0,0);
! 	for ( int i = 0 ; i < m_vecName.size() ; i++ ) {
  		CSize tmpSize = dc.GetTextExtent(m_vecName[ i ]);
  		cSize.cy += tmpSize.cy;
--- 389,393 ----
  	dc.SelectObject(getFacilities().getFont( m_iFontKey )->pFont);
  	CSize cSize(0,0);
! 	for ( unsigned int i = 0 ; i < m_vecName.size() ; i++ ) {//zolmol!
  		CSize tmpSize = dc.GetTextExtent(m_vecName[ i ]);
  		cSize.cy += tmpSize.cy;
***************
*** 443,447 ****
  	int iLabelSize = getFacilities().getFont( m_iFontKey )->iSize;
  	CPoint pt = getLabelPosition();
! 	for ( int i = 0 ; i < m_vecName.size() ; i++ )
  		getFacilities().drawText( pDC, m_vecName[ i ], CPoint( pt.x, pt.y + i * iLabelSize ), getFacilities().getFont( m_iFontKey )->pFont, ( m_bActive ) ? m_crName : COLOR_GRAY, iAlign, m_iMaxTextLength, "", "", false );
  }
--- 443,447 ----
  	int iLabelSize = getFacilities().getFont( m_iFontKey )->iSize;
  	CPoint pt = getLabelPosition();
! 	for ( unsigned int i = 0 ; i < m_vecName.size() ; i++ )//zolmol!
  		getFacilities().drawText( pDC, m_vecName[ i ], CPoint( pt.x, pt.y + i * iLabelSize ), getFacilities().getFont( m_iFontKey )->pFont, ( m_bActive ) ? m_crName : COLOR_GRAY, iAlign, m_iMaxTextLength, "", "", false );
  }
***************
*** 826,830 ****
  ModelDecorator::~ModelDecorator()
  {
! 	for ( int i = 0 ; i < m_vecLeftPorts.size() ; i++ )
  		delete m_vecLeftPorts[ i ];
  	for ( i = 0 ; i < m_vecRightPorts.size() ; i++ )
--- 826,830 ----
  ModelDecorator::~ModelDecorator()
  {
! 	for ( unsigned int i = 0 ; i < m_vecLeftPorts.size() ; i++ )//zolmol!
  		delete m_vecLeftPorts[ i ];
  	for ( i = 0 ; i < m_vecRightPorts.size() ; i++ )
***************
*** 870,874 ****
  	if ( m_spAspect ) {
  
! 		vector<PortDecorator*>	vecPorts;
  
  		CComPtr<IMgaFCOs> spFCOs;
--- 870,874 ----
  	if ( m_spAspect ) {
  
! 		std::vector<PortDecorator*>	vecPorts;
  
  		CComPtr<IMgaFCOs> spFCOs;
***************
*** 899,908 ****
  }
  
! void ModelDecorator::orderPorts( vector<PortDecorator*>& vecPorts )
  {
  	long lMin = 100000000;
  	long lMax = 0;
  
! 	for ( int i = 0 ; i < vecPorts.size() ; i++ ) {
  		lMin = min( lMin, vecPorts[ i ]->getInnerPosition().x );
  		lMax = max( lMax, vecPorts[ i ]->getInnerPosition().x );
--- 899,908 ----
  }
  
! void ModelDecorator::orderPorts( std::vector<PortDecorator*>& vecPorts )
  {
  	long lMin = 100000000;
  	long lMax = 0;
  
! 	for ( unsigned int i = 0 ; i < vecPorts.size() ; i++ ) {//zolmol!
  		lMin = min( lMin, vecPorts[ i ]->getInnerPosition().x );
  		lMax = max( lMax, vecPorts[ i ]->getInnerPosition().x );
***************
*** 926,931 ****
  	}
  
! 	sort( m_vecLeftPorts.begin(), m_vecLeftPorts.end(), PortLess() );
! 	sort( m_vecRightPorts.begin(), m_vecRightPorts.end(), PortLess() );
  }
  
--- 926,931 ----
  	}
  
! 	std::sort( m_vecLeftPorts.begin(), m_vecLeftPorts.end(), PortLess() );
! 	std::sort( m_vecRightPorts.begin(), m_vecRightPorts.end(), PortLess() );
  }
  
***************
*** 947,951 ****
  	TypeableDecorator::setBoxLocation( cRect );
  	long lY = ( m_Rect.Height() - m_vecLeftPorts.size() * ( HEIGHT_PORT + GAP_PORT ) + GAP_PORT ) / 2;
! 	for ( int i = 0 ; i < m_vecLeftPorts.size() ; i++ ) {
  		m_vecLeftPorts[ i ]->setBoxLocation( CRect( GAP_XMODELPORT, lY, GAP_XMODELPORT + WIDTH_PORT, lY + HEIGHT_PORT ) );
  		lY += HEIGHT_PORT + GAP_PORT;
--- 947,951 ----
  	TypeableDecorator::setBoxLocation( cRect );
  	long lY = ( m_Rect.Height() - m_vecLeftPorts.size() * ( HEIGHT_PORT + GAP_PORT ) + GAP_PORT ) / 2;
! 	for ( unsigned int i = 0 ; i < m_vecLeftPorts.size() ; i++ ) {//zolmol!
  		m_vecLeftPorts[ i ]->setBoxLocation( CRect( GAP_XMODELPORT, lY, GAP_XMODELPORT + WIDTH_PORT, lY + HEIGHT_PORT ) );
  		lY += HEIGHT_PORT + GAP_PORT;
***************
*** 961,965 ****
  {
  	TypeableDecorator::setActive( bActive );
! 	for ( int i = 0 ; i < m_vecLeftPorts.size() ; i++ )
  		m_vecLeftPorts[ i ]->setActive( bActive );
  	for ( i = 0 ; i < m_vecRightPorts.size() ; i++ )
--- 961,965 ----
  {
  	TypeableDecorator::setActive( bActive );
! 	for ( unsigned int i = 0 ; i < m_vecLeftPorts.size() ; i++ )//zolmol!
  		m_vecLeftPorts[ i ]->setActive( bActive );
  	for ( i = 0 ; i < m_vecRightPorts.size() ; i++ )
***************
*** 967,974 ****
  }
  
! vector<PortDecorator*> ModelDecorator::getPorts() const
  {
! 	vector<PortDecorator*> vecPorts( m_vecLeftPorts );
! 	for ( int i = 0 ; i < m_vecRightPorts.size() ; i++ )
  			vecPorts.push_back( m_vecRightPorts[ i ] );
  	return vecPorts;
--- 967,974 ----
  }
  
! std::vector<PortDecorator*> ModelDecorator::getPorts() const
  {
! 	std::vector<PortDecorator*> vecPorts( m_vecLeftPorts );
! 	for ( unsigned int i = 0 ; i < m_vecRightPorts.size() ; i++ )//zolmol!
  			vecPorts.push_back( m_vecRightPorts[ i ] );
  	return vecPorts;
***************
*** 977,981 ****
  PortDecorator* ModelDecorator::getPort( CComPtr<IMgaFCO> spFCO ) const
  {
! 	for ( int i = 0 ; i < m_vecLeftPorts.size() ; i++ )
  		if ( m_vecLeftPorts[ i ]->getFCO() == spFCO )
  			return m_vecLeftPorts[ i ];
--- 977,981 ----
  PortDecorator* ModelDecorator::getPort( CComPtr<IMgaFCO> spFCO ) const
  {
! 	for ( unsigned int i = 0 ; i < m_vecLeftPorts.size() ; i++ )//zolmol!
  		if ( m_vecLeftPorts[ i ]->getFCO() == spFCO )
  			return m_vecLeftPorts[ i ];
***************
*** 1016,1020 ****
  	cRect.BottomRight() += CPoint( 1, 1 );
  	CPoint ptOrigin = pDC->OffsetViewportOrg( (long) ( cRect.left * ( (double) cExtentD.cx / cExtentL.cx ) ), (long) ( cRect.top * ( (double) cExtentD.cy / cExtentL.cy ) ) );
! 	for ( int i = 0 ; i < m_vecLeftPorts.size() ; i++ )
  		m_vecLeftPorts[ i ]->draw( pDC );
  	for ( i = 0 ; i < m_vecRightPorts.size() ; i++ )
--- 1016,1020 ----
  	cRect.BottomRight() += CPoint( 1, 1 );
  	CPoint ptOrigin = pDC->OffsetViewportOrg( (long) ( cRect.left * ( (double) cExtentD.cx / cExtentL.cx ) ), (long) ( cRect.top * ( (double) cExtentD.cy / cExtentL.cy ) ) );
! 	for ( unsigned int i = 0 ; i < m_vecLeftPorts.size() ; i++ )//zolmol!
  		m_vecLeftPorts[ i ]->draw( pDC );
  	for ( i = 0 ; i < m_vecRightPorts.size() ; i++ )

Index: StereotypeDecorators.h
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/MgaDecorators/StereotypeDecorators.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** StereotypeDecorators.h	13 Oct 2003 14:50:40 -0000	1.4
--- StereotypeDecorators.h	13 Oct 2004 15:17:55 -0000	1.5
***************
*** 22,30 ****
  	class BitmapBase;
  	class BackgroundTile;
! 	typedef vector<BackgroundTile> TileVector;
  
  	struct PreferenceVariant;
  
! 	typedef map<CString,PreferenceVariant> PreferenceMap;
  
  //################################################################################################
--- 22,30 ----
  	class BitmapBase;
  	class BackgroundTile;
! 	typedef std::vector<BackgroundTile> TileVector;
  
  	struct PreferenceVariant;
  
! 	typedef std::map<CString,PreferenceVariant> PreferenceMap;
  
  //################################################################################################
***************
*** 91,95 ****
  			CRect							m_Rect;
  			CString							m_strName;
! 			vector<CString>				m_vecName;
  			ELocation						m_eNameLocation;
  			bool							m_bNameEnabled;
--- 91,95 ----
  			CRect							m_Rect;
  			CString							m_strName;
! 			std::vector<CString>				m_vecName;
  			ELocation						m_eNameLocation;
  			bool							m_bNameEnabled;
***************
*** 224,229 ****
  	{
  		private :
! 			vector<PortDecorator*>		m_vecLeftPorts;
! 			vector<PortDecorator*>		m_vecRightPorts;
  			CComPtr<IMgaMetaAspect>	m_spAspect;
  			long							m_iMaxPortTextLength;
--- 224,229 ----
  	{
  		private :
! 			std::vector<PortDecorator*>		m_vecLeftPorts;
! 			std::vector<PortDecorator*>		m_vecRightPorts;
  			CComPtr<IMgaMetaAspect>	m_spAspect;
  			long							m_iMaxPortTextLength;
***************
*** 238,242 ****
  			virtual void				setBoxLocation( const CRect& cRect );
  			virtual void 				setActive( bool bActive );
! 			vector<PortDecorator*>	getPorts() const;
  			PortDecorator*			getPort( CComPtr<IMgaFCO> ) const;
  
--- 238,242 ----
  			virtual void				setBoxLocation( const CRect& cRect );
  			virtual void 				setActive( bool bActive );
! 			std::vector<PortDecorator*>	getPorts() const;
  			PortDecorator*			getPort( CComPtr<IMgaFCO> ) const;
  
***************
*** 245,249 ****
  		private :
  			void 						loadPorts();
! 			void 						orderPorts( vector<PortDecorator*>& vecPorts );
  
  	};
--- 245,249 ----
  		private :
  			void 						loadPorts();
! 			void 						orderPorts( std::vector<PortDecorator*>& vecPorts );
  
  	};



More information about the GME-commit mailing list