[GME-commit] GMESRC/Paradigms/MetaGME/QuRep Component.rc, NONE, 1.1 ComponentConfig.h, NONE, 1.1 QuRepComponent.vcproj, NONE, 1.1 RawComponent.cpp, NONE, 1.1 RawComponent.h, NONE, 1.1 RelationInfo.cpp, NONE, 1.1 RelationInfo.h, NONE, 1.1 SearchRepl.cpp, NONE, 1.1 SearchRepl.h, NONE, 1.1 StdAfx.cpp, NONE, 1.1 StdAfx.h, NONE, 1.1 compicon.ico, NONE, 1.1 component.def, NONE, 1.1 copier.cpp, NONE, 1.1 copier.h, NONE, 1.1 kindseldlg.cpp, NONE, 1.1 kindseldlg.h, NONE, 1.1 nullexc.cpp, NONE, 1.1 nullexc.h, NONE, 1.1 resource.h, NONE, 1.1

gme-commit at list.isis.vanderbilt.edu gme-commit at list.isis.vanderbilt.edu
Mon Jun 18 12:47:57 CDT 2007


Update of /project/gme-repository/GMESRC/Paradigms/MetaGME/QuRep
In directory escher:/tmp/cvs-serv19653

Added Files:
	Component.rc ComponentConfig.h QuRepComponent.vcproj 
	RawComponent.cpp RawComponent.h RelationInfo.cpp 
	RelationInfo.h SearchRepl.cpp SearchRepl.h StdAfx.cpp StdAfx.h 
	compicon.ico component.def copier.cpp copier.h kindseldlg.cpp 
	kindseldlg.h nullexc.cpp nullexc.h resource.h 
Log Message:
Quickreplace component added for MetaGME paradigm. Allows any number of selected objects (along with its proxies) to be transformed into other stereotyped elements. Meanwhile certain, important and feasible relations preserved/restored.
It requires elements to be selected on the view.


CVS User: Zoltan Molnar, ISIS (zolmol)

--- NEW FILE: RawComponent.h ---
#ifndef RAWCOMPONENT_H
#define RAWCOMPONENT_H


// Declaration of the main RAW COM component interface class


#ifdef BUILDER_OBJECT_NETWORK
#error   This file should only be included in the RAW COM configurations
#endif



class RawComponent {
////////////////////
// Insert your application specific member and method definitions here
public:
	RawComponent() { ; }
private:
	
	
// Try not to modify the code below this line
////////////////////
public:	
#ifdef GME_ADDON
	CComPtr<IMgaProject> project;  // this is set before Initialize() is called
	CComPtr<IMgaAddOn> addon;      // this is set before Initialize() is called
#endif
	bool interactive;
	
	STDMETHODIMP Initialize(struct IMgaProject *);
	STDMETHODIMP Invoke(IMgaProject* gme, IMgaFCOs *models, long param);
	STDMETHODIMP InvokeEx( IMgaProject *project,  IMgaFCO *currentobj,  IMgaFCOs *selectedobjs,  long param);
	STDMETHODIMP ObjectsInvokeEx( IMgaProject *project,  IMgaObject *currentobj,  IMgaObjects *selectedobjs,  long param);
	STDMETHODIMP get_ComponentParameter(BSTR name, VARIANT *pVal);
	STDMETHODIMP put_ComponentParameter(BSTR name, VARIANT newVal);

#ifdef GME_ADDON
	STDMETHODIMP GlobalEvent(globalevent_enum event);
	STDMETHODIMP ObjectEvent(IMgaObject * obj, unsigned long eventmask, VARIANT v);
#endif
};


#endif //RAWCOMPONENT_H
--- NEW FILE: copier.cpp ---
#include "stdafx.h"
#include ".\Copier.h"
#include "NullExc.h"
#include "RelationInfo.h"

Copier::Copier( CComPtr<IMgaFCO> p_oldFco, CComPtr<IMgaFCO> p_newFco)
	: m_oldFco( p_oldFco)
	, m_newFco( p_newFco)
{

}

Copier::~Copier(void)
{
}

//static
bool Copier::COMEQUAL( CComPtr<IMgaFCO> p1, CComPtr<IMgaFCO> p2)
{
	CComPtr<IUnknown> u1( p1);
	CComPtr<IUnknown> u2( p2);
	return u1 == u2;
}
//static 
void Copier::name( CComPtr<IMgaFCO> p_oldFco, CComPtr<IMgaFCO> p_newFco)
{
	CComBSTR nm;
	COMTHROW( p_oldFco->get_Name( &nm));
	COMTHROW( p_newFco->put_Name( nm));
}

//static
void Copier::traverseRegNds( CComPtr<IMgaRegNodes>& p_rnds, CComPtr<IMgaFCO>& p_newFco)
{
	long c = 0;
	if( p_rnds) COMTHROW( p_rnds->get_Count( &c));
	for( long i = 1; i <= c; ++i)
	{
		CComPtr<IMgaRegNode> rnd;
		COMTHROW( p_rnds->get_Item( i, &rnd));
		if( !rnd)
			continue;

		CComBSTR path;
		COMTHROW( rnd->get_Path( &path));

		CComBSTR valu;
		COMTHROW( rnd->get_Value( &valu));
		
		long stat; // 0: here, -1: in meta, >=1: inherited
		COMTHROW( rnd->get_Status( &stat));

		if( stat == 0)
			COMTHROW( p_newFco->put_RegistryValue( path, valu));

		CComPtr<IMgaRegNodes> sub_nodes;
		COMTHROW( rnd->get_SubNodes( VARIANT_FALSE, &sub_nodes));

		Copier::traverseRegNds( sub_nodes, p_newFco);
	}
}

//static 
void Copier::regNodes( CComPtr<IMgaFCO> p_oldFco, CComPtr<IMgaFCO> p_newFco)
{
	CComPtr<IMgaRegNodes> rnds;
	p_oldFco->get_Registry( VARIANT_FALSE, &rnds);
	Copier::traverseRegNds( rnds, p_newFco);
}


//static 
void Copier::attribs( CComPtr<IMgaFCO> p_oldFco, CComPtr<IMgaFCO> p_newFco)
{
	CComPtr<IMgaAttributes> attrs;
	COMTHROW( p_oldFco->get_Attributes( &attrs));

	long c = 0;
	if( attrs) COMTHROW( attrs->get_Count( &c));
	for( long i = 1; i <= c; ++i)
	{
		CComPtr<IMgaAttribute> atr;
		COMTHROW( attrs->get_Item( i, &atr));
		if( !atr)
			continue;

		long stat; // 0: here, -1: in meta, >=1: inherited, -2: undefined
		COMTHROW( atr->get_Status( &stat));

		if( stat == 0)
		{
			CComVariant var;
			COMTHROW( atr->get_Value( &var));

			CComPtr<IMgaMetaAttribute> mattr;
			COMTHROW( atr->get_Meta( &mattr));
			
			metaref_type mattr_mref;
			COMTHROW( mattr->get_MetaRef( &mattr_mref));

			CComPtr<IMgaAttribute> peer_attr;
			try // find the counterpart of this attribute owned by p_newFco
			{
				CComPtr<IMgaMetaFCO> newfco_meta;
				COMTHROW( p_newFco->get_Meta( &newfco_meta));
				
				// find out if newfco has an attribute identified by mattr_mref
				CComPtr<IMgaMetaAttribute> new_fco_mattr;
				if( SUCCEEDED( newfco_meta->get_AttributeByRef( mattr_mref, &new_fco_mattr)))
				{
					COMTHROW( p_newFco->get_Attribute( mattr, &peer_attr));
					COMTHROW( peer_attr->put_Value( var));
				}
			}catch( ...)//hresult_exception)
			{
				int k = 0;
				++k;
			}
		}
	}

}

