高级会员
注册日期: 06-11
帖子: 1527
精华: 15
现金: 6353 标准币
资产: 6353 标准币
|
node sample
1.CSClassTypeNode.h
// CSClassTypeNode.h: interface for the CSClassTypeNode class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_CSTYPEMAPHELPER_H__CE2B9209_8683_42A8_838D_E07B32A7921B__INCLUDED_)
#define AFX_CSTYPEMAPHELPER_H__CE2B9209_8683_42A8_838D_E07B32A7921B__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "CSTypedef.h"
#include "CSTransient.h"
#include "CSClassTypeHandle.h"
enum EInternalType {
CS_Void,
CS_Char,
CS_ExtChar,
CS_LongInt,
CS_Bool,
CS_Float,
CS_LongDouble,
CS_String,
CS_EString,
CS_EntryAddress,
CS_DataAddress,
CS_EngineHandle,
CS_Long64,
CS_Array
};
enum ELifeWay {
CS_IsNothing,
CS_IsAddress,
CS_IsTransient,
CS_IsPersistent,
CS_IsNotLoaded
};
class CSClassTypeNode
{
public:
// Methods PUBLIC
//
CSClassTypeNode();
CSClassTypeNode(const CS_CString aName,const CS_Integer aLen,const ELifeWay aWayOfLife);
CSClassTypeNode(const CSClassTypeHandle& aType);
CS_EXPORT void Copy(const CSClassTypeNode*& anOther) ;
CS_EXPORT void AddInternalType(const EInternalType aInternalType) ;
CS_EXPORT EInternalType InternalType() const;
CS_EXPORT void AddMethodType(const CS_Boolean aMethodType) ;
CS_EXPORT CS_Boolean MethodType() const;
CS_EXPORT CS_CString Name() const;
CS_EXPORT CS_Integer Length() const;
CS_EXPORT CSClassTypeHandle Type() const;
CS_EXPORT CS_Boolean SubType(const CSClassTypeNode*& pNode) const;
CS_EXPORT void Nullify() ;
CS_EXPORT CS_Boolean IsImported() const;
CS_EXPORT CS_Boolean IsPrimitive() const;
CS_EXPORT CS_Boolean IsUnKnown() const;
CS_EXPORT CS_Boolean IsEnumeration() const;
CS_EXPORT CS_Boolean IsClass() const;
CS_EXPORT CS_Boolean IsPackage() const;
CS_EXPORT void WhatIs() ;
CS_EXPORT CS_Boolean IsPersistent() const;
CS_EXPORT CS_Boolean IsTransient() const;
CS_EXPORT CS_Boolean IsAddress() const;
CS_EXPORT CS_Boolean IsNull() const;
CS_EXPORT CS_Boolean IsNotLoaded() const;
CS_EXPORT CS_Integer HashCode() const;
CS_EXPORT CS_Integer Rank() const;
CS_EXPORT void AddName(const CS_CString aName,const CS_Integer aLen) ;
CS_EXPORT void AddHashCode(const CS_Integer aHash) ;
CS_EXPORT void AddRank(const CS_Integer aRank) ;
CS_EXPORT CSClassTypeNode* Next() const;
CS_EXPORT void AddNext(const CSClassTypeNode*& pNode) ;
CS_EXPORT CSClassTypeNode* NextContainer() const;
CS_EXPORT void AddNextContainer(const CSClassTypeNode*& pNode) ;
CS_EXPORT CS_Integer CaseCmp(const CSClassTypeNode*& anOther) const;
CS_EXPORT void Sort() ;
CS_EXPORT CS_Address InterfacePlugin() const;
CS_EXPORT void SetInterfacePlugin(const CS_Address pInterface) ;
CS_EXPORT void Display() const;
CS_EXPORT void Display(CS_OStream& anOut) const;
CS_EXPORT void ShallowDump() const;
CS_EXPORT void ShallowDump(CS_OStream& anOut) const;
private:
CSClassTypeNode* m_pNext;
CS_Address m_pInterface;
CSClassTypeNode* m_pNextContainer;
CS_CString m_strName;
CS_Integer m_nLength;
EClassType m_eKind;
ELifeWay m_eWay;
EInternalType m_eInternalType;
CS_Integer m_nHashCode;
CS_Integer m_nRank;
CSClassTypeHandle m_hType;
CS_Boolean m_bMethodType;
};
typedef CSClassTypeNode* PCSClassTypeNode;
#endif // !defined(AFX_CSTYPEMAPHELPER_H__CE2B9209_8683_42A8_838D_E07B32A7921B__INCLUDED_)
|