120 lines
2.9 KiB
C++
120 lines
2.9 KiB
C++
/* Header for the definition of 'enum' type lists in the editor*/
|
|
/*////////////////////////////////////////////////////////////////*/
|
|
#ifndef _CTL_ENUM_LISTS_
|
|
#define _CTL_ENUM_LISTS_
|
|
|
|
#if _MSC_VER >= 1000
|
|
#pragma once
|
|
#endif /* _MSC_VER >= 1000*/
|
|
|
|
#include <afxtempl.h>
|
|
|
|
#include "ACP_Base.h"
|
|
|
|
#define LIST_ENUM_ERROR (-1)
|
|
|
|
/*######################################################################################*/
|
|
|
|
class CPA_EXPORT CTL_Editor_EnumElement
|
|
{
|
|
private:
|
|
CTL_Editor_EnumElement(CString _csElementName,
|
|
long _lEnumValue,
|
|
CString _csAdditionalString,
|
|
void *_p_vAdditionnalPointer);
|
|
|
|
~CTL_Editor_EnumElement();
|
|
|
|
/*Attributes*/
|
|
private:
|
|
CString m_pri_csElementName;
|
|
CString m_pri_csAdditionalString;
|
|
long m_pri_lEnumValue;
|
|
void *m_pri_p_vAdditionnalPointer;
|
|
|
|
/*Functions*/
|
|
public:
|
|
/*GetSet functions*/
|
|
/*//////////////////*/
|
|
|
|
/*Value*/
|
|
void m_pub_fn_vSetValue(long);
|
|
long m_pub_fn_lGetValue();
|
|
|
|
/*Element Name*/
|
|
void m_pub_fn_vSetElementName(CString _csNewString);
|
|
CString m_pub_fn_csGetElementName();
|
|
|
|
/*Additional String*/
|
|
void m_pub_fn_vSetAdditionalString(CString _csNewString);
|
|
CString m_pub_fn_csGetAdditionalString();
|
|
|
|
/*Additionnal Pointer*/
|
|
void m_pub_fn_vSetAdditionnalPointer(void *_p_vAdditionnalPointer);
|
|
void *m_pub_fn_pvGetAdditionnalPointer();
|
|
|
|
friend class CTL_Editor_EnumDescriptor;
|
|
};
|
|
|
|
/*######################################################################################*/
|
|
|
|
class CPA_EXPORT CTL_Editor_EnumDescriptor : public CList<CTL_Editor_EnumElement *, CTL_Editor_EnumElement *>
|
|
{
|
|
public:
|
|
CTL_Editor_EnumDescriptor(CString,
|
|
unsigned char ucSize);
|
|
~CTL_Editor_EnumDescriptor();
|
|
|
|
/*Attributes*/
|
|
public:
|
|
CString m_csEnumName;
|
|
|
|
private:
|
|
/*The size of the Enum codage (in bytes)*/
|
|
unsigned char m_ucEnumSize;
|
|
|
|
/*Functions*/
|
|
public:
|
|
void m_fn_vEmptyList();
|
|
CTL_Editor_EnumElement *m_fn_pclAddElement(CString _csElementName,
|
|
long _lEnumValue = LIST_ENUM_ERROR,
|
|
CString _csAdditionalString = "",
|
|
void *_p_vAdditionnalPointer = NULL);
|
|
|
|
/*Search functions*/
|
|
CString m_fn_csGetStringFromEnumIndex(long lEnumIndex);
|
|
CTL_Editor_EnumElement *m_fn_pclGetElementFromEnumIndex(long lEnumIndex);
|
|
CTL_Editor_EnumElement *m_fn_pclGetElementFromString(CString _csStringToFind);
|
|
|
|
unsigned char m_fn_ucGetEnumSize();
|
|
|
|
private:
|
|
|
|
};
|
|
|
|
/*######################################################################################*/
|
|
|
|
class CPA_EXPORT CTL_Editor_EnumDescriptorList : public CList<CTL_Editor_EnumDescriptor *, CTL_Editor_EnumDescriptor *>
|
|
{
|
|
public:
|
|
CTL_Editor_EnumDescriptorList();
|
|
~CTL_Editor_EnumDescriptorList();
|
|
|
|
/*Attributes*/
|
|
public:
|
|
|
|
private:
|
|
CString m_csEnumName;
|
|
|
|
/*Functions*/
|
|
public:
|
|
CTL_Editor_EnumDescriptor *m_fn_pclGetEnumDescriptorByName(CString csDescriptorName);
|
|
|
|
private:
|
|
|
|
};
|
|
|
|
|
|
#endif /*_CTL_ENUM_LISTS_*/
|
|
|