void Copier::copyInnerProperties( CComPtr<IMgaFCO> p_anOldFco, CComPtr<IMgaFCO> p_aNewFco)
{
	// name
	Copier::name( p_anOldFco, p_aNewFco);

	// registry
	Copier::regNodes( p_anOldFco, p_aNewFco);

	// attribute values
	Copier::attribs( p_anOldFco, p_aNewFco);
}

void Copier::task( RelationInfo* p_rels, int p_sz)
{
	CComPtr<IMgaConnPoints> cps;
	COMTHROW( m_oldFco->get_PartOfConns( &cps));
	long c = 0;
	if( cps)
		COMTHROW( cps->get_Count( &c));

	for( long i = 1; i <= c; ++i)
	{
		CComPtr<IMgaConnPoint> cp;
		COMTHROW( cps->get_Item( i, &cp));

		CComPtr<IMgaConnection> conn;
		COMTHROW( cp->get_Owner( &conn));

		CComPtr<IMgaModel> parent;
		COMTHROW( conn->get_ParentModel( &parent));

		if( !parent) 
			throw NullExc( "Null model parent found in Copier::task()");

		CComPtr<IMgaMetaRole> mr;
		COMTHROW( conn->get_MetaRole( &mr));

		CComBSTR conn_kind;
		COMTHROW( mr->get_Name( &conn_kind));

		int found_index = -1;
		for( int j = 0; found_index == -1 && j < p_sz; ++j)
		{
			if( p_rels[j].getRelName() == conn_kind)
				found_index = j;
		}
		
		if( found_index >= 0 && found_index < p_sz) // to be copied
		{
			CComQIPtr<IMgaSimpleConnection> sc( conn);
			if( sc)
			{
				CComPtr<IMgaFCO> newconn;
				CComPtr<IMgaFCO> src, dst;
				sc->get_Src( &src);
				sc->get_Dst( &dst);

				if( COMEQUAL( src, m_oldFco))
				{
					// if connection ran from m_oldFCO and dst
					// then new conn will run from m_newFCO and dst
					
					// certain limitations apply: if Containments were drawn
					// from Models to Fco, and the Model is replaced by an
					// Atom, then the same connection can'be be redrawn again
					// this will be finetuned by the p_canBeSrc
					if( p_rels[ found_index].mayBeSrc())
					{
						COMTHROW( parent->CreateSimpleConn( mr, m_newFco, dst, 0, 0, &newconn));
						if( !newconn)
							throw NullExc( "Could not create connection type in Copier::task()");
					}
				}
				else if( COMEQUAL( dst, m_oldFco))
				{
					// the opposite
					if( p_rels[ found_index].mayBeDst())
					{
						COMTHROW( parent->CreateSimpleConn( mr, src, m_newFco, 0, 0, &newconn));
						if( !newconn)
							throw NullExc( "Could not create connection type in Copier::task()");
					}
				}
				else 
					throw NullExc( "Invalid connection type found in Copier::task()");

				if( newconn)
					copyInnerProperties( CComPtr<IMgaFCO>( conn), newconn);
			}
			else
			{
				int k = 0;
				++k;
				throw NullExc( "Undesired kind of connection in Copier::task()");
			}
		}
	}
}

void Copier::relations()
{
	// AssociationClass = no other class can be than Connection
	// HasAspect        = no other class can be than Model

	RelationInfo rels[] = { 
		  RelationInfo( "SourceToConnector")
		, RelationInfo( "ConnectorToDestination")
		, RelationInfo( "Containment",       true,  false) // runs from Element to Container => any fco can't be a Destination
		, RelationInfo( "SetMembership",     true,  false) // runs form Element to Set       => any fco can't be a Destination
		, RelationInfo( "ReferTo",           false, true ) // runs from Reference to Target  => any fco can't be a Source
		, RelationInfo( "HasAttribute")
		, RelationInfo( "HasConstraint")
		, RelationInfo( "BaseInheritance")
		, RelationInfo( "DerivedInheritance")
		, RelationInfo( "BaseImpInheritance")
		, RelationInfo( "BaseIntInheritance")
		, RelationInfo( "DerivedImpInheritance")
		, RelationInfo( "DerivedIntInheritance")
		, RelationInfo( "EquivLeft")
		, RelationInfo( "EquivRight")
	};

	task( rels, 15); // sizeof( rels)/sizeof( RelationInfo)
}

void Copier::aspMemberships()
{
	CComPtr<IMgaFCOs> aspects;
	COMTHROW( m_oldFco->get_MemberOfSets( &aspects));
	long c = 0;
	COMTHROW( aspects->get_Count( &c));
	for( long i = 1; i <= c; ++i)
	{
		CComPtr<IMgaFCO> aspect;
		COMTHROW( aspects->get_Item( i, &aspect));
		if( !aspect)
			throw NullExc( "Null aspect fco in collection at Copier::aspMemberships()");

		CComQIPtr<IMgaSet> aspect_as_set( aspect);
		if( !aspect_as_set)
			throw NullExc( "Null aspect set in collection at Copier::aspMemberships()");

		// preserve membership status of m_oldFco, by setting as member the m_newFco too
		COMTHROW( aspect_as_set->AddMember( m_newFco));
	}
}


--- NEW FILE: RawComponent.cpp ---
///////////////////////////////////////////////////////////////////////////
// RawComponent.cpp, the main RAW COM component implementation file
// This is the file (along with its header RawComponent.h)
// that the component implementor is expected to modify in the first place
//
///////////////////////////////////////////////////////////////////////////
#include "stdafx.h"

#include "ComHelp.h"
#include "GMECOM.h"
#include <ComponentConfig.h>
#include "RawComponent.h"
#include "SearchRepl.h"
#include "KindSelDlg.h"

void CopyTo(const OLECHAR *p, int olelen, char *s, int charlen)
{
	ASSERT( olelen >= -1 && charlen >= 0 );
	ASSERT( charlen == 0 || p != NULL );

	if( charlen <= 0 )
		return;

	UINT acp = GetACP();

	int len = WideCharToMultiByte(acp, 0, p, olelen, 
		s, charlen, NULL, NULL);

	// zero if failed
	ASSERT( len > 0 );

	ASSERT( len == charlen );
}

