pred@2224: /**
pred@2224: * vim: set ts=4 :
pred@2224: * =============================================================================
pred@2224: * SourceMod Sample Extension
pred@2224: * Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
pred@2224: * =============================================================================
pred@2224: *
pred@2224: * This program is free software; you can redistribute it and/or modify it under
pred@2224: * the terms of the GNU General Public License, version 3.0, as published by the
pred@2224: * Free Software Foundation.
pred@2224: *
pred@2224: * This program is distributed in the hope that it will be useful, but WITHOUT
pred@2224: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
pred@2224: * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
pred@2224: * details.
pred@2224: *
pred@2224: * You should have received a copy of the GNU General Public License along with
pred@2224: * this program. If not, see .
pred@2224: *
pred@2224: * As a special exception, AlliedModders LLC gives you permission to link the
pred@2224: * code of this program (as well as its derivative works) to "Half-Life 2," the
pred@2224: * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
pred@2224: * by the Valve Corporation. You must obey the GNU General Public License in
pred@2224: * all respects for all other code used. Additionally, AlliedModders LLC grants
pred@2224: * this exception to all derivative works. AlliedModders LLC defines further
pred@2224: * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
pred@2224: * or .
pred@2224: *
pred@2224: * Version: $Id$
pred@2224: */
pred@2224:
pred@2224: #ifndef _INCLUDE_SOURCEMOD_STRUCT_HANDLE_H_
pred@2224: #define _INCLUDE_SOURCEMOD_STRUCT_HANDLE_H_
pred@2224:
pred@2224: #include "Struct.h"
pred@2348: #include "vector.h"
pred@2224: #include "basehandle.h"
pred@2224:
pred@2224: class StructHandle
pred@2224: {
pred@2224: public:
pred@2224: StructInfo *info;
pred@2224: void *data;
pred@2224: bool canDelete;
pred@2224:
pred@2224: bool GetInt(const char *member, int *value);
pred@2224: bool GetFloat(const char *member, float *value);
pred@2224: bool GetVector(const char *member, Vector *vec);
pred@2224: bool GetEHandle(const char *member, CBaseHandle **handle);
pred@2224: bool GetString(const char *member, char **string);
pred@2224: //bool GetStruct(const char *member, handle_t *value);
pred@2224:
pred@2224: bool SetInt(const char *member, int value);
pred@2224: bool SetFloat(const char *member, float value);
pred@2224: bool SetVector(const char *member, Vector vec);
pred@2224: bool SetEHandle(const char *member, CBaseHandle *handle);
pred@2224: bool SetString(const char *member, char *string);
pred@2224: //bool SetStruct(const char *member, StructHandle *struct);
pred@2224:
pred@2224: bool IsPointerNull(const char *member, bool *result);
pred@2224: bool setPointerNull(const char *member);
pred@2224: };
pred@2224:
pred@2224: #endif //_INCLUDE_SOURCEMOD_STRUCT_HANDLE_H_