Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Feature Requests
 Parsing Excluding List
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

netics
Senior Member

30 Posts

Posted - Apr 05 2007 :  8:37:20 PM  Show Profile  Reply with Quote

Allthough latest VAX freezed while parsing Function.h of Loki library, I don't want to use veeeery old 14XX build of VAX.

How about adding list of Excluding Parsing header/cpp list.

Also, VAX sometimes make PC so slowly almost like freezing when doing Find References of template function.

You may know 'DoNotStepInto' feature of Autoexp.dat.

As same, How about adding "Do Not parse this class/function" list??

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Apr 06 2007 :  08:45:06 AM  Show Profile  Reply with Quote
The problem with function.h should be fixed in the next build.

When we need to work around specific problems sometimes this can be done by editing VA's stdafx.h file

http://docs.wholetomato.com?W302

To produce "do not parse" it is possible to wrap the function / code in #define statements, like this:

#define VA_IGNORE_THIS_START
#define VA_IGNORE_THIS_END

VA_IGNORE_THIS_START

void problemFunction()
{
}

VA_IGNORE_THIS_END


and then add:

#define VA_IGNORE_THIS_START /*
#define VA_IGNORE_THIS_END */


to VA's stdafx.h file.

Ideally we try to fix problems with VA's parser, but this sort of solution can work well as a work around.

Do you have a simple code example for this find references problem? Using the extremely simple test:

template<typename T>
T *rememberAndReturn(T *pValue)
{
	static T *pStored;

	if(0 != pValue)
		pStored = pValue;

	return pStored;
}

static void callTemplateFn()
{
	int *pn;
	rememberAndReturn(pn);
}


I am not seeing any problems when using Find References on "rememberAndReturn"

zen is the art of being at one with the two'ness
Go to Top of Page

netics
Senior Member

30 Posts

Posted - Apr 10 2007 :  8:10:36 PM  Show Profile  Reply with Quote
when i open the file and cursor is in the template TypeContainerImpl~~~ or TypeContainer,

the IDE become freezed.


this code should be compiled with Loki.



and VA_IGNORE_THIS_START tricks don't work.







////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//	ListAfter
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
template<typename TList, typename T>
struct ListAfter
{
	typedef typename TList::Tail						NextTList;
	typedef typename ListAfter<NextTList, T>::Type		Type;
};
//--------------------------------------------------------------------------------------------------------------------------------------------------------------
template<typename T, typename Tail>
struct ListAfter< Typelist<T, Tail>, T>
{
	typedef Typelist<T, Tail>							Type;
};
//--------------------------------------------------------------------------------------------------------------------------------------------------------------
template<typename T>
struct ListAfter<NullType, T>
{
	typedef NullType									Type;
};
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//	TypeContainer
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
template< template <class> class T, typename TList >
struct TypeContainerImpl : public TypeContainerImpl<T, typename TList::Tail>
{
	typedef typename TList::Head				TemplateArgType;
	typedef typename TList::Tail				NextTList;
	typedef T<TemplateArgType>					Instance;
	typedef TypeContainerImpl<T, NextTList>		Parent;

	Instance					data;

};
//--------------------------------------------------------------------------------------------------------------------------------------------------------------
template< template <class> class T >
struct TypeContainerImpl<T, NullType>
{
};
//--------------------------------------------------------------------------------------------------------------------------------------------------------------
template<template <class> class T, typename Seq>
struct TypeContainer : public TypeContainerImpl<T, typename Seq::Type>
{
	typedef typename Seq::Type					AllList;
	typedef TypeContainerImpl<T, AllList>		ImplType;

	template<typename U>
	struct TypeAccesor
	{
		typedef typename ListAfter<AllList, U>::Type	List;
		typedef TypeContainerImpl<T, List>				Type;
	};
	template<unsigned int Index>
	struct ToType
	{
		typedef typename TL::TypeAt<AllList, Index>::Result		Type;
	};

	//-----------------------------------------------------------------------------------------------------------------------------------------------
	template<typename U>
	T<U>&			Get()				{ return static_cast< typename TypeAccesor<U>::Type* >(const_cast<TypeContainer*>(this))->data; }
	template<typename U>
	const T<U>&		Get() const			{ return static_cast< const typename TypeAccesor<U>::Type* >(this)->data; }
	//-----------------------------------------------------------------------------------------------------------------------------------------------
	template<unsigned int Index>
	T< typename ToType<Index>::Type >&			Get()			{ return Get< typename ToType<Index>::Type >(); }
	template<unsigned int Index>
	const T< typename ToType<Index>::Type >&	Get()			{ return Get< typename ToType<Index>::Type >(); }
	
	//-----------------------------------------------------------------------------------------------------------------------------------------------
	template<typename U>
	operator T<U>&()					{ return Get<U>(); }
	template<typename U>
	operator const T<U>&()				{ return Get<U>(); }
};



//////////////////////////////////////
// Instantiate like this

typedef Loki::Seq<int, doulbe, float>       Instances;
typedef TypeContainer<Some_Template_Type, Instances>    Container;

Container cont;



Edited by - netics on Apr 11 2007 01:17:35 AM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Apr 12 2007 :  10:59:16 AM  Show Profile  Reply with Quote
Can you try this version and see if it makes any difference:

http://www.wholetomato.com/downloads/VA_X_Setup1552.exe

If this build passes internal testing it will be posted in the next couple of days. Using this version, and simply copy / pasting your code into a header file here I am not seeing any problems.

zen is the art of being at one with the two'ness
Go to Top of Page

netics
Senior Member

30 Posts

Posted - Apr 15 2007 :  8:22:33 PM  Show Profile  Reply with Quote
No Problem with 1553~!!
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000