void CopyTo(const CComBSTR p, CString& res)
{
	unsigned int len = p.Length();
	if( !len) return;

	char *buff = new char[ len + 1];
	//char buff[1024];

	CopyTo( p, len, buff, len);
	int l1 = strlen( buff);
	buff[ len] = '\0';
	int l2 = strlen( buff);
	++l1;++l2;
	res = buff;
	int l3 = strlen( buff);
	++l3;
	delete [] buff;
}

// this method is called after all the generic initialization is done
// this should be empty, unless application-specific initialization is needed
STDMETHODIMP RawComponent::Initialize(struct IMgaProject *) {
	return S_OK;
}

// this is the obsolete component interface
// this present implementation either tries to call InvokeEx, or returns an error;
STDMETHODIMP RawComponent::Invoke(IMgaProject* gme, IMgaFCOs *models, long param) {
#ifdef SUPPORT_OLD_INVOKE
	CComPtr<IMgaFCO> focus;
	CComVariant parval = param;
	return InvokeEx(gme, focus, selected, parvar);
#else
	if(interactive) {
		AfxMessageBox("This component does not support the obsolete invoke mechanism");
	}
	return E_MGA_NOT_SUPPORTED;
#endif
}


// This is the main component method for interpereters and plugins. 
// May als be used in case of invokeable addons
STDMETHODIMP RawComponent::InvokeEx( IMgaProject *project,  IMgaFCO *currentobj,  
									IMgaFCOs *selectedobjs,  long param) {
	COMTRY {
	  if(interactive) {
		CComBSTR projname;
		CComBSTR focusname = "<nothing>";
		CComPtr<IMgaTerritory> terr;
		COMTHROW(project->CreateTerritory(NULL, &terr));
		COMTHROW(project->BeginTransaction(terr));
		try {
			//COMTHROW(project->get_Name(&projname));
			//if(currentobj) COMTHROW(currentobj->get_Name(&focusname));
			long c = 0;
			if( selectedobjs) COMTHROW( selectedobjs->get_Count( &c));
			if( c > 0)
			{
				SearchRepl sr( project);
				KindSelDlg d;
				//d.setup();

				for( long i = 1; i <= c; ++i)
				{
					CComPtr<IMgaFCO> i_tem;
					CComPtr<IMgaFCO> item;
					CComPtr<IMgaFCO> jtem;
					COMTHROW( selectedobjs->get_Item( i, &i_tem));
					if( i_tem)
					{
						COMTHROW( terr->OpenFCO( i_tem, &item));

						long stat;
						COMTHROW( item->get_Status( &stat));
						// if two elements from the same equiv class were included in the initial selection
						// no need to execute the search and repl on them
						if( stat != OBJECT_EXISTS)
							continue; 

						CComQIPtr<IMgaReference> rf_item( item);
						if( rf_item)
						{
							// never invoke SRepl with a proxy, use the real class instead
							COMTHROW( rf_item->get_Referred( &jtem));
						}
						else jtem = item;

						if( sr.qualifies( jtem))
						{
							if( d.shouldApplyForAll())
							{
								sr.exec( jtem, (LPCTSTR) d.selection());
							}
							else
							{
								// the object name
								CComBSTR nm;
								COMTHROW( jtem->get_Name( &nm));
								CString nms;
								CopyTo( nm, nms);
								
								// the current kind
								CComPtr<IMgaMetaRole> mr;
								COMTHROW( jtem->get_MetaRole( &mr));
								CComBSTR mrn;
								COMTHROW( mr->get_Name( &mrn));
								CString mrns;
								CopyTo( mrn, mrns);
								
								d.init( nms, mrns);

								if( IDOK == d.DoModal() && d.selection() != mrns) // something has to be done
									sr.exec( jtem, (LPCTSTR) d.selection()); 
								else if( d.shouldFinish())
									break;
							}
						}
					}
				}
			}
			COMTHROW(project->CommitTransaction());
		}	catch(...) { project->AbortTransaction(); throw; }
		
	  } 
	} COMCATCH(;);
}

// GME currently does not use this function
// you only need to implement it if other invokation mechanisms are used
STDMETHODIMP RawComponent::ObjectsInvokeEx( IMgaProject *project,  IMgaObject *currentobj,  IMgaObjects *selectedobjs,  long param) {
	if(interactive) {
		AfxMessageBox("Tho ObjectsInvoke method is not implemented");
	}
	return E_MGA_NOT_SUPPORTED;
}


// implement application specific parameter-mechanism in these functions:
STDMETHODIMP RawComponent::get_ComponentParameter(BSTR name, VARIANT *pVal) {
	return S_OK;
}

STDMETHODIMP RawComponent::put_ComponentParameter(BSTR name, VARIANT newVal) {
	return S_OK;
}


#ifdef GME_ADDON

// these two functions are the main 
STDMETHODIMP RawComponent::GlobalEvent(globalevent_enum event) { 
	if(event == GLOBALEVENT_UNDO) {
		AfxMessageBox("UNDO!!");
	}
	return S_OK; 
}

STDMETHODIMP RawComponent::ObjectEvent(IMgaObject * obj, unsigned long eventmask, VARIANT v) {
	if(eventmask & OBJEVENT_CREATED) {
		CComBSTR objID;
		COMTHROW(obj->get_ID(&objID));
		AfxMessageBox( "Object created! ObjID: " + CString(objID)); 
	}		
	return S_OK;
}

#endif

--- NEW FILE: compicon.ico ---
(This appears to be a binary file; contents omitted.)

--- NEW FILE: nullexc.h ---
#pragma once
#include <string>

class NullExc
{
	std::string            m_descr;
public:
	std::string            getDescr()             { return m_descr; }

	NullExc( void);
	NullExc( const std::string& p_msg);
	~NullExc(void);
};

--- NEW FILE: RelationInfo.cpp ---
#include "stdafx.h"
#include ".\relationinfo.h"

RelationInfo::RelationInfo( CComBSTR p_relName, bool p_allowedAsSrc /*= true*/, bool p_allowedAsDst /*= true*/)
	: m_relName( p_relName)
	, m_allowedAsSrc( p_allowedAsSrc)
	, m_allowedAsDst( p_allowedAsDst)
{
}

RelationInfo::~RelationInfo(void)
{
}

--- NEW FILE: kindseldlg.h ---
#pragma once
#include "afxwin.h"
#include "resource.h"


// KindSelDlg dialog

class KindSelDlg : public CDialog
{
	DECLARE_DYNAMIC(KindSelDlg)

public:
	KindSelDlg(CWnd* pParent = NULL);   // standard constructor
	virtual ~KindSelDlg();

// Dialog Data
	enum { IDD = IDD_DIALOG1 };

protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	virtual BOOL OnInitDialog();
	DECLARE_MESSAGE_MAP()

	bool         m_ranOnceAlready;	
	bool         m_applyAllSelected;
	bool         m_breakOnCancelSelected;
	int          m_selection;
	CString      m_resKindName;
	CString      m_currElemName;
	CString      m_oldKindName;

