List模板改名为ArrayList

This commit is contained in:
2025-04-23 00:27:43 +08:00
parent 10d0c2c473
commit aed57437f9
36 changed files with 66 additions and 63 deletions

View File

@@ -109,12 +109,12 @@ public:
ComponentSet & GetComponents(){return component_set;}
int GetComponents(List<Component *> &comp_list,SceneNode *);
int GetComponents(ArrayList<Component *> &comp_list,SceneNode *);
virtual void UpdateComponents(const double delta_time);
virtual void JoinComponent(Component *c){if(!c)return;component_set.Add(c);}
virtual void UnjonComponent(Component *c){if(!c)return;component_set.Delete(c);}
virtual void AttachComponent(Component *c){if(!c)return;component_set.Add(c);}
virtual void DetachComponent(Component *c){if(!c)return;component_set.Delete(c);}
public: //事件

View File

@@ -29,8 +29,8 @@ namespace hgl
const int compare(const RenderNode &)const override;
};
using RenderNodeList=List<RenderNode>;
using RenderNodePointerList=List<RenderNode *>;
using RenderNodeList=ArrayList<RenderNode>;
using RenderNodePointerList=ArrayList<RenderNode *>;
using MaterialInstanceSets=SortedSet<MaterialInstance *>; ///<材质实例集合
}//namespace graph

View File

@@ -119,7 +119,7 @@ namespace hgl
bool Contains (Component *comp) {return ComponentList.Contains(comp);} ///<是否包含指定组件
bool HasComponent (const ComponentManager *); ///<是否有指定组件管理器的组件
virtual int GetComponents (List<Component *> &comp_list,const ComponentManager *); ///<取得所有组件
virtual int GetComponents (ArrayList<Component *> &comp_list,const ComponentManager *); ///<取得所有组件
};//class SceneNode

View File

@@ -37,7 +37,7 @@ namespace hgl
DeviceBuffer *tile_buffer; ///<Tile暂存缓冲区
List<Image2DRegion> commit_list;
ArrayList<Image2DRegion> commit_list;
uint8 *commit_ptr;
bool CommitTile(TileObject *,const void *,const uint,const int,const int); ///<提交一个Tile数据

View File

@@ -18,7 +18,7 @@ class DescriptorSet
ObjectList<VkDescriptorBufferInfo> vab_list;
ObjectList<VkDescriptorImageInfo> image_list;
List<VkWriteDescriptorSet> wds_list;
ArrayList<VkWriteDescriptorSet> wds_list;
SortedSet<uint32_t> binded_sets;

View File

@@ -34,7 +34,7 @@ struct GPUDeviceAttribute
VkQueue present_queue =VK_NULL_HANDLE;
VkSurfaceFormatKHR surface_format;
List<VkPresentModeKHR> present_modes;
ArrayList<VkPresentModeKHR> present_modes;
VkSurfaceTransformFlagBitsKHR preTransform;
VkCompositeAlphaFlagBitsKHR compositeAlpha =VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR;

View File

@@ -101,8 +101,8 @@ VK_NAMESPACE_BEGIN
};//class VulkanInstance
void InitVulkanInstanceProperties();
const List<VkLayerProperties> & GetInstanceLayerProperties();
const List<VkExtensionProperties> & GetInstanceExtensionProperties();
const ArrayList<VkLayerProperties> & GetInstanceLayerProperties();
const ArrayList<VkExtensionProperties> & GetInstanceExtensionProperties();
const bool CheckInstanceLayerSupport(const AnsiString &);
const bool GetInstanceLayerVersion(const AnsiString &,uint32_t &spec,uint32_t &impl);
const bool CheckInstanceExtensionSupport(const AnsiString &);

View File

