ChangeNode.h #1

  • //
  • guest/
  • andrew_mcdonald/
  • p4hl/
  • src/
  • dlls/
  • ChangeNode.h
  • View
  • Commits
  • Open Download .zip Download (362 B)
// ChangeNode.h: interface for the ChangeNode class.
//
//////////////////////////////////////////////////////////////////////

#ifndef CHANGENODE_H
#define CHANGENODE_H

class ChangeNode  
{
public:
	ChangeNode(StrBuf buf);
	virtual ~ChangeNode();

	StrBuf change;
	int value;
	ChangeNode* prev;
	ChangeNode* next;
	ChangeNode* seek;
};

#endif // CHANGENODE_H
# Change User Description Committed
#1 7292 Andrew McDonald initial submittal
//guest/sam_stafford/p4hl/src/dlls/ChangeNode.h
#3 1689 Sam Stafford Integrate 02.1 API and code cleanup to P4HL.
 Lots of work.  Phew.
#2 1349 Sam Stafford Overhaul to ChangeSorter implementation.
 Member variables of ChangeSorter have
been made private, since nothing was (or should be) accessing them directly, and
methods, which remain public, should look the same from outside.

The original ChangeSorter was quick and dirty because I wanted to see P4HL working
quickly, but it was also about as inefficient as possible because it used single links
and linear searches.

The new and improved ChangeSorter is a doubly-linked list with intelligent searching
that's geared toward sequential access of elements that are close to each other, which
is indeed the nature of most of the queries that P4HL makes.  Even in a worst-case
scenario, this version should perform at least as well as the old one.

No noticeable performance change or bugs as of yet, but in theory we'd see the difference
with really large sets of data (ones larger than P4HL can show us).
#1 937 Sam Stafford Renaming my guest directory to the more conventional
sam_stafford.
//guest/samwise/p4hl/src/dlls/ChangeNode.h
#1 936 Sam Stafford Adding P4HL to the public depot.
 See relnotes.txt for
installation instructions; all relevant files are under
p4hl/dist.

Source code is under p4hl/src in the form of a VC++ project.