	CButton      m_quitOnCancel;
	CButton      m_applyForAll;
	CEdit        m_curElem;
	CEdit        m_oldKind;
	CListBox     m_knds;

public:
	bool shouldApplyForAll();
	bool shouldFinish();
	bool init( CString p_name, CString p_oldKind);
	bool setup();
	CString  selection();
protected:
	virtual void OnOK();
	virtual void OnCancel();
public:
	afx_msg void OnLbnDblclkList1();
};

--- NEW FILE: Component.rc ---
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"

#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"

/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS

/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources

#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32

#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//

1 TEXTINCLUDE 
BEGIN
    "resource.h\0"
END

2 TEXTINCLUDE 
BEGIN
    "#include ""afxres.h""\r\n"
    "\0"
END

3 TEXTINCLUDE 
BEGIN
    "1 TYPELIB ""ComponentLib.tlb""\r\n"
    "\0"
END

#endif    // APSTUDIO_INVOKED


/////////////////////////////////////////////////////////////////////////////
//
// Version
//

VS_VERSION_INFO VERSIONINFO
 FILEVERSION 1,0,0,1
 PRODUCTVERSION 1,0,0,1
 FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
 FILEFLAGS 0x1L
#else
 FILEFLAGS 0x0L
#endif
 FILEOS 0x4L
 FILETYPE 0x2L
 FILESUBTYPE 0x0L
BEGIN
    BLOCK "StringFileInfo"
    BEGIN
        BLOCK "040904B0"
        BEGIN
            VALUE "FileDescription", "Interpreter Module"
            VALUE "FileVersion", "1, 0, 0, 1"
            VALUE "InternalName", "Interpreter"
            VALUE "LegalCopyright", "Copyright 2000"
            VALUE "OriginalFilename", "Interpreter.DLL"
            VALUE "ProductName", "Interpreter Module"
            VALUE "ProductVersion", "1, 0, 0, 1"
        END
    END
    BLOCK "VarFileInfo"
    BEGIN
        VALUE "Translation", 0x409, 1200
    END
END


/////////////////////////////////////////////////////////////////////////////
//
// Icon
//

// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_COMPICON            ICON                    "compicon.ico"

/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//

IDD_DIALOG1 DIALOGEX 0, 0, 186, 142
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | 
    WS_SYSMENU
CAPTION "Select a new stereotype for object"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
    DEFPUSHBUTTON   "OK",IDOK,119,7,60,14
    PUSHBUTTON      "Cancel",IDCANCEL,119,25,60,14
    LISTBOX         IDC_LIST1,7,64,102,71,LBS_USETABSTOPS | 
                    LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
    CONTROL         "Break on Cancel",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | 
                    WS_TABSTOP,114,105,65,10
    LTEXT           "To be transformed into:",IDC_STATIC,7,54,100,8
    EDITTEXT        IDC_EDIT1,7,7,102,12,ES_AUTOHSCROLL | ES_READONLY | 
                    WS_DISABLED
    CONTROL         "Apply for All",IDC_CHECK2,"Button",BS_AUTOCHECKBOX | 
                    WS_TABSTOP,114,119,55,10
    LTEXT           "Currently is an:",IDC_STATIC,7,23,100,8
    EDITTEXT        IDC_EDIT2,7,33,102,14,ES_AUTOHSCROLL | ES_READONLY | 
                    WS_DISABLED
END


/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//

#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO 
BEGIN
    IDD_DIALOG1, DIALOG
    BEGIN
        LEFTMARGIN, 7
        RIGHTMARGIN, 179
        TOPMARGIN, 7
        BOTTOMMARGIN, 135
    END
END
#endif    // APSTUDIO_INVOKED


/////////////////////////////////////////////////////////////////////////////
//
// String Table
//

STRINGTABLE 
BEGIN
    IDS_PROJNAME            "Component"
END

#endif    // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////



#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
1 TYPELIB "ComponentLib.tlb"

/////////////////////////////////////////////////////////////////////////////
#endif    // not APSTUDIO_INVOKED


--- NEW FILE: SearchRepl.h ---
#pragma once
//#include "ComHelp.h"
#include "GMECOM.h"

class SearchRepl
{
	CComPtr<IMgaProject>      m_pr;

	// methods
	void findMetaRole( CComBSTR p_kind, CComPtr<IMgaMetaRole>& p_res1, CComPtr<IMgaMetaRole>& p_res2);

	void collect           ( CComPtr<IMgaFCO>    p_elem,         CComPtr<IMgaFCOs>& p_eqClass);
	void createSiblings    ( IMgaFCOs*           p_eqClass,      CComPtr<IMgaMetaRole> mrole_fco, CComPtr<IMgaMetaRole> mrole_prx);
	void copy              ( CComPtr<IMgaFCO>    p_old,          CComPtr<IMgaFCO> p_new);
	void remove            ( CComPtr<IMgaFCOs>&  p_eqClass);


public:
	SearchRepl( IMgaProject* pr);
	~SearchRepl(void);

	bool qualifies( IMgaFCO* el);
	void exec( IMgaFCO* el, CComBSTR newKind);
};

--- NEW FILE: SearchRepl.cpp ---
#include "stdafx.h"
#include ".\searchrepl.h"
#include "NullExc.h"
#include "Copier.h"

SearchRepl::SearchRepl( IMgaProject* pr)
	: m_pr( pr)
{
}

SearchRepl::~SearchRepl(void)
{
	m_pr.Release();
}

void SearchRepl::findMetaRole( CComBSTR p_kind, CComPtr<IMgaMetaRole>& p_res1, CComPtr<IMgaMetaRole>& p_res2)
{
	if( !m_pr)
		return;

	CComPtr<IMgaMetaProject> metaproj;
	COMTHROW( m_pr->get_RootMeta( &metaproj));

	if( !metaproj)
		return;

	CComPtr<IMgaMetaFolder> metaroot;
	COMTHROW( metaproj->get_RootFolder( &metaroot));

	if( !metaroot)
		return;

	CComPtr<IMgaMetaFCO> mfco;
	COMTHROW( metaroot->get_LegalRootObjectByName( CComBSTR( "ParadigmSheet"), &mfco));

	if( !mfco)
		return;

	CComPtr<IMgaMetaModel> mmod;
	//mmod.QueryInterface( &mfco);
	mfco.QueryInterface( &mmod);

	if( !mmod)
		return;

	COMTHROW( mmod->get_RoleByName( p_kind, &p_res1));

	p_kind.Append( "Proxy");

	COMTHROW( mmod->get_RoleByName( p_kind, &p_res2));
}

