- changed the PROPERTY macro to a simper version and brought some refactoring with it

Sun, 23 Feb 2014 17:45:34 +0200

author
Teemu Piippo <crimsondusk64@gmail.com>
date
Sun, 23 Feb 2014 17:45:34 +0200
changeset 112
def56932f938
parent 111
87d9ebd3ef34
child 113
4d4c43eca4d7

- changed the PROPERTY macro to a simper version and brought some refactoring with it

src/Commands.cc file | annotate | diff | comparison | revisions
src/DataBuffer.cc file | annotate | diff | comparison | revisions
src/DataBuffer.h file | annotate | diff | comparison | revisions
src/Expression.cc file | annotate | diff | comparison | revisions
src/Expression.h file | annotate | diff | comparison | revisions
src/Format.cc file | annotate | diff | comparison | revisions
src/Lexer.cc file | annotate | diff | comparison | revisions
src/Lexer.h file | annotate | diff | comparison | revisions
src/LexerScanner.cc file | annotate | diff | comparison | revisions
src/LexerScanner.h file | annotate | diff | comparison | revisions
src/Main.cc file | annotate | diff | comparison | revisions
src/Main.h file | annotate | diff | comparison | revisions
src/Parser.cc file | annotate | diff | comparison | revisions
src/Parser.h file | annotate | diff | comparison | revisions
src/Property.h file | annotate | diff | comparison | revisions
src/StringTable.cc file | annotate | diff | comparison | revisions
src/StringTable.h file | annotate | diff | comparison | revisions
src/Tokens.h file | annotate | diff | comparison | revisions
--- a/src/Commands.cc	Sun Feb 23 17:21:18 2014 +0200
+++ b/src/Commands.cc	Sun Feb 23 17:45:34 2014 +0200
@@ -69,7 +69,7 @@
 String CommandInfo::GetSignature()
 {
 	String text;
-	text += GetTypeName (returnvalue);
+	text += DataTypeName (returnvalue);
 	text += ' ';
 	text += name;
 
@@ -91,7 +91,7 @@
 		if (i)
 			text += ", ";
 
-		text += GetTypeName (args[i].type);
+		text += DataTypeName (args[i].type);
 		text += ' ';
 		text += args[i].name;
 
--- a/src/DataBuffer.cc	Sun Feb 23 17:21:18 2014 +0200
+++ b/src/DataBuffer.cc	Sun Feb 23 17:45:34 2014 +0200
@@ -33,7 +33,7 @@
 DataBuffer::DataBuffer (int size)
 {
 	SetBuffer (new char[size]);
-	SetPosition (&GetBuffer()[0]);
+	SetPosition (&Buffer()[0]);
 	SetAllocatedSize (size);
 }
 
@@ -41,8 +41,8 @@
 //
 DataBuffer::~DataBuffer()
 {
-	assert (CountMarks() == 0 && CountReferences() == 0);
-	delete GetBuffer();
+	assert (Marks().Size() == 0 && References().Size() == 0);
+	delete Buffer();
 }
 
 // ============================================================================
@@ -77,31 +77,31 @@
 //
 void DataBuffer::CopyBuffer (const DataBuffer* buf)
 {
-	CheckSpace (buf->GetWrittenSize());
-	memcpy (mPosition, buf->GetBuffer(), buf->GetWrittenSize());
-	mPosition += buf->GetWrittenSize();
+	CheckSpace (buf->WrittenSize());
+	memcpy (mPosition, buf->Buffer(), buf->WrittenSize());
+	mPosition += buf->WrittenSize();
 }
 
 // ============================================================================
 //
 void DataBuffer::TransferMarks (DataBuffer* other)
 {
-	int offset = other->GetWrittenSize();
+	int offset = other->WrittenSize();
 
-	for (ByteMark* mark : GetMarks())
+	for (ByteMark* mark : Marks())
 	{
 		mark->pos += offset;
-		other->PushToMarks (mark);
+		other->mMarks << mark;
 	}
 
-	for (MarkReference* ref : GetReferences())
+	for (MarkReference* ref : References())
 	{
 		ref->pos += offset;
-		other->PushToReferences (ref);
+		other->mReferences << ref;
 	}
 
-	ClearMarks();
-	ClearReferences();
+	mMarks.Clear();
+	mReferences.Clear();
 }
 
 // ============================================================================
@@ -110,8 +110,8 @@
 {
 	ByteMark* mark = new ByteMark;
 	mark->name = name;
-	mark->pos = GetWrittenSize();
-	PushToMarks (mark);
+	mark->pos = WrittenSize();
+	mMarks << mark;
 	return mark;
 }
 
@@ -121,8 +121,8 @@
 {
 	MarkReference* ref = new MarkReference;
 	ref->target = mark;
-	ref->pos = GetWrittenSize();
-	PushToReferences (ref);
+	ref->pos = WrittenSize();
+	mReferences << ref;
 
 	// Write a dummy placeholder for the reference
 	WriteDWord (0xBEEFCAFE);
@@ -134,7 +134,7 @@
 //
 void DataBuffer::AdjustMark (ByteMark* mark)
 {
-	mark->pos = GetWrittenSize();
+	mark->pos = WrittenSize();
 }
 
 // ============================================================================
@@ -149,44 +149,44 @@
 void DataBuffer::WriteStringIndex (const String& a)
 {
 	WriteDWord (DH_PushStringIndex);
-	WriteDWord (GetStringTableIndex (a));
+	WriteDWord (StringTableIndex (a));
 }
 
 // ============================================================================
 //
 void DataBuffer::Dump()
 {
-	for (int i = 0; i < GetWrittenSize(); ++i)
-		printf ("%d. [0x%X]\n", i, GetBuffer()[i]);
+	for (int i = 0; i < WrittenSize(); ++i)
+		printf ("%d. [0x%X]\n", i, Buffer()[i]);
 }
 
 // ============================================================================
 //
 void DataBuffer::CheckSpace (int bytes)
 {
-	int writesize = GetWrittenSize();
+	int writesize = WrittenSize();
 
-	if (writesize + bytes < GetAllocatedSize())
+	if (writesize + bytes < AllocatedSize())
 		return;
 
 	// We don't have enough space in the buffer to write
 	// the stuff - thus resize. First, store the old
 	// buffer temporarily:
-	char* copy = new char[GetAllocatedSize()];
-	memcpy (copy, GetBuffer(), GetAllocatedSize());
+	char* copy = new char[AllocatedSize()];
+	memcpy (copy, Buffer(), AllocatedSize());
 
 	// Remake the buffer with the new size. Have enough space
 	// for the stuff we're going to write, as well as a bit
 	// of leeway so we don't have to resize immediately again.
-	int newsize = GetAllocatedSize() + bytes + 512;
+	int newsize = AllocatedSize() + bytes + 512;
 
-	delete GetBuffer();
+	delete Buffer();
 	SetBuffer (new char[newsize]);
 	SetAllocatedSize (newsize);
 
 	// Now, copy the stuff back.
-	memcpy (mBuffer, copy, GetAllocatedSize());
-	SetPosition (GetBuffer() + writesize);
+	memcpy (mBuffer, copy, AllocatedSize());
+	SetPosition (Buffer() + writesize);
 	delete copy;
 }
 
@@ -234,7 +234,7 @@
 //
 ByteMark* DataBuffer::FindMarkByName (const String& target)
 {
-	for (ByteMark* mark : GetMarks())
+	for (ByteMark* mark : Marks())
 		if (mark->name == target)
 			return mark;
 
--- a/src/DataBuffer.h	Sun Feb 23 17:21:18 2014 +0200
+++ b/src/DataBuffer.h	Sun Feb 23 17:45:34 2014 +0200
@@ -34,8 +34,6 @@
 #include "Main.h"
 #include "StringTable.h"
 
-#define MAX_MARKS 512
-
 // ============================================================================
 // data_buffer: A dynamic data buffer.
 //
@@ -51,11 +49,11 @@
 //
 class DataBuffer
 {
-	PROPERTY (private, char*,					Buffer,			NO_OPS,		STOCK_WRITE)
-	PROPERTY (private, int,						AllocatedSize,	NUM_OPS,	STOCK_WRITE)
-	PROPERTY (private, char*,					Position,		NO_OPS,		STOCK_WRITE)
-	PROPERTY (private, List<ByteMark*>,			Marks,			LIST_OPS,	STOCK_WRITE)
-	PROPERTY (private, List<MarkReference*>,	References,		LIST_OPS,	STOCK_WRITE)
+	PROPERTY (private, char*,					Buffer,			SetBuffer,			STOCK_WRITE)
+	PROPERTY (private, int,						AllocatedSize,	SetAllocatedSize,	STOCK_WRITE)
+	PROPERTY (private, char*,					Position,		SetPosition,		STOCK_WRITE)
+	PROPERTY (private, List<ByteMark*>,			Marks,			SetMarks,			STOCK_WRITE)
+	PROPERTY (private, List<MarkReference*>,	References,		SetReferences,		STOCK_WRITE)
 
 	public:
 		DataBuffer (int size = 128);
@@ -83,9 +81,9 @@
 		void			WriteDWord (int32_t data);
 		void			CopyBuffer (const DataBuffer* buf);
 
-		inline int GetWrittenSize() const
+		inline int WrittenSize() const
 		{
-			return GetPosition() - GetBuffer();
+			return Position() - Buffer();
 		}
 };
 
--- a/src/Expression.cc	Sun Feb 23 17:21:18 2014 +0200
+++ b/src/Expression.cc	Sun Feb 23 17:45:34 2014 +0200
@@ -4,7 +4,7 @@
 
 struct OperatorInfo
 {
-	TokenType	token;
+	ETokenType	token;
 	int			priority;
 	int			numoperands;
 	DataHeader	header;
@@ -73,23 +73,23 @@
 //
 ExpressionSymbol* Expression::ParseSymbol()
 {
-	int pos = mLexer->GetPosition();
+	int pos = mLexer->Position();
 	ExpressionValue* op = null;
 
-	if (mLexer->GetNext (TK_Colon))
+	if (mLexer->Next (TK_Colon))
 		return new ExpressionColon;
 
 	// Check for OPER_erator
 	for (const OperatorInfo& op : gOperators)
-		if (mLexer->GetNext (op.token))
+		if (mLexer->Next (op.token))
 			return new ExpressionOperator ((ExpressionOperatorType) (&op - &gOperators[0]));
 
 	// Check sub-expression
-	if (mLexer->GetNext (TK_ParenStart))
+	if (mLexer->Next (TK_ParenStart))
 	{
 		Expression expr (mParser, mLexer, mType);
 		mLexer->MustGetNext (TK_ParenEnd);
-		return expr.GetResult()->Clone();
+		return expr.Result()->Clone();
 	}
 
 	op = new ExpressionValue (mType);
@@ -107,24 +107,24 @@
 	}
 
 	// Check for variables
-	if (mLexer->GetNext (TK_DollarSign))
+	if (mLexer->Next (TK_DollarSign))
 	{
 		mLexer->MustGetNext (TK_Symbol);
-		Variable* var = mParser->FindVariable (GetTokenString());
+		Variable* var = mParser->FindVariable (TokenString());
 
 		if (var == null)
-			Error ("unknown variable %1", GetTokenString());
+			Error ("unknown variable %1", TokenString());
 
 		if (var->type != mType)
 			Error ("expression requires %1, variable $%2 is of type %3",
-				GetTypeName (mType), var->name, GetTypeName (var->type));
+				DataTypeName (mType), var->name, DataTypeName (var->type));
 
 		if (var->isarray)
 		{
 			mLexer->MustGetNext (TK_BracketStart);
 			Expression expr (mParser, mLexer, TYPE_Int);
-			expr.GetResult()->ConvertToBuffer();
-			DataBuffer* buf = expr.GetResult()->GetBuffer()->Clone();
+			expr.Result()->ConvertToBuffer();
+			DataBuffer* buf = expr.Result()->Buffer()->Clone();
 			buf->WriteDWord (DH_PushGlobalArray);
 			buf->WriteDWord (var->index);
 			op->SetBuffer (buf);
@@ -154,40 +154,40 @@
 		case TYPE_Void:
 		case TYPE_Unknown:
 		{
-			Error ("unknown identifier `%1` (expected keyword, function or variable)", GetTokenString());
+			Error ("unknown identifier `%1` (expected keyword, function or variable)", TokenString());
 			break;
 		}
 
 		case TYPE_Bool:
 		{
-			if (mLexer->GetNext (TK_True) || mLexer->GetNext (TK_False))
+			if (mLexer->Next (TK_True) || mLexer->Next (TK_False))
 			{
-				TokenType tt = mLexer->GetTokenType();
-				op->SetValue (tt ==TK_True ? 1 : 0);
+				ETokenType tt = mLexer->TokenType();
+				op->SetValue (tt == TK_True ? 1 : 0);
 				return op;
 			}
 		}
 
 		case TYPE_Int:
 		{
-			if (mLexer->GetNext (TK_Number))
+			if (mLexer->Next (TK_Number))
 			{
-				op->SetValue (GetTokenString().ToLong());
+				op->SetValue (TokenString().ToLong());
 				return op;
 			}
 		}
 
 		case TYPE_String:
 		{
-			if (mLexer->GetNext (TK_String))
+			if (mLexer->Next (TK_String))
 			{
-				op->SetValue (GetStringTableIndex (GetTokenString()));
+				op->SetValue (StringTableIndex (TokenString()));
 				return op;
 			}
 		}
 	}
 
-	mBadTokenText = mLexer->GetToken()->text;
+	mBadTokenText = mLexer->Token()->text;
 	mLexer->SetPosition (pos);
 	delete op;
 	return null;
@@ -205,14 +205,14 @@
 {
 	for (auto it = mSymbols.begin() + 1; it != mSymbols.end(); ++it)
 	{
-		if ((*it)->GetType() != EXPRSYM_Operator)
+		if ((*it)->Type() != EXPRSYM_Operator)
 			continue;
 
 		ExpressionOperator* op = static_cast<ExpressionOperator*> (*it);
 
 		// Unary minus with a value as the previous symbol cannot really be
 		// unary; replace with binary minus.
-		if (op->GetID() == OPER_UnaryMinus && (*(it - 1))->GetType() == EXPRSYM_Value)
+		if (op->ID() == OPER_UnaryMinus && (*(it - 1))->Type() == EXPRSYM_Value)
 			op->SetID (OPER_Subtraction);
 	}
 }
@@ -225,8 +225,8 @@
 {
 	// If it's an unary OPER_erator we skip to its value. The actual OPER_erator will
 	// be verified separately.
-	if ((*it)->GetType() == EXPRSYM_Operator &&
-		gOperators[static_cast<ExpressionOperator*> (*it)->GetID()].numoperands == 1)
+	if ((*it)->Type() == EXPRSYM_Operator &&
+		gOperators[static_cast<ExpressionOperator*> (*it)->ID()].numoperands == 1)
 	{
 		++it;
 	}
@@ -234,7 +234,7 @@
 	int i = it - mSymbols.begin();
 
 	// Ensure it's an actual value
-	if ((*it)->GetType() != EXPRSYM_Value)
+	if ((*it)->Type() != EXPRSYM_Value)
 		Error ("malformed expression (symbol #%1 is not a value)", i);
 
 	verified[i] = true;
@@ -249,7 +249,7 @@
 {
 	if (mSymbols.Size() == 1)
 	{
-		if (mSymbols[0]->GetType() != EXPRSYM_Value)
+		if (mSymbols[0]->Type() != EXPRSYM_Value)
 			Error ("bad expression");
 
 		return;
@@ -267,11 +267,11 @@
 	{
 		int i = (it - first);
 
-		if ((*it)->GetType() != EXPRSYM_Operator)
+		if ((*it)->Type() != EXPRSYM_Operator)
 			continue;
 
 		ExpressionOperator* op = static_cast<ExpressionOperator*> (*it);
-		int numoperands = gOperators[op->GetID()].numoperands;
+		int numoperands = gOperators[op->ID()].numoperands;
 
 		switch (numoperands)
 		{
@@ -331,7 +331,7 @@
 					it >= mSymbols.end() - 3 ||
 					verified[i] == true ||
 					verified[i + 2] == true ||
-					(*(it + 2))->GetType() != EXPRSYM_Colon)
+					(*(it + 2))->Type() != EXPRSYM_Colon)
 				{
 					Error ("malformed expression");
 				}
@@ -361,15 +361,15 @@
 Expression::SymbolList::Iterator Expression::FindPrioritizedOperator()
 {
 	SymbolList::Iterator	best = mSymbols.end();
-	int						bestpriority = INT_MAX;
+	int						bestpriority = __INT_MAX__;
 
 	for (SymbolList::Iterator it = mSymbols.begin(); it != mSymbols.end(); ++it)
 	{
-		if ((*it)->GetType() != EXPRSYM_Operator)
+		if ((*it)->Type() != EXPRSYM_Operator)
 			continue;
 
 		ExpressionOperator* op = static_cast<ExpressionOperator*> (*it);
-		const OperatorInfo* info = &gOperators[op->GetID()];
+		const OperatorInfo* info = &gOperators[op->ID()];
 
 		if (info->priority < bestpriority)
 		{
@@ -388,7 +388,7 @@
 ExpressionValue* Expression::EvaluateOperator (const ExpressionOperator* op,
 											   const List<ExpressionValue*>& values)
 {
-	const OperatorInfo* info = &gOperators[op->GetID()];
+	const OperatorInfo* info = &gOperators[op->ID()];
 	bool isconstexpr = true;
 	assert (values.Size() == info->numoperands);
 
@@ -415,16 +415,16 @@
 		// until Zandronum processes it at run-time.
 		newval->SetBuffer (new DataBuffer);
 
-		if (op->GetID() == OPER_Ternary)
+		if (op->ID() == OPER_Ternary)
 		{
 			// There isn't a dataheader for ternary OPER_erator. Instead, we use DH_IfNotGoto
 			// to create an "if-block" inside an expression.
 			// Behold, big block of writing madness! :P
 			//
-			DataBuffer* buf = newval->GetBuffer();
-			DataBuffer* b0 = values[0]->GetBuffer();
-			DataBuffer* b1 = values[1]->GetBuffer();
-			DataBuffer* b2 = values[2]->GetBuffer();
+			DataBuffer* buf = newval->Buffer();
+			DataBuffer* b0 = values[0]->Buffer();
+			DataBuffer* b1 = values[1]->Buffer();
+			DataBuffer* b2 = values[2]->Buffer();
 			ByteMark* mark1 = buf->AddMark (""); // start of "else" case
 			ByteMark* mark2 = buf->AddMark (""); // end of expression
 			buf->MergeAndDestroy (b0);
@@ -446,14 +446,14 @@
 			// data header.
 			for (ExpressionValue* val : values)
 			{
-				newval->GetBuffer()->MergeAndDestroy (val->GetBuffer());
+				newval->Buffer()->MergeAndDestroy (val->Buffer());
 
 				// Null the pointer out so that the value's destructor will not
 				// attempt to double-free it.
 				val->SetBuffer (null);
 			}
 
-			newval->GetBuffer()->WriteDWord (info->header);
+			newval->Buffer()->WriteDWord (info->header);
 		}
 	}
 	else
@@ -464,9 +464,9 @@
 		int a;
 
 		for (ExpressionValue* val : values)
-			nums << val->GetValue();
+			nums << val->Value();
 
-		switch (op->GetID())
+		switch (op->ID())
 		{
 			case OPER_Addition:			a = nums[0] + nums[1];					break;
 			case OPER_Subtraction:			a = nums[0] - nums[1];					break;
@@ -529,7 +529,7 @@
 		int i = it - mSymbols.begin();
 		List<SymbolList::Iterator> OPER_erands;
 		ExpressionOperator* op = static_cast<ExpressionOperator*> (*it);
-		const OperatorInfo* info = &gOperators[op->GetID()];
+		const OperatorInfo* info = &gOperators[op->ID()];
 		int lower, upper; // Boundaries of area to replace
 
 		switch (info->numoperands)
@@ -579,23 +579,23 @@
 		mSymbols.Insert (lower, newvalue);
 	}
 
-	assert (mSymbols.Size() == 1 && mSymbols.First()->GetType() == EXPRSYM_Value);
+	assert (mSymbols.Size() == 1 && mSymbols.First()->Type() == EXPRSYM_Value);
 	ExpressionValue* val = static_cast<ExpressionValue*> (mSymbols.First());
 	return val;
 }
 
 // =============================================================================
 //
-ExpressionValue* Expression::GetResult()
+ExpressionValue* Expression::Result()
 {
 	return static_cast<ExpressionValue*> (mSymbols.First());
 }
 
 // =============================================================================
 //
-String Expression::GetTokenString()
+String Expression::TokenString()
 {
-	return mLexer->GetToken()->text;
+	return mLexer->Token()->text;
 }
 
 // =============================================================================
@@ -631,16 +631,16 @@
 	{
 		case TYPE_Bool:
 		case TYPE_Int:
-			GetBuffer()->WriteDWord (DH_PushNumber);
-			GetBuffer()->WriteDWord (abs (mValue));
+			Buffer()->WriteDWord (DH_PushNumber);
+			Buffer()->WriteDWord (abs (mValue));
 
 			if (mValue < 0)
-				GetBuffer()->WriteDWord (DH_UnaryMinus);
+				Buffer()->WriteDWord (DH_UnaryMinus);
 			break;
 
 		case TYPE_String:
-			GetBuffer()->WriteDWord (DH_PushStringIndex);
-			GetBuffer()->WriteDWord (mValue);
+			Buffer()->WriteDWord (DH_PushStringIndex);
+			Buffer()->WriteDWord (mValue);
 			break;
 
 		case TYPE_Void:
--- a/src/Expression.h	Sun Feb 23 17:21:18 2014 +0200
+++ b/src/Expression.h	Sun Feb 23 17:45:34 2014 +0200
@@ -50,7 +50,7 @@
 
 		Expression (BotscriptParser* parser, Lexer* lx, DataType reqtype);
 		~Expression();
-		ExpressionValue*		GetResult();
+		ExpressionValue*		Result();
 
 	private:
 		BotscriptParser*		mParser;
@@ -61,7 +61,7 @@
 
 		ExpressionValue*		Evaluate(); // Process the expression and yield a result
 		ExpressionSymbol*		ParseSymbol();
-		String					GetTokenString();
+		String					TokenString();
 		void					AdjustOperators();
 		void					Verify(); // Ensure the expr is valid
 		void					TryVerifyValue (bool* verified, SymbolList::Iterator it);
@@ -78,14 +78,14 @@
 		ExpressionSymbol (ExpressionSymbolType type) :
 			mType (type) {}
 
-	PROPERTY (private, ExpressionSymbolType, Type, NO_OPS, STOCK_WRITE)
+	PROPERTY (private, ExpressionSymbolType, Type, SetType, STOCK_WRITE)
 };
 
 // =============================================================================
 //
 class ExpressionOperator final : public ExpressionSymbol
 {
-	PROPERTY (public, ExpressionOperatorType, ID, NO_OPS, STOCK_WRITE)
+	PROPERTY (public, ExpressionOperatorType, ID, SetID, STOCK_WRITE)
 
 	public:
 		ExpressionOperator (ExpressionOperatorType id);
@@ -95,9 +95,9 @@
 //
 class ExpressionValue final : public ExpressionSymbol
 {
-	PROPERTY (public, int,			Value,		NUM_OPS,	STOCK_WRITE)
-	PROPERTY (public, DataBuffer*,	Buffer,		NO_OPS,		STOCK_WRITE)
-	PROPERTY (public, DataType,		ValueType,	NO_OPS,		STOCK_WRITE)
+	PROPERTY (public, int,			Value,		SetValue,		STOCK_WRITE)
+	PROPERTY (public, DataBuffer*,	Buffer,		SetBuffer,		STOCK_WRITE)
+	PROPERTY (public, DataType,		ValueType,	SetValueType,	STOCK_WRITE)
 
 	public:
 		ExpressionValue (DataType valuetype);
@@ -112,7 +112,7 @@
 
 		inline bool IsConstexpr() const
 		{
-			return GetBuffer() == null;
+			return Buffer() == null;
 		}
 };
 
--- a/src/Format.cc	Sun Feb 23 17:21:18 2014 +0200
+++ b/src/Format.cc	Sun Feb 23 17:45:34 2014 +0200
@@ -130,7 +130,7 @@
 
 	if (lx != null && lx->HasValidToken())
 	{
-		Lexer::Token* tk = lx->GetToken();
+		Lexer::TokenInfo* tk = lx->Token();
 		fileinfo = Format ("%1:%2:%3: ", tk->file, tk->line, tk->column);
 	}
 
--- a/src/Lexer.cc	Sun Feb 23 17:21:18 2014 +0200
+++ b/src/Lexer.cc	Sun Feb 23 17:45:34 2014 +0200
@@ -82,7 +82,7 @@
 		}
 		else
 		{
-			Token tok;
+			TokenInfo tok;
 			tok.file = fileName;
 			tok.line = sc.GetLine();
 			tok.column = sc.GetColumn();
@@ -145,7 +145,7 @@
 
 // =============================================================================
 //
-bool Lexer::GetNext (TokenType req)
+bool Lexer::Next (ETokenType req)
 {
 	Iterator pos = mTokenPosition;
 
@@ -154,7 +154,7 @@
 
 	mTokenPosition++;
 
-	if (IsAtEnd() || (req !=TK_Any && GetTokenType() != req))
+	if (IsAtEnd() || (req !=TK_Any && TokenType() != req))
 	{
 		mTokenPosition = pos;
 		return false;
@@ -165,9 +165,9 @@
 
 // =============================================================================
 //
-void Lexer::MustGetNext (TokenType tok)
+void Lexer::MustGetNext (ETokenType tok)
 {
-	if (!GetNext())
+	if (!Next())
 		Error ("unexpected EOF");
 
 	if (tok !=TK_Any)
@@ -177,7 +177,7 @@
 // =============================================================================
 // eugh..
 //
-void Lexer::MustGetFromScanner (LexerScanner& sc, TokenType tt)
+void Lexer::MustGetFromScanner (LexerScanner& sc, ETokenType tt)
 {
 	if (!sc.GetNextToken())
 		Error ("unexpected EOF");
@@ -185,7 +185,7 @@
 	if (tt !=TK_Any && sc.GetTokenType() != tt)
 	{
 		// TODO
-		Token tok;
+		TokenInfo tok;
 		tok.type = sc.GetTokenType();
 		tok.text = sc.GetTokenText();
 
@@ -199,18 +199,18 @@
 
 // =============================================================================
 //
-void Lexer::MustGetAnyOf (const List<TokenType>& toks)
+void Lexer::MustGetAnyOf (const List<ETokenType>& toks)
 {
-	if (!GetNext())
+	if (!Next())
 		Error ("unexpected EOF");
 
-	for (TokenType tok : toks)
-		if (GetTokenType() == tok)
+	for (ETokenType tok : toks)
+		if (TokenType() == tok)
 			return;
 
 	String toknames;
 
-	for (const TokenType& tokType : toks)
+	for (const ETokenType& tokType : toks)
 	{
 		if (&tokType == &toks.Last())
 			toknames += " or ";
@@ -220,41 +220,41 @@
 		toknames += DescribeTokenType (tokType);
 	}
 
-	Error ("expected %1, got %2", toknames, DescribeToken (GetToken()));
+	Error ("expected %1, got %2", toknames, DescribeToken (Token()));
 }
 
 // =============================================================================
 //
 int Lexer::GetOneSymbol (const StringList& syms)
 {
-	if (!GetNext())
+	if (!Next())
 		Error ("unexpected EOF");
 
-	if (GetTokenType() ==TK_Symbol)
+	if (TokenType() ==TK_Symbol)
 	{
 		for (int i = 0; i < syms.Size(); ++i)
 		{
-			if (syms[i] == GetToken()->text)
+			if (syms[i] == Token()->text)
 				return i;
 		}
 	}
 
-	Error ("expected one of %1, got %2", syms, DescribeToken (GetToken()));
+	Error ("expected one of %1, got %2", syms, DescribeToken (Token()));
 	return -1;
 }
 
 // =============================================================================
 //
-void Lexer::TokenMustBe (TokenType tok)
+void Lexer::TokenMustBe (ETokenType tok)
 {
-	if (GetTokenType() != tok)
+	if (TokenType() != tok)
 		Error ("expected %1, got %2", DescribeTokenType (tok),
-			DescribeToken (GetToken()));
+			DescribeToken (Token()));
 }
 
 // =============================================================================
 //
-String Lexer::DescribeTokenPrivate (TokenType tokType, Lexer::Token* tok)
+String Lexer::DescribeTokenPrivate (ETokenType tokType, Lexer::TokenInfo* tok)
 {
 	if (tokType <gLastNamedToken)
 		return "\"" + LexerScanner::GetTokenString (tokType) + "\"";
@@ -273,10 +273,10 @@
 
 // =============================================================================
 //
-bool Lexer::PeekNext (Lexer::Token* tk)
+bool Lexer::PeekNext (Lexer::TokenInfo* tk)
 {
 	Iterator pos = mTokenPosition;
-	bool r = GetNext();
+	bool r = Next();
 
 	if (r && tk != null)
 		*tk = *mTokenPosition;
@@ -287,12 +287,12 @@
 
 // =============================================================================
 //
-bool Lexer::PeekNextType (TokenType req)
+bool Lexer::PeekNextType (ETokenType req)
 {
 	Iterator pos = mTokenPosition;
 	bool result = false;
 
-	if (GetNext() && GetTokenType() == req)
+	if (Next() && TokenType() == req)
 		result = true;
 
 	mTokenPosition = pos;
@@ -315,7 +315,7 @@
 
 	Iterator oldpos = mTokenPosition;
 	mTokenPosition += a;
-	String result = GetToken()->text;
+	String result = Token()->text;
 	mTokenPosition = oldpos;
 	return result;
 }
@@ -324,7 +324,7 @@
 //
 String Lexer::DescribeCurrentPosition()
 {
-	return GetToken()->file + ":" + GetToken()->line;
+	return Token()->file + ":" + Token()->line;
 }
 
 // =============================================================================
--- a/src/Lexer.h	Sun Feb 23 17:21:18 2014 +0200
+++ b/src/Lexer.h	Sun Feb 23 17:45:34 2014 +0200
@@ -34,17 +34,17 @@
 
 class Lexer
 {
-types:
-	struct Token
+public:
+	struct TokenInfo
 	{
-		TokenType	type;
+		ETokenType	type;
 		String		text;
 		String		file;
 		int			line;
 		int			column;
 	};
 
-	using TokenList	= List<Token>;
+	using TokenList	= List<TokenInfo>;
 	using Iterator	= TokenList::Iterator;
 
 public:
@@ -52,13 +52,13 @@
 	~Lexer();
 
 	void	ProcessFile (String file_name);
-	bool	GetNext (TokenType req = TK_Any);
-	void	MustGetNext (TokenType tok);
-	void	MustGetAnyOf (const List<TokenType>& toks);
+	bool	Next (ETokenType req = TK_Any);
+	void	MustGetNext (ETokenType tok);
+	void	MustGetAnyOf (const List<ETokenType>& toks);
 	int		GetOneSymbol (const StringList& syms);
-	void	TokenMustBe (TokenType tok);
-	bool	PeekNext (Token* tk = null);
-	bool	PeekNextType (TokenType req);
+	void	TokenMustBe (ETokenType tok);
+	bool	PeekNext (TokenInfo* tk = null);
+	bool	PeekNextType (ETokenType req);
 	String	PeekNextString (int a = 1);
 	String	DescribeCurrentPosition();
 	String	DescribeTokenPosition();
@@ -70,7 +70,7 @@
 		return (mTokenPosition < mTokens.end() && mTokenPosition >= mTokens.begin());
 	}
 
-	inline Token* GetToken() const
+	inline TokenInfo* Token() const
 	{
 		assert (HasValidToken() == true);
 		return &(*mTokenPosition);
@@ -81,9 +81,9 @@
 		return mTokenPosition == mTokens.end();
 	}
 
-	inline TokenType GetTokenType() const
+	inline ETokenType TokenType() const
 	{
-		return GetToken()->type;
+		return Token()->type;
 	}
 
 	inline void Skip (int a = 1)
@@ -91,7 +91,7 @@
 		mTokenPosition += a;
 	}
 
-	inline int GetPosition()
+	inline int Position()
 	{
 		return mTokenPosition - mTokens.begin();
 	}
@@ -102,12 +102,12 @@
 	}
 
 	// If @tok is given, describes the token. If not, describes @tok_type.
-	static inline String DescribeTokenType (TokenType toktype)
+	static inline String DescribeTokenType (ETokenType toktype)
 	{
 		return DescribeTokenPrivate (toktype, null);
 	}
 
-	static inline String DescribeToken (Token* tok)
+	static inline String DescribeToken (TokenInfo* tok)
 	{
 		return DescribeTokenPrivate (tok->type, tok);
 	}
@@ -117,10 +117,10 @@
 	Iterator		mTokenPosition;
 
 	// read a mandatory token from scanner
-	void MustGetFromScanner (LexerScanner& sc, TokenType tt =TK_Any);
+	void MustGetFromScanner (LexerScanner& sc, ETokenType tt =TK_Any);
 	void CheckFileHeader (LexerScanner& sc);
 
-	static String DescribeTokenPrivate (TokenType tok_type, Token* tok);
+	static String DescribeTokenPrivate (ETokenType tok_type, TokenInfo* tok);
 };
 
 #endif // BOTC_LEXER_H
--- a/src/LexerScanner.cc	Sun Feb 23 17:21:18 2014 +0200
+++ b/src/LexerScanner.cc	Sun Feb 23 17:45:34 2014 +0200
@@ -197,7 +197,7 @@
 		if (CheckString (gTokenStrings[i], flags))
 		{
 			mTokenText = gTokenStrings[i];
-			mTokenType = (TokenType) i;
+			mTokenType = (ETokenType) i;
 			return true;
 		}
 	}
@@ -287,7 +287,7 @@
 
 // =============================================================================
 //
-String LexerScanner::GetTokenString (TokenType a)
+String LexerScanner::GetTokenString (ETokenType a)
 {
 	assert ((int) a <= gLastNamedToken);
 	return gTokenStrings[a];
--- a/src/LexerScanner.h	Sun Feb 23 17:21:18 2014 +0200
+++ b/src/LexerScanner.h	Sun Feb 23 17:45:34 2014 +0200
@@ -80,12 +80,12 @@
 			return mPosition - mLineBreakPosition;
 		}
 
-		inline TokenType GetTokenType() const
+		inline ETokenType GetTokenType() const
 		{
 			return mTokenType;
 		}
 
-		static String GetTokenString (TokenType a);
+		static String GetTokenString (ETokenType a);
 
 	private:
 		char*			mData;
@@ -93,7 +93,7 @@
 		char*			mLineBreakPosition;
 		String			mTokenText,
 						mLastToken;
-		TokenType		mTokenType;
+		ETokenType		mTokenType;
 		int				mLine;
 
 		bool			CheckString (const char* c, int flags = 0);
--- a/src/Main.cc	Sun Feb 23 17:21:18 2014 +0200
+++ b/src/Main.cc	Sun Feb 23 17:45:34 2014 +0200
@@ -150,7 +150,7 @@
 //
 // Inverse operation - type name by value
 //
-String GetTypeName (DataType type)
+String DataTypeName (DataType type)
 {
 	switch (type)
 	{
--- a/src/Main.h	Sun Feb 23 17:21:18 2014 +0200
+++ b/src/Main.h	Sun Feb 23 17:45:34 2014 +0200
@@ -43,7 +43,7 @@
 
 String MakeObjectFileName (String s);
 DataType GetTypeByName (String token);
-String GetTypeName (DataType type);
+String DataTypeName (DataType type);
 String GetVersionString (bool longform);
 String MakeVersionString (int major, int minor, int patch);
 
--- a/src/Parser.cc	Sun Feb 23 17:21:18 2014 +0200
+++ b/src/Parser.cc	Sun Feb 23 17:45:34 2014 +0200
@@ -40,7 +40,7 @@
 // ============================================================================
 //
 BotscriptParser::BotscriptParser() :
-	mReadOnly (false),
+	mIsReadOnly (false),
 	mMainBuffer (new DataBuffer),
 	mOnEnterBuffer (new DataBuffer),
 	mMainLoopBuffer (new DataBuffer),
@@ -90,7 +90,7 @@
 	mLexer->ProcessFile (fileName);
 	PushScope();
 
-	while (mLexer->GetNext())
+	while (mLexer->Next())
 	{
 		// Check if else is potentically valid
 		if (TokenIs (TK_Else) && mCanElse == false)
@@ -99,7 +99,7 @@
 		if (TokenIs (TK_Else) == false)
 			mCanElse = false;
 
-		switch (mLexer->GetToken()->type)
+		switch (mLexer->Token()->type)
 		{
 			case TK_State:
 				ParseStateBlock();
@@ -195,7 +195,7 @@
 
 				if (b == false)
 				{
-					mLexer->GetNext();
+					mLexer->Next();
 					Error ("unknown token `%1`", GetTokenString());
 				}
 
@@ -309,7 +309,7 @@
 	Variable* var = new Variable;
 	var->origin = mLexer->DescribeCurrentPosition();
 	var->isarray = false;
-	const bool isconst = mLexer->GetNext (TK_Const);
+	const bool isconst = mLexer->Next (TK_Const);
 	mLexer->MustGetAnyOf ({TK_Int,TK_Str,TK_Void});
 
 	DataType vartype =	(TokenIs (TK_Int)) ? TYPE_Int :
@@ -319,7 +319,7 @@
 	mLexer->MustGetNext (TK_Symbol);
 	String name = GetTokenString();
 
-	if (mLexer->GetNext (TK_BracketStart))
+	if (mLexer->Next (TK_BracketStart))
 	{
 		mLexer->MustGetNext (TK_BracketEnd);
 		var->isarray = true;
@@ -350,10 +350,10 @@
 
 		// If the expression was constexpr, we know its value and thus
 		// can store it in the variable.
-		if (expr.GetResult()->IsConstexpr())
+		if (expr.Result()->IsConstexpr())
 		{
 			var->writelevel = WRITE_Constexpr;
-			var->value = expr.GetResult()->GetValue();
+			var->value = expr.Result()->Value();
 		}
 		else
 		{
@@ -577,7 +577,7 @@
 	// Get a literal value for the case block. Zandronum does not support
 	// expressions here.
 	mLexer->MustGetNext (TK_Number);
-	int num = mLexer->GetToken()->text.ToLong();
+	int num = mLexer->Token()->text.ToLong();
 	mLexer->MustGetNext (TK_Colon);
 
 	for (const CaseInfo& info : SCOPE(0).cases)
@@ -807,7 +807,7 @@
 	// the closing data headers into said buffers too.
 	buffer()->WriteDWord (dataheader);
 	mCurrentMode = PARSERMODE_TopLevel;
-	mLexer->GetNext (TK_Semicolon);
+	mLexer->Next (TK_Semicolon);
 }
 
 // =============================================================================
@@ -820,7 +820,7 @@
 	e->number = GetTokenString().ToLong();
 	mLexer->MustGetNext (TK_Colon);
 	mLexer->MustGetNext (TK_Symbol);
-	e->name = mLexer->GetToken()->text;
+	e->name = mLexer->Token()->text;
 	mLexer->MustGetNext (TK_ParenStart);
 	mLexer->MustGetNext (TK_ParenEnd);
 	mLexer->MustGetNext (TK_Semicolon);
@@ -836,17 +836,17 @@
 
 	// Return value
 	mLexer->MustGetAnyOf ({TK_Int,TK_Void,TK_Bool,TK_Str});
-	comm->returnvalue = GetTypeByName (mLexer->GetToken()->text); // TODO
+	comm->returnvalue = GetTypeByName (mLexer->Token()->text); // TODO
 	assert (comm->returnvalue != -1);
 
 	// Number
 	mLexer->MustGetNext (TK_Number);
-	comm->number = mLexer->GetToken()->text.ToLong();
+	comm->number = mLexer->Token()->text.ToLong();
 	mLexer->MustGetNext (TK_Colon);
 
 	// Name
 	mLexer->MustGetNext (TK_Symbol);
-	comm->name = mLexer->GetToken()->text;
+	comm->name = mLexer->Token()->text;
 
 	// Arguments
 	mLexer->MustGetNext (TK_ParenStart);
@@ -859,12 +859,12 @@
 
 		CommandArgument arg;
 		mLexer->MustGetAnyOf ({TK_Int,TK_Bool,TK_Str});
-		DataType type = GetTypeByName (mLexer->GetToken()->text); // TODO
+		DataType type = GetTypeByName (mLexer->Token()->text); // TODO
 		assert (type != -1 && type != TYPE_Void);
 		arg.type = type;
 
 		mLexer->MustGetNext (TK_Symbol);
-		arg.name = mLexer->GetToken()->text;
+		arg.name = mLexer->Token()->text;
 
 		// If this is an optional parameter, we need the default value.
 		if (comm->minargs < comm->args.Size() || mLexer->PeekNextType (TK_Assign))
@@ -886,7 +886,7 @@
 					break;
 			}
 
-			arg.defvalue = mLexer->GetToken()->text.ToLong();
+			arg.defvalue = mLexer->Token()->text.ToLong();
 		}
 		else
 			comm->minargs++;
@@ -975,7 +975,7 @@
 {
 	mLexer->TokenMustBe (TK_Number);
 	String floatstring = GetTokenString();
-	Lexer::Token tok;
+	Lexer::TokenInfo tok;
 
 	// Go after the decimal point
 	if (mLexer->PeekNext (&tok) && tok.type ==TK_Dot)
@@ -995,7 +995,7 @@
 //
 AssignmentOperator BotscriptParser::ParseAssignmentOperator()
 {
-	const List<TokenType> tokens =
+	const List<ETokenType> tokens =
 	{
 		TK_Assign,
 		TK_AddAssign,
@@ -1009,7 +1009,7 @@
 
 	mLexer->MustGetAnyOf (tokens);
 
-	switch (mLexer->GetTokenType())
+	switch (mLexer->TokenType())
 	{
 		case TK_Assign:			return ASSIGNOP_Assign;
 		case TK_AddAssign:		return ASSIGNOP_Add;
@@ -1086,8 +1086,8 @@
 	{
 		mLexer->MustGetNext (TK_BracketStart);
 		Expression expr (this, mLexer, TYPE_Int);
-		expr.GetResult()->ConvertToBuffer();
-		arrayindex = expr.GetResult()->GetBuffer()->Clone();
+		expr.Result()->ConvertToBuffer();
+		arrayindex = expr.Result()->Buffer()->Clone();
 		mLexer->MustGetNext (TK_BracketEnd);
 	}
 
@@ -1169,11 +1169,11 @@
 		mLexer->Skip (-1);
 
 	Expression expr (this, mLexer, reqtype);
-	expr.GetResult()->ConvertToBuffer();
+	expr.Result()->ConvertToBuffer();
 
 	// The buffer will be destroyed once the function ends so we need to
 	// clone it now.
-	return expr.GetResult()->GetBuffer()->Clone();
+	return expr.Result()->Buffer()->Clone();
 }
 
 // ============================================================================
@@ -1181,7 +1181,7 @@
 DataBuffer* BotscriptParser::ParseStatement()
 {
 	// If it's a variable, expect assignment.
-	if (mLexer->GetNext (TK_DollarSign))
+	if (mLexer->Next (TK_DollarSign))
 	{
 		mLexer->MustGetNext (TK_Symbol);
 		Variable* var = FindVariable (GetTokenString());
@@ -1222,23 +1222,23 @@
 
 // ============================================================================
 //
-bool BotscriptParser::TokenIs (TokenType a)
+bool BotscriptParser::TokenIs (ETokenType a)
 {
-	return (mLexer->GetTokenType() == a);
+	return (mLexer->TokenType() == a);
 }
 
 // ============================================================================
 //
 String BotscriptParser::GetTokenString()
 {
-	return mLexer->GetToken()->text;
+	return mLexer->Token()->text;
 }
 
 // ============================================================================
 //
 String BotscriptParser::DescribePosition() const
 {
-	Lexer::Token* tok = mLexer->GetToken();
+	Lexer::TokenInfo* tok = mLexer->Token();
 	return tok->file + ":" + String (tok->line) + ":" + String (tok->column);
 }
 
@@ -1314,13 +1314,13 @@
 		Error ("couldn't open %1 for writing: %2", outfile, strerror (errno));
 
 	// First, resolve references
-	for (MarkReference* ref : mMainBuffer->GetReferences())
+	for (MarkReference* ref : mMainBuffer->References())
 		for (int i = 0; i < 4; ++i)
-			mMainBuffer->GetBuffer()[ref->pos + i] = (ref->target->pos >> (8 * i)) & 0xFF;
+			mMainBuffer->Buffer()[ref->pos + i] = (ref->target->pos >> (8 * i)) & 0xFF;
 
 	// Then, dump the main buffer to the file
-	fwrite (mMainBuffer->GetBuffer(), 1, mMainBuffer->GetWrittenSize(), fp);
-	Print ("-- %1 byte%s1 written to %2\n", mMainBuffer->GetWrittenSize(), outfile);
+	fwrite (mMainBuffer->Buffer(), 1, mMainBuffer->WrittenSize(), fp);
+	Print ("-- %1 byte%s1 written to %2\n", mMainBuffer->WrittenSize(), outfile);
 	fclose (fp);
 }
 
--- a/src/Parser.h	Sun Feb 23 17:21:18 2014 +0200
+++ b/src/Parser.h	Sun Feb 23 17:45:34 2014 +0200
@@ -35,12 +35,6 @@
 #include "LexerScanner.h"
 #include "Tokens.h"
 
-// TODO: get rid of this too?
-#define MAX_CASE 64
-
-// TODO: get rid of this
-#define MAX_MARKS 512
-
 class DataBuffer;
 class Lexer;
 class Variable;
@@ -155,7 +149,7 @@
 //
 class BotscriptParser
 {
-	PROPERTY (public, bool, ReadOnly, BOOL_OPS, STOCK_WRITE)
+	PROPERTY (public, bool, IsReadOnly, SetReadOnly, STOCK_WRITE)
 
 	public:
 		enum EReset
@@ -176,7 +170,7 @@
 		void					AddSwitchCase (DataBuffer* b);
 		void					CheckToplevel();
 		void					CheckNotToplevel();
-		bool					TokenIs (TokenType a);
+		bool					TokenIs (ETokenType a);
 		String					GetTokenString();
 		String					DescribePosition() const;
 		void					WriteToFile (String outfile);
--- a/src/Property.h	Sun Feb 23 17:21:18 2014 +0200
+++ b/src/Property.h	Sun Feb 23 17:45:34 2014 +0200
@@ -26,188 +26,24 @@
 	THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
-#ifndef BOTC_PROPERTY_H
-#define BOTC_PROPERTY_H
-
-// =============================================================================
-//
-// Identifier names
-//
-#define PROPERTY_SET_ACCESSOR(NAME)			Set##NAME
-#define PROPERTY_GET_ACCESSOR(NAME)			Get##NAME
-#define PROPERTY_IS_ACCESSOR(NAME)			Is##NAME // for bool types
-#define PROPERTY_MEMBER_NAME(NAME)			m##NAME
-
-// Names of operations
-#define PROPERTY_APPEND_OPERATION(NAME)		AppendTo##NAME
-#define PROPERTY_PREPEND_OPERATION(NAME)	PrependTo##NAME
-#define PROPERTY_REPLACE_OPERATION(NAME)	ReplaceIn##NAME
-#define PROPERTY_INCREASE_OPERATION(NAME)	Increase##NAME
-#define PROPERTY_DECREASE_OPERATION(NAME)	Decrease##NAME
-#define PROPERTY_TOGGLE_OPERATION(NAME)		Toggle##NAME
-#define PROPERTY_PUSH_OPERATION(NAME)		PushTo##NAME
-#define PROPERTY_REMOVE_OPERATION(NAME)		RemoveFrom##NAME
-#define PROPERTY_CLEAR_OPERATION(NAME)		Clear##NAME
-#define PROPERTY_COUNT_OPERATION(NAME)		Count##NAME
-
-// Operation definitions
-// These are the methods of the list type that are called in the operations.
-#define PROPERTY_APPEND_METHOD_NAME			Append		// String::Append
-#define PROPERTY_PREPEND_METHOD_NAME		Prepend		// String::Prepend
-#define PROPERTY_REPLACE_METHOD_NAME		Replace		// String::Replace
-#define PROPERTY_PUSH_METHOD_NAME			Append		// List<T>::Append
-#define PROPERTY_REMOVE_METHOD_NAME			Remove		// List<T>::Remove
-#define PROPERTY_CLEAR_METHOD_NAME			Clear		// List<T>::Clear
+#pragma once
 
-// =============================================================================
-//
-// Main PROPERTY macro
-//
-#define PROPERTY(ACCESS, TYPE, NAME, OPS, WRITETYPE)							\
-	private:																	\
-		TYPE PROPERTY_MEMBER_NAME(NAME);										\
-																				\
-	public:																		\
-		inline TYPE const& PROPERTY_GET_READ_METHOD (NAME, OPS) const			\
-		{																		\
-			return PROPERTY_MEMBER_NAME(NAME); 									\
-		}																		\
-																				\
-	ACCESS:																		\
-		PROPERTY_MAKE_WRITE (TYPE, NAME, WRITETYPE)								\
-		PROPERTY_DEFINE_OPERATIONS (TYPE, NAME, OPS)
+#define PROPERTY( ACCESS, TYPE, READ, WRITE, WRITETYPE )			\
+	private:														\
+		TYPE m##READ;												\
+																	\
+	public:															\
+		inline TYPE const& READ() const								\
+		{															\
+			return m##READ; 										\
+		}															\
+																	\
+	ACCESS:															\
+		void WRITE( TYPE const& a ) PROPERTY_##WRITETYPE( READ )	\
 
-// =============================================================================
-//
-// PROPERTY_GET_READ_METHOD
-//
-// This macro uses the OPS argument to construct the name of the actual
-// macro which returns the name of the get accessor. This is so that the
-// bool properties get is<NAME>() accessors while non-bools get get<NAME>()
-//
-#define PROPERTY_GET_READ_METHOD(NAME, OPS)										\
-	PROPERTY_GET_READ_METHOD_##OPS (NAME)
-
-#define PROPERTY_GET_READ_METHOD_BOOL_OPS(NAME) PROPERTY_IS_ACCESSOR (NAME)()
-#define PROPERTY_GET_READ_METHOD_NO_OPS(NAME) PROPERTY_GET_ACCESSOR (NAME)()
-#define PROPERTY_GET_READ_METHOD_STR_OPS(NAME) PROPERTY_GET_ACCESSOR (NAME)()
-#define PROPERTY_GET_READ_METHOD_NUM_OPS(NAME) PROPERTY_GET_ACCESSOR (NAME)()
-#define PROPERTY_GET_READ_METHOD_LIST_OPS(NAME) PROPERTY_GET_ACCESSOR (NAME)()
-
-// =============================================================================
-//
-// PROPERTY_MAKE_WRITE
-//
-// This macro uses the WRITETYPE argument to construct the set accessor of the
-// property. If WRITETYPE is STOCK_WRITE, an inline method is defined to just
-// set the new value of the property. If WRITETYPE is CUSTOM_WRITE, the accessor
-// is merely declared and is left for the user to define.
-//
-#define PROPERTY_MAKE_WRITE(TYPE, NAME, WRITETYPE)								\
-	PROPERTY_MAKE_WRITE_##WRITETYPE (TYPE, NAME)
-
-#define PROPERTY_MAKE_WRITE_STOCK_WRITE(TYPE, NAME)								\
-		inline void PROPERTY_SET_ACCESSOR(NAME) (TYPE const& a)					\
-		{																		\
-			PROPERTY_MEMBER_NAME(NAME) = a;										\
+#define PROPERTY_STOCK_WRITE( READ )	\
+		{								\
+			m##READ = a;				\
 		}
 
-#define PROPERTY_MAKE_WRITE_CUSTOM_WRITE(TYPE, NAME)							\
-		void PROPERTY_SET_ACCESSOR(NAME) (TYPE const& NAME);					\
-
-// =============================================================================
-//
-// PROPERTY_DEFINE_OPERATIONS
-//
-// This macro may expand into methods defining additional operations for the
-// method. 
-
-#define PROPERTY_DEFINE_OPERATIONS(TYPE, NAME, OPS)								\
-	DEFINE_PROPERTY_##OPS (TYPE, NAME)
-
-// =============================================================================
-//
-// DEFINE_PROPERTY_NO_OPS
-//
-// Obviously NO_OPS expands into no operations.
-//
-#define DEFINE_PROPERTY_NO_OPS(TYPE, NAME)
-
-// =============================================================================
-//
-// DEFINE_PROPERTY_STR_OPS
-//
-#define DEFINE_PROPERTY_STR_OPS(TYPE, NAME)										\
-		void PROPERTY_APPEND_OPERATION(NAME) (const TYPE& a)					\
-		{																		\
-			TYPE tmp (PROPERTY_MEMBER_NAME(NAME));								\
-			tmp.PROPERTY_APPEND_METHOD_NAME (a);								\
-			PROPERTY_SET_ACCESSOR(NAME) (tmp);									\
-		}																		\
-																				\
-		void PROPERTY_PREPEND_OPERATION(NAME) (const TYPE& a)					\
-		{																		\
-			TYPE tmp (PROPERTY_MEMBER_NAME(NAME));								\
-			tmp.PROPERTY_PREPEND_METHOD_NAME (a);								\
-			PROPERTY_SET_ACCESSOR(NAME) (tmp);									\
-		}																		\
-																				\
-		void PROPERTY_REPLACE_OPERATION(NAME) (const TYPE& a, const TYPE& b)	\
-		{																		\
-			TYPE tmp (PROPERTY_MEMBER_NAME(NAME));								\
-			tmp.PROPERTY_REPLACE_METHOD_NAME (a, b);							\
-			PROPERTY_SET_ACCESSOR(NAME) (tmp);									\
-		}
-
-// =============================================================================
-//
-// DEFINE_PROPERTY_NUM_OPS
-//
-#define DEFINE_PROPERTY_NUM_OPS(TYPE, NAME)										\
-		inline void PROPERTY_INCREASE_OPERATION(NAME) (TYPE a = 1)				\
-		{																		\
-			PROPERTY_SET_ACCESSOR(NAME) (PROPERTY_MEMBER_NAME(NAME) + a);		\
-		}																		\
-																				\
-		inline void PROPERTY_DECREASE_OPERATION(NAME) (TYPE a = 1)				\
-		{																		\
-			PROPERTY_SET_ACCESSOR(NAME) (PROPERTY_MEMBER_NAME(NAME) - a);		\
-		}
-
-// =============================================================================
-//
-// DEFINE_PROPERTY_BOOL_OPS
-//
-#define DEFINE_PROPERTY_BOOL_OPS(TYPE, NAME)									\
-		inline void PROPERTY_TOGGLE_OPERATION(NAME)()							\
-		{																		\
-			PROPERTY_SET_ACCESSOR(NAME) (!PROPERTY_MEMBER_NAME(NAME));			\
-		}
-
-// =============================================================================
-//
-// DEFINE_PROPERTY_LIST_OPS
-//
-#define DEFINE_PROPERTY_LIST_OPS(TYPE, NAME)									\
-		void PROPERTY_PUSH_OPERATION(NAME) (const TYPE::ValueType& a)			\
-		{																		\
-			PROPERTY_MEMBER_NAME(NAME).PROPERTY_PUSH_METHOD_NAME (a);			\
-		}																		\
-																				\
-		void PROPERTY_REMOVE_OPERATION(NAME) (const TYPE::ValueType& a)			\
-		{																		\
-			PROPERTY_MEMBER_NAME(NAME).PROPERTY_REMOVE_METHOD_NAME (a);			\
-		}																		\
-																				\
-		inline void PROPERTY_CLEAR_OPERATION(NAME)()							\
-		{																		\
-			PROPERTY_MEMBER_NAME(NAME).PROPERTY_CLEAR_METHOD_NAME();			\
-		}																		\
-																				\
-	public:																		\
-		inline int PROPERTY_COUNT_OPERATION(NAME)() const						\
-		{																		\
-			return PROPERTY_GET_ACCESSOR (NAME)().Size();						\
-		}
-
-#endif // BOTC_PROPERTY_H
+#define PROPERTY_CUSTOM_WRITE( READ ) ;
\ No newline at end of file
--- a/src/StringTable.cc	Sun Feb 23 17:21:18 2014 +0200
+++ b/src/StringTable.cc	Sun Feb 23 17:45:34 2014 +0200
@@ -44,7 +44,7 @@
 //
 // Potentially adds a string to the table and returns the index of it.
 //
-int GetStringTableIndex (const String& a)
+int StringTableIndex (const String& a)
 {
 	// Find a free slot in the table.
 	int idx;
--- a/src/StringTable.h	Sun Feb 23 17:21:18 2014 +0200
+++ b/src/StringTable.h	Sun Feb 23 17:45:34 2014 +0200
@@ -31,7 +31,7 @@
 
 #include "Main.h"
 
-int GetStringTableIndex (const String& a);
+int StringTableIndex (const String& a);
 const StringList& GetStringTable();
 int CountStringsInTable();
 
--- a/src/Tokens.h	Sun Feb 23 17:21:18 2014 +0200
+++ b/src/Tokens.h	Sun Feb 23 17:45:34 2014 +0200
@@ -33,7 +33,7 @@
 #include "Macros.h"
 
 // =======================================================
-named_enum TokenType
+named_enum ETokenType
 {
 	// Non-word tokens
 	TK_LeftShiftAssign,

mercurial