Files

72 lines
1.7 KiB
C++
Raw Permalink Normal View History

2015-02-15 18:53:04 +03:00
/**
*
* Copyright (c) 2005-2009 Anchorite (TeamX), <anchorite2001@yandex.ru>
2015-02-15 21:33:27 +03:00
* Copyright (c) 2014-2015 Nirran, phobos2077
* Copyright (c) 2015 alexeevdv <mail@alexeevdv.ru>
2015-02-15 18:53:04 +03:00
* Distributed under the GNU GPL v3. For full terms see the file license.txt
*
*/
2015-02-13 16:59:11 +03:00
#ifndef PROC_TABLE_H
#define PROC_TABLE_H
2015-02-15 16:31:38 +03:00
// C++ standard includes
2015-02-16 00:30:55 +03:00
#include <stdint.h>
2015-02-15 16:31:38 +03:00
// int2ssl includes
2015-02-13 16:59:11 +03:00
2015-02-15 16:31:38 +03:00
// Third party includes
2015-02-14 14:38:14 +03:00
class CProcDescriptor
{
2015-02-13 16:59:11 +03:00
public:
2015-02-14 13:39:47 +03:00
CProcDescriptor();
CProcDescriptor(const CProcDescriptor& Item);
virtual ~CProcDescriptor();
2015-02-13 16:59:11 +03:00
public:
2015-02-16 00:30:55 +03:00
virtual void Serialize();
2015-02-13 16:59:11 +03:00
2015-02-16 00:30:55 +03:00
void Dump();
2015-02-13 16:59:11 +03:00
public:
2015-02-14 13:39:47 +03:00
CProcDescriptor& operator = (const CProcDescriptor& Item);
2015-02-13 16:59:11 +03:00
public:
2015-02-15 18:28:27 +03:00
uint32_t m_ulNameOffset; // Index into namespace for procedure name
uint32_t m_ulType; // Type of function (P_TIMED, P_CONDITIONAL, none)
uint32_t m_ulTime; // Time this proc should go off, if timed
uint32_t m_ulExpressionOffset; // Pointer to conditional code, if conditional
uint32_t m_ulBodyOffset; // Pointer to procedure
uint32_t m_ulNumArgs; // Number of args to procedure
2015-02-13 16:59:11 +03:00
};
2015-02-14 14:38:14 +03:00
class CProcTable
{
2015-02-13 16:59:11 +03:00
public:
2015-02-14 13:39:47 +03:00
CProcTable();
virtual ~CProcTable();
2015-02-13 16:59:11 +03:00
public:
2015-02-16 00:30:55 +03:00
virtual void Serialize();
2015-02-13 16:59:11 +03:00
2015-02-15 22:27:31 +03:00
uint32_t GetSize();
2015-02-15 22:55:52 +03:00
uint32_t GetSizeOfProc(uint32_t nIndex);
2015-02-15 18:28:27 +03:00
uint32_t GetOffsetOfProcSection();
2015-02-13 16:59:11 +03:00
2015-02-16 00:30:55 +03:00
void Dump();
2015-02-13 16:59:11 +03:00
public:
2015-02-15 22:55:52 +03:00
CProcDescriptor& operator [] (uint32_t nIndex);
2015-02-13 16:59:11 +03:00
private:
2015-02-14 13:39:47 +03:00
// CProcTableArray
2015-02-15 21:30:47 +03:00
typedef std::vector<CProcDescriptor> CProcTableArray;
2015-02-13 16:59:11 +03:00
2015-02-14 13:39:47 +03:00
CProcTableArray m_Table;
2015-02-15 21:30:47 +03:00
std::vector<uint32_t> m_ProcSize;
2015-02-15 18:28:27 +03:00
uint32_t m_ulOffsetOfProcSection;
2015-02-13 16:59:11 +03:00
};
2015-02-15 16:31:38 +03:00
#endif //PROC_TABLE_H