//void SearchRepl::collect( CComPtr<IMgaFCO> p_elem, IMgaFCOs* *p_ptrEqClass)
void SearchRepl::collect( CComPtr<IMgaFCO>    p_elem, CComPtr<IMgaFCOs>& p_eqClass)
{
	if( !p_elem) return;

	// derived elements are not handled
	CComPtr<IMgaFCO> from;
	COMTHROW( p_elem->get_DerivedFrom( &from));
	if( from) 
		return;

	COMTHROW( p_elem->get_ReferencedBy( &p_eqClass));
	
	COMTHROW( p_eqClass->Insert( p_elem, 1)); // in the front
}

void SearchRepl::createSiblings( IMgaFCOs* p_eqClass, CComPtr<IMgaMetaRole> mrole_fco, CComPtr<IMgaMetaRole> mrole_prx)
{
	//CComPtr<IMgaFCOs> counterparts;
	//counterparts.CoCreateInstance( L"Mga.MgaFCOs");
	CComPtr<IMgaFCO> new_class_resp; // the counterpart proxies will be directed towards this
	long c = 0;
	if( p_eqClass) COMTHROW( p_eqClass->get_Count( &c));
	for( long i = 1; i <= c; ++i)
	{
		CComPtr<IMgaFCO> el;
		COMTHROW( p_eqClass->get_Item( i, &el));
		if( !el)
			throw NullExc( "Null ptr in createSiblings");

		
		CComPtr<IMgaFCO> newel;
		CComPtr<IMgaModel> mod;

		COMTHROW( el->get_ParentModel( &mod));
		if( !mod)
			throw NullExc( "Null model parent found in createSiblings");

		CComQIPtr<IMgaReference> el_ref( el);
		if( el_ref) // old el is a proxy, new el will also be a proxy
		{
			COMTHROW( mod->CreateChildObject( mrole_prx, &newel));
			if( new_class_resp)
			{
				CComQIPtr<IMgaReference> newref( newel);
				if( newref) // set these proxies to point to the new class rep
					COMTHROW( newref->put_Referred( new_class_resp));
			}
		}
		else // old el is an elem, new el will also be an elem
		{
			COMTHROW( mod->CreateChildObject( mrole_fco, &newel));
			if( i == 1) // store the first elem
				new_class_resp = newel;
		}

		if( newel)
		{
			copy( el, newel);
			//COMTHROW( counterparts)->Append( newel));
		}
	}
}

void SearchRepl::copy( CComPtr<IMgaFCO> p_old, CComPtr<IMgaFCO> p_new)
{
	// specific relations can't be copied: like RefersTo or SetMembers or Containment, HasAspect
	// which originate from p_old
	// those relations which -in contrast- end up at p_old: Cointained, ReferredBy, PartOfSet
	// PartOfAspect, can be copied
	// HasAttribute, HasConstraint also can be copied

	Copier::name(     p_old, p_new);
	Copier::attribs(  p_old, p_new);
	Copier::regNodes( p_old, p_new);

	Copier cp( p_old, p_new);
	cp.relations();
	cp.aspMemberships();
}

void SearchRepl::remove( CComPtr<IMgaFCOs>& p_eqClass)
{
	long c = 0;
	if( p_eqClass) COMTHROW( p_eqClass->get_Count( &c));
	for( long i = 1; i <= c; ++i)
	{
		CComPtr<IMgaFCO> el;
		COMTHROW( p_eqClass->get_Item( i, &el));
		if( !el)
			throw NullExc( "Null ptr in remove()");

		COMTHROW( el->DestroyObject());
	}
}

void SearchRepl::exec( IMgaFCO* el, CComBSTR newKind)
{
	CComPtr<IMgaFCOs> eqclass;
	
	try
	{
		CComPtr<IMgaMetaRole> metarole_fco;
		CComPtr<IMgaMetaRole> metarole_prx;
		findMetaRole( newKind, metarole_fco, metarole_prx);
		if( !metarole_fco || !metarole_prx)
			throw NullExc( "Could not find metarole");

		collect( el, eqclass);
		createSiblings( eqclass, metarole_fco, metarole_prx);
		remove( eqclass);
		eqclass.Release();
	}
	catch( NullExc& e)
	{
		std::string msg = e.getDescr();
	}
	catch( ...)//hresult_exception& )
	{
		eqclass.Release();
		int k = 9;
		++k;
	}
}

bool SearchRepl::qualifies( IMgaFCO* el)
{
	if( !el) return false;
	CComPtr<IMgaMetaFCO> meta;
	COMTHROW( el->get_Meta( &meta));

	objtype_enum typ;
	COMTHROW( el->get_ObjType( &typ));

	CComBSTR kind;
	COMTHROW( meta->get_Name( &kind));

	// paradigmsheets, connections, or aspects will not be altered (folders neither, but they are not an IMgaFCO)
	if( typ == OBJTYPE_CONNECTION || typ == OBJTYPE_SET || typ == OBJTYPE_MODEL)
		return false;

	// the following atoms or references may
	if( kind == "Atom" || kind == "Reference" || kind == "Model" || kind == "Set" || kind == "Connection" || kind == "FCO" || kind == "Folder"
	 || kind == "AtomProxy" || kind == "ReferenceProxy" || kind == "ModelProxy" || kind == "SetProxy" || kind == "ConnectionProxy" || kind == "FCOProxy" || kind == "FolderProxy")
		return true;

	return false;
}

--- NEW FILE: kindseldlg.cpp ---
// KindSelDlg.cpp : implementation file
//

#include "stdafx.h"
#include "KindSelDlg.h"


// KindSelDlg dialog

IMPLEMENT_DYNAMIC(KindSelDlg, CDialog)
KindSelDlg::KindSelDlg(CWnd* pParent /*=NULL*/)
	: CDialog(KindSelDlg::IDD, pParent)
	, m_ranOnceAlready( false)
	, m_applyAllSelected( false)
	, m_breakOnCancelSelected( false)
	, m_selection( -1)
{
}

KindSelDlg::~KindSelDlg()
{
}

void KindSelDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	DDX_Control(pDX, IDC_LIST1,  m_knds);
	DDX_Control(pDX, IDC_CHECK1, m_quitOnCancel);
	DDX_Control(pDX, IDC_CHECK2, m_applyForAll);
	DDX_Control(pDX, IDC_EDIT1,  m_curElem);
	DDX_Control(pDX, IDC_EDIT2,  m_oldKind);
}


BEGIN_MESSAGE_MAP(KindSelDlg, CDialog)
	ON_LBN_DBLCLK(IDC_LIST1, OnLbnDblclkList1)
END_MESSAGE_MAP()


// KindSelDlg message handlers
bool KindSelDlg::shouldApplyForAll()
{
	return m_ranOnceAlready && m_applyAllSelected;
}

bool KindSelDlg::shouldFinish()
{
	return m_ranOnceAlready && m_breakOnCancelSelected;
}

bool KindSelDlg::init( CString p_nms, CString p_oldKind)
{
	m_currElemName = p_nms;
	m_oldKindName  = p_oldKind;
	return true;
}

