#ifndef LISTNODE_H
#define LISTNODE_H
#include "extdll.h"
#include "util.h"
#include "cbase.h"
/* The ListList is a simple linked-list class designed to hold StrBufs and Entities.
* It could doubtless be replaced with something better. */
/* a ListNode is a single element of a ListList. */
class ListNode
{
public:
ListNode(); //Create an empty ListNode.
ListNode(StrBuf); //Create a ListNode holding this StrBuf.
ListNode(CBaseEntity* tent); //Create a ListNode holding this CBE*.
void Clean(); //Destroy this ListNode and Clean() the next one.
virtual ~ListNode();
StrBuf buf; //If the node holds a StrBuf, this is it.
ListNode* next; //This is the next node in the list.
CBaseEntity* ent; //If the node holds an ent, this is it.
};
/* And here's the ListList class: */
class ListList
{
public:
CBaseEntity* EPop(); //Pop a node from the list and return its "ent" value.
StrBuf SPop(); //Pop a node from the list and return its "buf" value.
void Append(CBaseEntity*); //Append an ent-containing node to the list.
void Append(StrBuf); //Append a StrBuf-containing node to the list.
void EKill(CBaseEntity*); //Remove the node containing this pointer from the list.
ListList();
virtual ~ListList();
ListNode* head; //First node in the list.
ListNode* tail; //Last node in the list.
};
#endif
| # | Change | User | Description | Committed | |
|---|---|---|---|---|---|
| #2 | 1689 | Sam Stafford |
Integrate 02.1 API and code cleanup to P4HL. Lots of work. Phew. |
||
| #1 | 937 | Sam Stafford |
Renaming my guest directory to the more conventional sam_stafford. |
||
| //guest/samwise/p4hl/src/dlls/listnode.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. |
||