@@ -11,8 +11,10 @@ namespace hgl
{
class ActiveMemoryBlockManager;
}
VK_NAMESPACE_BEGIN
using ShaderStageCreateInfoList=List<VkPipelineShaderStageCreateInfo>;
using ShaderStageCreateInfoList=ArrayList<VkPipelineShaderStageCreateInfo>;
/**
* 材质类<br>

View File

@@ -23,9 +23,9 @@ class GPUPhysicalDevice
VkPhysicalDeviceVulkan14Properties properties14;
VkPhysicalDeviceMemoryProperties memory_properties;
List<VkLayerProperties> layer_properties;
List<VkExtensionProperties> extension_properties;
List<VkQueueFamilyProperties> queue_family_properties;
ArrayList<VkLayerProperties> layer_properties;
ArrayList<VkExtensionProperties> extension_properties;
ArrayList<VkQueueFamilyProperties> queue_family_properties;
private:

View File

@@ -16,7 +16,7 @@ class RenderPass
VkPipelineCache pipeline_cache;
VkRenderPass render_pass;
List<VkFormat> color_formats;
ArrayList<VkFormat> color_formats;
VkFormat depth_format;
VkExtent2D granularity;
@@ -31,7 +31,7 @@ private:
friend class RenderPassManager;
RenderPass(VkDevice d,VkPipelineCache pc,VkRenderPass rp,const List<VkFormat> &cf,VkFormat df);
RenderPass(VkDevice d,VkPipelineCache pc,VkRenderPass rp,const ArrayList<VkFormat> &cf,VkFormat df);
public:
@@ -43,7 +43,7 @@ public:
const VkPipelineCache GetPipelineCache()const{return pipeline_cache;}
const uint GetColorCount()const{return color_formats.GetCount();}
const List<VkFormat> & GetColorFormat()const{return color_formats;}
const ArrayList<VkFormat> & GetColorFormat()const{return color_formats;}
const VkFormat GetColorFormat(int index)const
{
if(index<0||index>=color_formats.GetCount())return VK_FORMAT_UNDEFINED;

View File

@@ -38,7 +38,7 @@ namespace hgl
virtual ~TileFont();
bool Registry(TileUVFloatMap &,SortedSet<u32char> &chars_sets); ///<注册要使用的字符
void Unregistry(const List<u32char> &); ///<注销要使用的字符
void Unregistry(const ArrayList<u32char> &); ///<注销要使用的字符
};//class TileFont
}//namespace graph
}//namespace hgl

View File

@@ -11,7 +11,7 @@ class GraphModuleManager
protected:
List<GraphModule *> module_list;
ArrayList<GraphModule *> module_list;
Map<size_t,GraphModule *> module_map;
public:

View File

@@ -28,9 +28,9 @@ private:
private:
RenderPass * CreateRenderPass( const List<VkAttachmentDescription> &desc_list,
const List<VkSubpassDescription> &subpass,
const List<VkSubpassDependency> &dependency,
RenderPass * CreateRenderPass( const ArrayList<VkAttachmentDescription> &desc_list,
const ArrayList<VkSubpassDescription> &subpass,
const ArrayList<VkSubpassDependency> &dependency,
const RenderbufferInfo *);
public:

View File

@@ -20,7 +20,7 @@ public:
public: //FrameBuffer相关
Framebuffer *CreateFBO(RenderPass *rp,ImageView **color_list,const uint image_count,ImageView *depth);
// Framebuffer *CreateFBO(RenderPass *,List<ImageView *> &color,ImageView *depth);
// Framebuffer *CreateFBO(RenderPass *,ArrayList<ImageView *> &color,ImageView *depth);
Framebuffer *CreateFBO(RenderPass *,ImageView *color,ImageView *depth);
Framebuffer *CreateFBO(RenderPass *,ImageView *);

View File

@@ -91,11 +91,11 @@ public: //Create/Chagne
void Clear(TextureCreateInfo *);
bool ChangeTexture2D(Texture2D *,DeviceBuffer *buf, const List<Image2DRegion> &,VkPipelineStageFlags=VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT);
bool ChangeTexture2D(Texture2D *,DeviceBuffer *buf, const ArrayList<Image2DRegion> &,VkPipelineStageFlags=VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT);
bool ChangeTexture2D(Texture2D *,DeviceBuffer *buf, const RectScope2ui &, VkPipelineStageFlags=VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT);
bool ChangeTexture2D(Texture2D *,const void *data,const VkDeviceSize size, const RectScope2ui &, VkPipelineStageFlags=VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT);
// bool ChangeTexture2DArray(Texture2DArray *,DeviceBuffer *buf, const List<Image2DRegion> &, const uint32_t base_layer,const uint32_t layer_count,VkPipelineStageFlags=VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT);
// bool ChangeTexture2DArray(Texture2DArray *,DeviceBuffer *buf, const ArrayList<Image2DRegion> &, const uint32_t base_layer,const uint32_t layer_count,VkPipelineStageFlags=VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT);
bool ChangeTexture2DArray(Texture2DArray *,DeviceBuffer *buf, const RectScope2ui &, const uint32_t base_layer,const uint32_t layer_count,VkPipelineStageFlags=VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT);
bool ChangeTexture2DArray(Texture2DArray *,const void *data,const VkDeviceSize size,const RectScope2ui &, const uint32_t base_layer,const uint32_t layer_count,VkPipelineStageFlags=VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT);

View File

@@ -274,7 +274,7 @@ struct ShaderVariable
Interpolation interpolation; //插值方式
};
using SVList=List<ShaderVariable>;
using SVList=ArrayList<ShaderVariable>;
struct ShaderVariableArray:public Comparator<ShaderVariableArray>
{

View File

@@ -37,7 +37,7 @@ protected:
AnsiString mi_codes;
List<const char *> function_list;
ArrayList<const char *> function_list;
AnsiString main_function;
AnsiString final_shader;

View File

@@ -9,8 +9,8 @@
namespace hgl{namespace graph
{
using UBODescriptorList=List<const UBODescriptor *>;
using SamplerDescriptorList=List<const SamplerDescriptor *>;
using UBODescriptorList=ArrayList<const UBODescriptor *>;
using SamplerDescriptorList=ArrayList<const SamplerDescriptor *>;
using ConstValueDescriptorList=ObjectList<ConstValueDescriptor>;
using SubpassInputDescriptorList=ObjectList<SubpassInputDescriptor>;