bool KindSelDlg::setup()
{
	m_knds.AddString( "Atom");
	m_knds.AddString( "Reference");
	m_knds.AddString( "Set");
	m_knds.AddString( "Model");
	m_knds.AddString( "Connection");
	m_knds.AddString( "FCO");

	m_curElem.SetWindowText( m_currElemName);
	m_knds.SetCurSel( -1);

	m_oldKind.SetWindowText( "<<" + m_oldKindName + ">>");

	return true;
}

CString KindSelDlg::selection()
{
	return m_resKindName;
}

BOOL KindSelDlg::OnInitDialog()
{
	BOOL ret = CDialog::OnInitDialog();
	m_ranOnceAlready = true;
	setup();

	return TRUE;
}

void KindSelDlg::OnOK()
{
	m_applyAllSelected      = m_applyForAll.GetCheck()  == BST_CHECKED;
	m_breakOnCancelSelected = m_quitOnCancel.GetCheck() == BST_CHECKED;
	m_selection             = m_knds.GetCurSel();

	switch( m_selection)
	{
		case 0: m_resKindName = "Atom";          break;
		case 1: m_resKindName = "Reference";     break;
		case 2: m_resKindName = "Set";           break;
		case 3: m_resKindName = "Model";         break;
		case 4: m_resKindName = "Connection";    break;
		case 5: m_resKindName = "FCO";           break;
		default: 
			m_oldKind.GetWindowText( m_resKindName);
			break;
	}

	CDialog::OnOK();
}

void KindSelDlg::OnCancel()
{
	m_applyAllSelected      = m_applyForAll.GetCheck()  == BST_CHECKED;
	m_breakOnCancelSelected = m_quitOnCancel.GetCheck() == BST_CHECKED;
	m_selection             = -1;

	CDialog::OnCancel();
}

void KindSelDlg::OnLbnDblclkList1()
{
	OnOK();
}

--- NEW FILE: ComponentConfig.h ---
// Component configuration file automatically generated as ComponentConfig.h
// by ConfigureComponent on Mon May 28 11:19:50 2007


#define RAWCOMPONENT

// COM UUID-s, names and progID

#define TYPELIB_UUID "0BBD41BA-47C3-4C51-9E46-E881D94C2E5E"
#define TYPELIB_NAME "MGA Interpreter TypeLibrary (QuRep)"
#define COCLASS_UUID "048FE746-F389-44C0-894F-9D3BAD0A034C"
#define COCLASS_NAME "MGA Interpreter CoClass (QuRep)"
#define COCLASS_PROGID "MGA.Interpreter.QuRep"


// This name will appear in the popup window for interpreter selection.
#define COMPONENT_NAME "QuRep"


// This text will appear in the toolbar icon tooltip and in the menu.
#define TOOLTIP_TEXT "QuickReplace Interpreter"


// This #define determines the interpreter type:
#define GME_INTERPRETER
// The name of the paradigm(s). The GME will use this component
// for this paradigm. Separate the names of paradigms by commas.
#define PARADIGMS "MetaGME"


// This is the location of the GME interfaces file (Mga.idl, Meta.idl, etc)
#define GME_BASE ../../../GME


// not defined: 
#define BON_ICON_SUPPORT

// not defined: #define BON_CUSTOM_TRANSACTIONS

// not defined: #define REGISTER_SYSTEMWIDE

// Just to please the whims of those Microsoft jerks:
#define COCLASS_UUID_EXPLODED1 0x048FE746
#define COCLASS_UUID_EXPLODED2  0xF389
#define COCLASS_UUID_EXPLODED3  0x44C0
#define COCLASS_UUID_EXPLODED4  0x89
#define COCLASS_UUID_EXPLODED5  0x4F
#define COCLASS_UUID_EXPLODED6  0x9D
#define COCLASS_UUID_EXPLODED7  0x3B
#define COCLASS_UUID_EXPLODED8  0xAD
#define COCLASS_UUID_EXPLODED9  0x0A
#define COCLASS_UUID_EXPLODED10  0x03
#define COCLASS_UUID_EXPLODED11  0x4C

--- NEW FILE: copier.h ---
#pragma once
#include "RelationInfo.h"
#include "GMECOM.h"

class Copier
{
	CComPtr<IMgaFCO>       m_oldFco;
	CComPtr<IMgaFCO>       m_newFco;

	// methods
	bool COMEQUAL( CComPtr<IMgaFCO> p1, CComPtr<IMgaFCO> p2);
	void task( RelationInfo* p_rels, int p_sz);
	void copyInnerProperties( CComPtr<IMgaFCO> p_anOldFco, CComPtr<IMgaFCO> p_aNewFco);

public:
	Copier( CComPtr<IMgaFCO> p_oldFco, CComPtr<IMgaFCO> p_newFco);
	~Copier(void);

	void relations();
	void aspMemberships();

	static void name          ( CComPtr<IMgaFCO> p_oldFco, CComPtr<IMgaFCO> p_newFco);
	static void regNodes      ( CComPtr<IMgaFCO> p_oldFco, CComPtr<IMgaFCO> p_newFco);
	static void attribs       ( CComPtr<IMgaFCO> p_oldFco, CComPtr<IMgaFCO> p_newFco);

	static void traverseRegNds( CComPtr<IMgaRegNodes>& p_rnds, CComPtr<IMgaFCO>& p_newFco);
};

--- NEW FILE: RelationInfo.h ---
#pragma once
#include <atlbase.h>

class RelationInfo
{
	CComBSTR          m_relName;
	bool              m_allowedAsSrc;
	bool              m_allowedAsDst;
public:
	CComBSTR          getRelName()  { return m_relName; };
	bool              mayBeSrc()    { return m_allowedAsSrc; };
	bool              mayBeDst()    { return m_allowedAsDst; };

	RelationInfo( CComBSTR p_relName, bool p_allowedAsSrc = true, bool p_allowedAsDst = true);
	~RelationInfo(void);
};

--- NEW FILE: StdAfx.h ---
// stdafx.h : include file for standard system include files,
//      or project specific include files that are used frequently,
//      but are changed infrequently

#if !defined(AFX_STDAFX_H__C4EFDDFC_C095_4509_B571_632F0986D162__INCLUDED_)
#define AFX_STDAFX_H__C4EFDDFC_C095_4509_B571_632F0986D162__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#define STRICT
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0400
#endif
#define _ATL_APARTMENT_THREADED

#include <afxwin.h>
#include <afxdisp.h>

#include <atlbase.h>
//You may derive a class from CComModule and use it if you want to override
//something, but do not change the name of _Module
extern CComModule _Module;
#include <atlcom.h>

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_STDAFX_H__C4EFDDFC_C095_4509_B571_632F0986D162__INCLUDED)

--- NEW FILE: StdAfx.cpp ---
// stdafx.cpp : source file that includes just the standard includes
//  stdafx.pch will be the pre-compiled header
//  stdafx.obj will contain the pre-compiled type information

#include "stdafx.h"

#ifdef _ATL_STATIC_REGISTRY

#include <statreg.h>

#if _ATL_VER < 0x0700
#include <statreg.cpp>
#endif // _ATL_VER < 0x0700

