dl
类 | 命名空间 | 类型定义 | 函数
dl_component.h 文件参考

组件系统 更多...

#include <typeinfo>
#include <typeindex>
#include <string>
#include <vector>
#include <array>
#include <functional>
#include "dl_type.h"
#include "dl_align.h"
#include "math/dl_coor.h"

浏览源代码.

类

class  dl::Cpt::Variable< T, UID >
 变量,注意模板参数 需要实例化后不重复 更多...
 
class  dl::Cpt::Function< T, UID >
 
class  dl::AnyType
 任意类型包装 更多...
 
class  dl::VectorAny
 
class  dl::Components
 组件容器还需表示对象自己(比如UI::Text) 更多...
 
class  dl::Cpt::Lang
 语言本地化 更多...
 
class  dl::Cpt::ElementData
 元素通用属性(默认左中对齐,具体看类型) 更多...
 

命名空间

namespace  dl
 
namespace  dl::Cpt
 子组件命名空间
 

类型定义

using dl::Cpt::IsPickup = Function< std::function< bool()>, str_uid("IsPickup")>
 拾取 更多...
 
using dl::Cpt::IsOpen = Function< std::function< bool()>, str_uid("IsOpen")>
 打开 更多...
 
using dl::Cpt::IsClick = Function< std::function< bool()>, str_uid("IsClick")>
 点击 更多...
 
using dl::Cpt::GetCoor = Function< std::function< dl::Coor *()>, str_uid("GetCoor")>
 返回坐标系 更多...
 
using dl::Cpt::GetOrder = Function< std::function< float()>, str_uid("GetOrder")>
 返回order 更多...
 
using dl::Cpt::Update = Function< std::function< void()>, str_uid("Update")>
 逻辑 更多...
 
using dl::Cpt::Render = Function< std::function< void()>, str_uid("Render")>
 绘制 更多...
 
using dl::Cpt::SetOrder = Function< std::function< void(float)>, str_uid("SetOrder")>
 设置order 更多...
 
using dl::Cpt::DeleteThis = Function< std::function< void()>, str_uid("DeleteThis")>
 删除自身 更多...
 

函数

template<typename T >
std::vector< T * > dl::Cpt::Get (std::vector< Components * > &vec)
 从vector<Components*>返回指定类型的所有元素 更多...
 

详细描述

组件系统

版本
1.0
作者
lveyou
日期
22-01-01
注解
用于取代绑定于代码的静态继承关系,动态化功能组件
避免使用std::any,以完全掌控性能
如果没有组件需求,直接使用vector<any>即可
组件仅仅是{AnyType,VectorAny}的组合

在文件 dl_component.h 中定义.