CodeCompass icon indicating copy to clipboard operation
CodeCompass copied to clipboard

Metadata display on the new web UI

Open dbukki opened this issue 2 years ago • 0 comments

The old web UI was able to display several important metadata about components of the selected class or function that the new web UI does not currently have support for. Such features are (as illustrated by the images below):

  • visibility of members (private/protected/public; both with grouping and with +/#/- icons)
  • tag-based flags in the entry's prefix ('S'=static/'G'=global/'I'=implicit/...)
  • grayed-out entries for implicit nodes (e.g. range and iterator variables in range-based for loops, or implicitly generated constructors, destructors and assignment operators)

image image

image image

I would also consider adding further flags, like:

  • mutable
  • constexpr, constinit, consteval
  • 'abstract'/'pure', override, final (we already have virtual)
  • noexcept

Here's the dummy code I used for the images:

class SpecialClass
{
private:
	const volatile int cvi = 7;
	mutable char mc = 'a';
	
	static long sl;
	static constexpr const char* scccp = "hello";
	
protected:
	SpecialClass() {}
	
public:
	int something() const
	{
		int sum = 0;
		int vals[] = {2,3,5,7};
		for (int val : vals)
			sum += val;
		return sum;
	}
};
long SpecialClass::sl = 7;

dbukki avatar Oct 14 '23 14:10 dbukki