#endif // _ATL_STATIC_REGISTRY

#if _ATL_VER < 0x0700

#include <atlimpl.cpp>

#endif // _ATL_VER < 0x0700
--- NEW FILE: component.def ---
; Interpreter.def : Declares the module parameters.

LIBRARY      "QuRepComponent.DLL"

EXPORTS
	DllCanUnloadNow     PRIVATE
	DllGetClassObject   PRIVATE
	DllRegisterServer   PRIVATE
	DllUnregisterServer	PRIVATE


--- NEW FILE: resource.h ---
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by Component.rc
//
#define IDS_PROJNAME                    100
#define IDD_DIALOG1                     201
#define IDC_LIST1                       201
#define IDC_CHECK1                      202
#define IDC_EDIT1                       203
#define IDC_CHECK2                      204
#define IDC_EDIT2                       205

// Next default values for new objects
// 
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE        202
#define _APS_NEXT_COMMAND_VALUE         32768
#define _APS_NEXT_CONTROL_VALUE         206
#define _APS_NEXT_SYMED_VALUE           101
#endif
#endif

--- NEW FILE: nullexc.cpp ---
#include "stdafx.h"
#include ".\nullexc.h"

NullExc::NullExc(void)
{
}


NullExc::NullExc( const std::string& p_msg)
	: m_descr( p_msg)
{
}

NullExc::~NullExc(void)
{
}

--- NEW FILE: QuRepComponent.vcproj ---
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
	ProjectType="Visual C++"
	Version="7.10"
	Name="QuRep"
	ProjectGUID="{C27B35CF-08FE-4B91-9EB4-78A8583A23D4}"
	SccProjectName=""
	SccLocalPath=""
	Keyword="AtlProj">
	<Platforms>
		<Platform
			Name="Win32"/>
	</Platforms>
	<Configurations>
		<Configuration
			Name="Debug|Win32"
			OutputDirectory=".\Debug"
			IntermediateDirectory=".\Debug"
			ConfigurationType="2"
			UseOfMFC="2"
			ATLMinimizesCRunTimeLibraryUsage="FALSE"
			CharacterSet="2">
			<Tool
				Name="VCCLCompilerTool"
				Optimization="0"
				AdditionalIncludeDirectories="./,C:/Program Files/GME/sdk/BON/"
				PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;_USRDLL"
				BasicRuntimeChecks="3"
				RuntimeLibrary="3"
				UsePrecompiledHeader="3"
				PrecompiledHeaderThrough="stdafx.h"
				PrecompiledHeaderFile=".\Debug/QuRepComponent.pch"
				AssemblerListingLocation=".\Debug/"
				ObjectFile=".\Debug/"
				ProgramDataBaseFileName=".\Debug/"
				BrowseInformation="1"
				WarningLevel="3"
				SuppressStartupBanner="TRUE"
				DebugInformationFormat="4"/>
			<Tool
				Name="VCCustomBuildTool"
				Description="Performing registration"
				CommandLine="regsvr32 /s /c &quot;$(TargetPath)&quot;
echo regsvr32 exec. time &gt; &quot;$(OutDir)\regsvr32.trg&quot;
"
				Outputs="$(OutDir)\regsvr32.trg"/>
			<Tool
				Name="VCLinkerTool"
				OutputFile=".\Debug/QuRepComponent.dll"
				LinkIncremental="1"
				SuppressStartupBanner="TRUE"
				ModuleDefinitionFile=".\Component.def"
				GenerateDebugInformation="TRUE"
				ProgramDatabaseFile=".\Debug/QuRepComponent.pdb"
				SubSystem="2"
				ImportLibrary=".\Debug/QuRepComponent.lib"
				TargetMachine="1"/>
			<Tool
				Name="VCMIDLTool"
				TypeLibraryName=".\Debug/QuRepComponent.tlb"
				HeaderFileName=""/>
			<Tool
				Name="VCPostBuildEventTool"/>
			<Tool
				Name="VCPreBuildEventTool"/>
			<Tool
				Name="VCPreLinkEventTool"/>
			<Tool
				Name="VCResourceCompilerTool"
				PreprocessorDefinitions="_DEBUG"
				Culture="1033"/>
			<Tool
				Name="VCWebServiceProxyGeneratorTool"/>
			<Tool
				Name="VCXMLDataGeneratorTool"/>
			<Tool
				Name="VCWebDeploymentTool"/>
			<Tool
				Name="VCManagedWrapperGeneratorTool"/>
			<Tool
				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
		</Configuration>
		<Configuration
			Name="Release|Win32"
			OutputDirectory=".\Release"
			IntermediateDirectory=".\Release"
			ConfigurationType="2"
			UseOfMFC="2"
			UseOfATL="1"
			ATLMinimizesCRunTimeLibraryUsage="FALSE"
			CharacterSet="2">
			<Tool
				Name="VCCLCompilerTool"
				Optimization="1"
				InlineFunctionExpansion="1"
				AdditionalIncludeDirectories="./,C:/Program Files/GME/sdk/BON/"
				PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;_USRDLL"
				StringPooling="TRUE"
				RuntimeLibrary="2"
				EnableFunctionLevelLinking="TRUE"
				UsePrecompiledHeader="3"
				PrecompiledHeaderThrough="stdafx.h"
				PrecompiledHeaderFile=".\Release/QuRepComponent.pch"
				AssemblerListingLocation=".\Release/"
				ObjectFile=".\Release/"
				ProgramDataBaseFileName=".\Release/"
				WarningLevel="3"
				SuppressStartupBanner="TRUE"/>
			<Tool
				Name="VCCustomBuildTool"
				Description="Performing registration"
				CommandLine="regsvr32 /s /c &quot;$(TargetPath)&quot;
echo regsvr32 exec. time &gt; &quot;$(OutDir)\regsvr32.trg&quot;
"
				Outputs="$(OutDir)\regsvr32.trg"/>
			<Tool
				Name="VCLinkerTool"
				OutputFile=".\Release/QuRepComponent.dll"
				LinkIncremental="1"
				SuppressStartupBanner="TRUE"
				ModuleDefinitionFile=".\Component.def"
				ProgramDatabaseFile=".\Release/QuRepComponent.pdb"
				SubSystem="2"
				ImportLibrary=".\Release/QuRepComponent.lib"
				TargetMachine="1"/>
			<Tool
				Name="VCMIDLTool"
				TypeLibraryName=".\Release/QuRepComponent.tlb"
				HeaderFileName=""/>
			<Tool
				Name="VCPostBuildEventTool"/>
			<Tool
				Name="VCPreBuildEventTool"/>
			<Tool
				Name="VCPreLinkEventTool"/>
			<Tool
				Name="VCResourceCompilerTool"
				PreprocessorDefinitions="NDEBUG"
				Culture="1033"/>
			<Tool
				Name="VCWebServiceProxyGeneratorTool"/>
			<Tool
				Name="VCXMLDataGeneratorTool"/>
			<Tool
				Name="VCWebDeploymentTool"/>
			<Tool
				Name="VCManagedWrapperGeneratorTool"/>
			<Tool
				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
		</Configuration>
	</Configurations>
	<References>
	</References>
	<Files>
		<Filter
			Name="Source Files"
			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
			<File
				RelativePath="C:\Program Files\GME\sdk\BON\ComHelp.cpp">
				<FileConfiguration
					Name="Debug|Win32">
					<Tool
						Name="VCCLCompilerTool"
						Optimization="0"
						AdditionalIncludeDirectories=""
						PreprocessorDefinitions=""
						BasicRuntimeChecks="3"
						UsePrecompiledHeader="3"
						BrowseInformation="1"/>
				</FileConfiguration>
				<FileConfiguration
					Name="Release|Win32">
					<Tool
						Name="VCCLCompilerTool"
						Optimization="1"
						AdditionalIncludeDirectories=""
						PreprocessorDefinitions=""
						BasicRuntimeChecks="0"
						UsePrecompiledHeader="3"
						BrowseInformation="0"/>
				</FileConfiguration>
			</File>
			<File
				RelativePath="Component.def">
			</File>
			<File
				RelativePath="Component.rc">
				<FileConfiguration
					Name="Debug|Win32">
					<Tool
						Name="VCResourceCompilerTool"
						PreprocessorDefinitions=""
						AdditionalIncludeDirectories="$(OUTDIR)"/>
				</FileConfiguration>
				<FileConfiguration
					Name="Release|Win32">
					<Tool
						Name="VCResourceCompilerTool"
						PreprocessorDefinitions=""
						AdditionalIncludeDirectories="$(OUTDIR)"/>
				</FileConfiguration>
			</File>
			<File
				RelativePath="C:\Program Files\GME\sdk\BON\ComponentDll.cpp">
				<FileConfiguration
					Name="Debug|Win32">
					<Tool
						Name="VCCLCompilerTool"
						Optimization="0"
						AdditionalIncludeDirectories=""
						PreprocessorDefinitions=""
						BasicRuntimeChecks="3"
						UsePrecompiledHeader="3"
						BrowseInformation="1"/>
				</FileConfiguration>
				<FileConfiguration
					Name="Release|Win32">
					<Tool
						Name="VCCLCompilerTool"
						Optimization="1"
						AdditionalIncludeDirectories=""
						PreprocessorDefinitions=""
						BasicRuntimeChecks="0"
						UsePrecompiledHeader="3"
						BrowseInformation="0"/>
				</FileConfiguration>
			</File>
			<File
				RelativePath="C:\Program Files\GME\sdk\BON\ComponentLib.idl">
				<FileConfiguration
					Name="Debug|Win32">
					<Tool
						Name="VCMIDLTool"
						AdditionalIncludeDirectories="$(ProjectDir)"
						TypeLibraryName="$(OutDir)/ComponentLib.tlb"/>
				</FileConfiguration>
				<FileConfiguration
					Name="Release|Win32">
					<Tool
						Name="VCMIDLTool"
						AdditionalIncludeDirectories="$(ProjectDir)"
						TypeLibraryName="$(OutDir)/ComponentLib.tlb"/>
				</FileConfiguration>
			</File>
			<File
				RelativePath="C:\Program Files\GME\sdk\BON\ComponentObj.cpp">
				<FileConfiguration
					Name="Debug|Win32">
					<Tool
						Name="VCCLCompilerTool"
						Optimization="0"
						AdditionalIncludeDirectories=""
						PreprocessorDefinitions=""
						BasicRuntimeChecks="3"
						UsePrecompiledHeader="3"
						BrowseInformation="1"/>
				</FileConfiguration>
				<FileConfiguration
					Name="Release|Win32">
					<Tool
						Name="VCCLCompilerTool"
						Optimization="1"
						AdditionalIncludeDirectories=""
						PreprocessorDefinitions=""
						BasicRuntimeChecks="0"
						UsePrecompiledHeader="3"
						BrowseInformation="0"/>
				</FileConfiguration>
			</File>
			<File
				RelativePath=".\Copier.cpp">
			</File>
			<File
				RelativePath=".\KindSelDlg.cpp">
			</File>
			<File
				RelativePath=".\NullExc.cpp">
			</File>
			<File
				RelativePath="RawComponent.cpp">
				<FileConfiguration
					Name="Debug|Win32">
					<Tool
						Name="VCCLCompilerTool"
						Optimization="0"
						PreprocessorDefinitions=""
						BasicRuntimeChecks="3"
						BrowseInformation="1"/>
				</FileConfiguration>
				<FileConfiguration
					Name="Release|Win32">
					<Tool
						Name="VCCLCompilerTool"
						Optimization="1"
						PreprocessorDefinitions=""/>
				</FileConfiguration>
			</File>
			<File
				RelativePath=".\RelationInfo.cpp">
			</File>
			<File
				RelativePath=".\SearchRepl.cpp">
			</File>
			<File
				RelativePath="StdAfx.cpp">
				<FileConfiguration
					Name="Debug|Win32">
					<Tool
						Name="VCCLCompilerTool"
						Optimization="0"
						PreprocessorDefinitions=""
						BasicRuntimeChecks="3"
						UsePrecompiledHeader="1"
						BrowseInformation="1"/>
				</FileConfiguration>
				<FileConfiguration
					Name="Release|Win32">
					<Tool
						Name="VCCLCompilerTool"
						Optimization="1"
						PreprocessorDefinitions=""
						UsePrecompiledHeader="1"/>
				</FileConfiguration>
			</File>
		</Filter>
		<Filter
			Name="Header Files"
			Filter="h;hpp;hxx;hm;inl">
			<File
				RelativePath="C:\Program Files\GME\sdk\BON\ComHelp.h">
			</File>
			<File
				RelativePath="ComponentConfig.h">
			</File>
			<File
				RelativePath="C:\Program Files\GME\sdk\BON\ComponentDll.h">
			</File>
			<File
				RelativePath="C:\Program Files\GME\sdk\BON\ComponentObj.h">
			</File>
			<File
				RelativePath=".\Copier.h">
			</File>
			<File
				RelativePath="C:\Program Files\GME\sdk\BON\GMECOM.h">
			</File>
			<File
				RelativePath=".\KindSelDlg.h">
			</File>
			<File
				RelativePath=".\NullExc.h">
			</File>
			<File
				RelativePath="RawComponent.h">
			</File>
			<File
				RelativePath=".\RelationInfo.h">
			</File>
			<File
				RelativePath="Resource.h">
			</File>
			<File
				RelativePath=".\SearchRepl.h">
			</File>
			<File
				RelativePath="StdAfx.h">
			</File>
		</Filter>
		<Filter
			Name="Resource Files"
			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
			<File
				RelativePath=".\CompIcon.ico">
			</File>
		</Filter>
	</Files>
	<Globals>
		<Global
			Name="RESOURCE_FILE"
			Value="Component.rc"/>
	</Globals>
</VisualStudioProject>



More information about the GME-commit mailing list