YSTest  PreAlpha_b400_20130424
The YSLib Test Project
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义  
YSLib 命名空间参考

命名空间

namespace  Devices
 
namespace  Drawing
 图形处理。
 
namespace  IO
 
namespace  Messaging
 
namespace  Shells
 
namespace  Text
 
namespace  Timers
 
namespace  UI
 

struct  GSStringTemplate
 
class  MemoryList
 内存块列表。 更多...
 
class  ValueNode
 值类型节点。 更多...
 
class  Application
 程序实例。 更多...
 
class  GMCounter
 模板类实例计数器。 更多...
 
struct  MoreConvertible
 转换类型选择。 更多...
 
struct  SelectConvertible
 转换类型选择。 更多...
 
struct  delete_obj_ndebug
 delete 仿函数。 更多...
 
struct  delete_second_mem_ndebug
 delete 第二成员仿函数。 更多...
 
struct  delete_obj_debug
 delete 仿函数(调试版本)。 更多...
 
struct  delete_second_mem_debug
 delete 第二成员仿函数。 更多...
 
struct  safe_delete_obj
 带置空指针操作的 delete 仿函数。 更多...
 
struct  GIHEvent
 事件处理器接口模板。 更多...
 
class  GHEvent< _tRet(_tParams...)>
 
class  GEvent< _tRet(_tParams...)>
 
class  GDependencyEvent
 依赖事件项类模板。 更多...
 
class  GEventWrapper
 事件处理器包装类模板。 更多...
 
class  GEventPointerWrapper
 事件项类型。 更多...
 
class  LoggedEvent
 
class  FatalError
 非日志记录的致命错误。 更多...
 
struct  ExpandMemberFirst
 仿函数:替换非静态成员二元函数的第一个参数。 更多...
 
struct  ExpandMemberFirstBinder
 仿函数:替换非静态成员二元函数的第一个参数并绑定到指定对象。 更多...
 
struct  OwnershipTag
 指定对于参数指定类型的成员具有所有权的标签。 更多...
 
struct  MoveTag
 指示转移的标记。 更多...
 
struct  PointerTag
 指示指针的标记。 更多...
 
struct  HasOwnershipOf
 标签类型元运算。 更多...
 
struct  IValueHolder
 带等于接口的动态泛型持有者接口。 更多...
 
class  ValueHolder
 带等于接口的值类型动态泛型持有者。 更多...
 
class  PointerHolder
 带等于接口的指针类型动态泛型持有者。 更多...
 
class  ValueObject
 值类型对象类。 更多...
 
class  GDependency
 依赖项类模板。 更多...
 
class  GMRange
 范围模块类。 更多...
 
class  GStaticCache
 全局静态单态存储器。 更多...
 
class  GLocalStaticCache
 全局局部静态单态存储器。 更多...
 
class  File
 文件基类。 更多...
 
class  TextFile
 文本文件类。 更多...
 
struct  IResource
 资源接口。 更多...
 

类型定义

typedef GSStringTemplate< char >
::basic_string 
string
 
typedef GSStringTemplate
< CHRLib::ucs2_t >
::basic_string 
ucs2string
 
typedef GSStringTemplate
< CHRLib::ucs4_t >
::basic_string 
ucs4string
 
typedef u8 EventPriority
 事件优先级。
 
typedef std::exception Exception
 YSLib 异常基类。
 
typedef std::runtime_error GeneralEvent
 一般运行时异常事件类。
 
typedef std::uint8_t u8
 通用数据类型。
 
typedef std::uint16_t u16
 
typedef std::uint32_t u32
 
typedef std::uint64_t u64
 
typedef std::int8_t s8
 
typedef std::int16_t s16
 
typedef std::int32_t s32
 
typedef std::int64_t s64
 
typedef volatile u8 vu8
 
typedef volatile u16 vu16
 
typedef volatile u32 vu32
 
typedef volatile u64 vu64
 
typedef volatile s8 vs8
 
typedef volatile s16 vs16
 
typedef volatile s32 vs32
 
typedef volatile s64 vs64
 

函数

YF_API MemoryListGetDebugMemoryList ()
 取调试用内存块列表。
 
template<typename _type >
bool reset (_type *&p) ynothrow
 
template<typename _type >
bool operator== (const shared_ptr< _type > &sp, _type *p)
 比较: shared_ptr 左值和内建指针类型的相等关系。
 
template<typename _type >
bool operator== (shared_ptr< _type > &&sp, _type *p)
 比较: shared_ptr 右值和内建指针类型的相等关系。
 
template<typename _type >
bool operator!= (const shared_ptr< _type > &sp, _type *p)
 比较: shared_ptr 左值和内建指针类型的不等关系。
 
template<typename _type >
bool operator!= (shared_ptr< _type > &&sp, _type *p)
 比较: shared_ptr 右值和内建指针类型的不等关系。
 
template<typename _type >
_type & Access (const ValueNode &node)
 访问节点的指定类型对象。

异常
std::bad_cast空实例或类型检查失败 。

 
template<typename _type >
_type * AccessPtr (const ValueNode &node) ynothrow
 访问节点的指定类型对象指针。
 
YF_API const ValueNodeAccessNode (const ValueNode::Container &, const string &)
 访问容器中的节点。
 
template<typename _type >
_type & AccessChild (ValueNode &node, const string &name)
 访问指定名称的子节点的指定类型对象。

异常
std::bad_cast空实例或类型检查失败 。

 
template<typename _type >
const _type & AccessChild (const ValueNode &node, const string &name)
 访问指定名称的子节点的指定类型 const 对象。

异常
std::bad_cast空实例或类型检查失败 。

 
template<typename _tString , typename... _tParams>
ValueNode MakeNode (_tString &&name, _tParams &&...args)
 取指定名称和退化参数的值类型节点。
 
template<typename _tString , typename... _tParams>
ValueNode StringifyToNode (_tString &&name, _tParams &&...args)
 取指定名称和转换为字符串的值类型节点。
 
template<class _tPack >
ValueNode UnpackToNode (_tPack &&pk)
 从参数取以指定分量为初始化参数的值类型节点。
 
template<typename... _tParams>
unique_ptr< ValueNode::ContainerCollectNodes (_tParams &&...args)
 取指定值类型节点为成员的节点容器。
 
template<typename _tString , typename... _tParams>
ValueNode PackNodes (_tString &&name, _tParams &&...args)
 取以指定分量为参数对应初始化得到的值类型节点为子节点的值类型节点。
 
YF_API ApplicationFetchAppInstance () ynothrow
 取应用程序实例。
 
shared_ptr< Shell > FetchShellHandle () ynothrow
 取当前应用程序线程空间中活动的 Shell 句柄。
 
bool Activate (const shared_ptr< Shell > &hShl)
 激活 Shell 对象:控制权转移给此对象以维持单线程运行。
 
YF_API void PostQuitMessage (int nExitCode, Messaging::Priority p=0xF0)
 以优先级 p 发起 Shell 终止请求,返回 nExitCode。
 
yconstfn int FetchZero () ynothrow
 取整数类型的零元素。
 
yconstfn s8 FetchSign (int a, int b=0) ynothrow
 整数类型符号函数。
 
template<typename _type >
yconstfn s8 FetchSign (const _type &a, const _type &b=FetchZero< _type >()) ynothrow
 符号函数。
 
yconstfn int FetchSignFromInterval (int d, int a, int b) ynothrow
 判断整数 d 和以 [a, b](a ≤ b) 或 [b, a](a > b) 区间的关系。
 
template<typename _type >
yconstfn int FetchSignFromInterval (const _type &d, const _type &a, const _type &b) ynothrow
 判断 d 和以 [a, b](a ≤ b) 或 [b, a](a > b) 区间的关系。
 
template<typename _type >
bool IsInInterval (_type i, _type b) ynothrow
 判断 i 是否在左闭右开区间 [FetchZero<_type>(), b) 中。
 
template<typename _type >
bool IsInInterval (_type i, _type a, _type b) ynothrow
 判断 i 是否在左闭右开区间 [a, b) 中。
 
template<typename _type >
bool IsInOpenInterval (_type i, _type b) ynothrow
 判断 i 是否在开区间 (FetchZero<_type>(), b) 内。
 
template<typename _type >
bool IsInOpenInterval (_type i, _type a, _type b) ynothrow
 判断 i 是否在开区间 (a, b) 内。
 
template<typename _type >
size_t SwitchInterval (_type v, const _type *a, size_t n) ynothrow
 计算满足指定的值 v 在区间 [a[i], a[i + 1]) 内最小的 i 。
 
template<typename _type >
size_t SwitchAddedInterval (_type v, const _type *a, size_t n) ynothrow
 计算满足指定的值 v 在区间 [b(i), b(i + 1)) 内的最小的 i ; 其中 b(i) 是 a[i] 前 i 项的和。
 
template<typename _type >
void RestrictInClosedInterval (_type &i, int a, int b) ynothrow
 约束整数 i 在闭区间 [a, b] 中。
 
template<typename _type >
void RestrictInInterval (_type &i, int a, int b) ynothrow
 约束整数 i 在左闭右开区间 [a, b) 中。
 
template<typename _type >
void RestrictUnsignedStrict (_type &u, unsigned b) ynothrow
 约束无符号整数 u 在区间上界 b 内。
 
template<typename _type >
void RestrictUnsigned (_type &u, unsigned b) ynothrow
 约束无符号整数 u 在左闭右开区间 [0, b) 中。
 
template<typename _type >
void RestrictLessEqual (_type &a, _type &b) ynothrow
 约束关系:a ≤ b 。
 
template<typename _tOut >
void ClearSequence (_tOut dst, size_t n) ynothrow
 清除指定的连续对象。
 
template<typename _type >
yconstfn auto CloneNonpolymorphic (const _type &p) -> decltype(&*p)
 使用 new 复制指定指针指向的对象。
 
template<class _type >
auto ClonePolymorphic (const _type &p) -> decltype(&*p)
 使用 Clone 成员函数复制指定指针指向的多态类类型对象。
 
yconstexpr EventPriority DefaultEventPriority (0x80)
 默认事件优先级。
 
template<typename _type >
ValueObject MakeValueObjectByPtr (_type *p)
 使用指针构造 ValueObject 实例。
 
template<typename _type >
_type FetchInstance ()
 取指定类型的无参数构造的对象。
 
template<typename _type >
_type & FetchStaticRef ()
 取指定类型的静态默认对象。
 
template<typename _type >
const _type & FetchPrototype ()
 取指定类型的静态原型对象。
 
template<typename _tChar >
Fileoperator>> (File &f, typename std::char_traits< _tChar >::char_type &c)
 从指定文件读字符。
 
template<typename _tString >
Fileoperator>> (File &f, _tString &str)
 从指定文件读空白符分隔的字符串。
 
Fileoperator<< (File &f, char c)
 向指定文件写字符。
 
Fileoperator<< (File &f, const char *str)
 向指定文件写字符串。
 
template<typename _tString >
Fileoperator<< (File &f, const _tString &str)
 向指定文件写字符串。
 
auto begin (ValueNode &node) -> decltype(node.GetBegin())
 迭代器包装,用于 range-based for 。
 
auto begin (const ValueNode &node) -> decltype(node.GetBegin())
 
auto end (ValueNode &node) -> decltype(node.GetEnd())
 
auto end (const ValueNode &node) -> decltype(node.GetEnd())
 
const ValueNodeUnpackToNode (const ValueNode &arg)
 从引用参数取值类型节点:返回自身。
 
ValueNode && UnpackToNode (ValueNode &&arg)
 
YF_API void PostMessage (const Message &, Messaging::Priority) ynothrow
 全局默认队列消息发送函数。
 
void PostMessage (Messaging::ID id, Messaging::Priority prior, const ValueObject &vo={}) ynothrow
 
void PostMessage (Messaging::ID id, Messaging::Priority prior, ValueObject &&c) ynothrow
 
template<Messaging::MessageID _vID>
void PostMessage (Messaging::Priority prior, const typename Messaging::SMessageMap< _vID >::TargetType &target) ynothrow
 
template<typename _tRet , typename... _tParams>
GEvent< _tRet(_tParams...)> & AddUnique (GEvent< _tRet(_tParams...)> &evt, const typename GEvent< _tRet(_tParams...)>::HandlerType &h, EventPriority prior=DefaultEventPriority)
 添加单一事件响应:删除后添加。
 
template<typename _tRet , typename... _tParams>
GEvent< _tRet(_tParams...)> & AddUnique (GEvent< _tRet(_tParams...)> &evt, typename GEvent< _tRet(_tParams...)>::HandlerType &&h, EventPriority prior=DefaultEventPriority)
 
template<typename _type , typename _tRet , typename... _tParams>
GEvent< _tRet(_tParams...)> & AddUnique (GEvent< _tRet(_tParams...)> &evt, _type &&arg, EventPriority prior=DefaultEventPriority)
 
template<class _type , typename _tRet , typename... _tParams>
GEvent< _tRet(_tParams...)> & AddUnique (GEvent< _tRet(_tParams...)> &evt, _type &obj, void(_type::*pm)(typename GEvent< _tRet(_tParams...)>::EventArgsType), EventPriority prior=DefaultEventPriority)
 

变量

yconstexpr char BOM_UTF_16LE [] {"\xFF\xFE"}
 Unicode 编码模式标记。
 
yconstexpr char BOM_UTF_16BE [] {"\xFE\xFF"}
 
yconstexpr char BOM_UTF_8 [] {"\xEF\xBB\xBF"}
 
yconstexpr char BOM_UTF_32LE [] {"\xFF\xFE\x00\x00"}
 
yconstexpr char BOM_UTF_32BE [] {"\x00\x00\xFE\xFF"}
 

类型定义说明

事件优先级。

自从
build 294

在文件 yevt.hpp188 行定义.

typedef std::exception YSLib::Exception

YSLib 异常基类。

在文件 yexcept.h39 行定义.

typedef std::runtime_error YSLib::GeneralEvent

一般运行时异常事件类。

在文件 yexcept.h43 行定义.

typedef std::int16_t YSLib::s16

在文件 yadaptor.h73 行定义.

typedef std::int32_t YSLib::s32

在文件 yadaptor.h74 行定义.

typedef std::int64_t YSLib::s64

在文件 yadaptor.h75 行定义.

typedef std::int8_t YSLib::s8

在文件 yadaptor.h72 行定义.

typedef GSStringTemplate<char>::basic_string YSLib::string

在文件 ycont.h155 行定义.

typedef std::uint16_t YSLib::u16

在文件 yadaptor.h69 行定义.

typedef std::uint32_t YSLib::u32

在文件 yadaptor.h70 行定义.

typedef std::uint64_t YSLib::u64

在文件 yadaptor.h71 行定义.

typedef std::uint8_t YSLib::u8

通用数据类型。

自从
build 245

在文件 yadaptor.h68 行定义.

在文件 ycont.h158 行定义.

在文件 ycont.h159 行定义.

typedef volatile s16 YSLib::vs16

在文件 yadaptor.h81 行定义.

typedef volatile s32 YSLib::vs32

在文件 yadaptor.h82 行定义.

typedef volatile s64 YSLib::vs64

在文件 yadaptor.h83 行定义.

typedef volatile s8 YSLib::vs8

在文件 yadaptor.h80 行定义.

typedef volatile u16 YSLib::vu16

在文件 yadaptor.h77 行定义.

typedef volatile u32 YSLib::vu32

在文件 yadaptor.h78 行定义.

typedef volatile u64 YSLib::vu64

在文件 yadaptor.h79 行定义.

typedef volatile u8 YSLib::vu8

在文件 yadaptor.h76 行定义.

函数说明

template<typename _type >
_type& YSLib::Access ( const ValueNode &  node)
inline

访问节点的指定类型对象。

异常
std::bad_cast空实例或类型检查失败 。

自从
build 399

在文件 ValueNode.h213 行定义.

参考 YSLib::ValueObject::Access() , 以及 YSLib::ValueNode::Value.

函数调用图:

template<typename _type >
_type& YSLib::AccessChild ( ValueNode &  node,
const string &  name 
)
inline

访问指定名称的子节点的指定类型对象。

异常
std::bad_cast空实例或类型检查失败 。

自从
build 334

在文件 ValueNode.h244 行定义.

参考 YSLib::ValueNode::GetNode().

函数调用图:

template<typename _type >
const _type& YSLib::AccessChild ( const ValueNode &  node,
const string &  name 
)
inline

访问指定名称的子节点的指定类型 const 对象。

异常
std::bad_cast空实例或类型检查失败 。

自从
build 334

在文件 ValueNode.h255 行定义.

参考 YSLib::ValueNode::GetNode().

函数调用图:

YF_API const ValueNode& YSLib::AccessNode ( const ValueNode::Container &  ,
const string &   
)

访问容器中的节点。

自从
build 399
template<typename _type >
_type* YSLib::AccessPtr ( const ValueNode &  node)
inline

访问节点的指定类型对象指针。

自从
build 399

在文件 ValueNode.h224 行定义.

参考 YSLib::ValueObject::AccessPtr() , 以及 YSLib::ValueNode::Value.

函数调用图:

template<typename _tRet , typename... _tParams>
GEvent<_tRet(_tParams...)>& YSLib::AddUnique ( GEvent< _tRet(_tParams...)> &  evt,
const typename GEvent< _tRet(_tParams...)>::HandlerType &  h,
EventPriority  prior = DefaultEventPriority 
)
inline

添加单一事件响应:删除后添加。

自从
build 333

在文件 yevt.hpp465 行定义.

参考 YSLib::GEvent< _tRet(_tParams...)>::Add().

参考自 AddUnique().

函数调用图:

这是这个函数的调用关系图:

template<typename _tRet , typename... _tParams>
GEvent<_tRet(_tParams...)>& YSLib::AddUnique ( GEvent< _tRet(_tParams...)> &  evt,
typename GEvent< _tRet(_tParams...)>::HandlerType &&  h,
EventPriority  prior = DefaultEventPriority 
)
inline

在文件 yevt.hpp473 行定义.

参考 YSLib::GEvent< _tRet(_tParams...)>::Add() , 以及 h.

函数调用图:

template<typename _type , typename _tRet , typename... _tParams>
GEvent<_tRet(_tParams...)>& YSLib::AddUnique ( GEvent< _tRet(_tParams...)> &  evt,
_type &&  arg,
EventPriority  prior = DefaultEventPriority 
)
inline

在文件 yevt.hpp480 行定义.

参考 AddUnique() , 以及 yforward.

函数调用图:

template<class _type , typename _tRet , typename... _tParams>
GEvent<_tRet(_tParams...)>& YSLib::AddUnique ( GEvent< _tRet(_tParams...)> &  evt,
_type &  obj,
void(_type::*)(typename GEvent< _tRet(_tParams...)>::EventArgsType)  pm,
EventPriority  prior = DefaultEventPriority 
)
inline

在文件 yevt.hpp487 行定义.

参考 AddUnique().

函数调用图:

template<typename _tOut >
void YSLib::ClearSequence ( _tOut  dst,
size_t  n 
)
inline

清除指定的连续对象。

前置条件
设类型 T 为 std::remove_reference<decltype(*dst)>::type, 则应满足 std::is_pod<T> || (std::is_nothrow_default_constructible<T>::value && std::is_nothrow_assignable<T, T>::value)
注解
忽略空指针和零长度。
自从
build 322

在文件 ycutil.h333 行定义.

参考 YB_LIKELY.

参考自 YSLib::Drawing::ClearPixel().

这是这个函数的调用关系图:

template<typename _type >
yconstfn auto YSLib::CloneNonpolymorphic ( const _type &  p) -> decltype(&*p)

使用 new 复制指定指针指向的对象。

自从
build 240

在文件 ycutil.h457 行定义.

参考自 YSLib::GDependency< _tEvent, _tOwnerPointer >::GetCopyOnWritePtr().

这是这个函数的调用关系图:

template<class _type >
auto YSLib::ClonePolymorphic ( const _type &  p) -> decltype(&*p)

使用 Clone 成员函数复制指定指针指向的多态类类型对象。

前置条件
断言: std::is_polymorphic<decltype(*p)>::value 。
自从
build 240

在文件 ycutil.h469 行定义.

template<typename... _tParams>
unique_ptr<ValueNode::Container> YSLib::CollectNodes ( _tParams &&...  args)
inline

取指定值类型节点为成员的节点容器。

自从
build 399

在文件 ValueNode.h319 行定义.

参考 ystdex::seq_insert() , 以及 yforward.

参考自 PackNodes().

函数调用图:

这是这个函数的调用关系图:

yconstexpr EventPriority YSLib::DefaultEventPriority ( 0x80  )

默认事件优先级。

自从
build 294
YF_API Application& YSLib::FetchAppInstance ( )

取应用程序实例。

注解
保证在平台相关的全局资源初始化之后初始化此实例。
警告
初始化前不保证线程安全性。
自从
build 398

在文件 GUIApplication.cpp180 行定义.

参考 FetchGlobalInstance().

参考自 Activate(),YSLib::Shells::Shell::DefShlProc(),FetchShellHandle(),YSLib::Shells::Shell::IsActive(),IsNowShell() , 以及 PostMessage().

函数调用图:

这是这个函数的调用关系图:

template<typename _type >
_type YSLib::FetchInstance ( )
inline

取指定类型的无参数构造的对象。

自从
build 241

在文件 ystorage.hpp42 行定义.

template<typename _type >
const _type& YSLib::FetchPrototype ( )
inline

取指定类型的静态原型对象。

警告
初始化前非线程安全。
自从
build 240

在文件 ystorage.hpp68 行定义.

yconstfn s8 YSLib::FetchSign ( int  a,
int  b = 0 
)

整数类型符号函数。

注解
a < b 则返回 -1 ,否则若 a = b 则返回 0 ,否则返回 1 。
自从
build 319

在文件 ycutil.h97 行定义.

参考自 FetchSignFromInterval().

这是这个函数的调用关系图:

template<typename _type >
yconstfn s8 YSLib::FetchSign ( const _type &  a,
const _type &  b = FetchZero<_type>() 
)

符号函数。

注解
a < b 则返回 -1 ,否则若 a = b 则返回 0 ,否则返回 1 。
自从
build 319

在文件 ycutil.h108 行定义.

yconstfn int YSLib::FetchSignFromInterval ( int  d,
int  a,
int  b 
)

判断整数 d 和以 [a, b](a ≤ b) 或 [b, a](a > b) 区间的关系。

返回
< 0 :d 在区间外;
= 0 :d 在区间端点上;
> 0 :d 在区间内。
注解
无精度修正。
自从
build 319

在文件 ycutil.h122 行定义.

参考 FetchSign().

函数调用图:

template<typename _type >
yconstfn int YSLib::FetchSignFromInterval ( const _type &  d,
const _type &  a,
const _type &  b 
)

判断 d 和以 [a, b](a ≤ b) 或 [b, a](a > b) 区间的关系。

返回
< 0 :d 在区间外;
= 0 :d 在区间端点上;
> 0 :d 在区间内。
注解
无精度修正。
自从
build 319

在文件 ycutil.h136 行定义.

参考 FetchSign().

函数调用图:

template<typename _type >
_type& YSLib::FetchStaticRef ( )
inline

取指定类型的静态默认对象。

警告
非线程安全。
自从
build 240

在文件 ystorage.hpp54 行定义.

yconstfn _type YSLib::FetchZero ( )

取整数类型的零元素。

取指定类型的零元素。

自从
build 319

在文件 ycutil.h76 行定义.

YF_API MemoryList& YSLib::GetDebugMemoryList ( )

取调试用内存块列表。

自从
build 203
template<typename _type >
bool YSLib::IsInInterval ( _type  i,
_type  b 
)
inline

判断 i 是否在左闭右开区间 [FetchZero<_type>(), b) 中。

前置条件
断言: FetchZero<_type>() < b
自从
build 319

在文件 ycutil.h148 行定义.

参考 YAssert.

参考自 DeclResource(),YSLib::UI::Menu::IsItemEnabled(),YSLib::UI::Menu::operator+=(),YSLib::UI::Menu::operator-=() , 以及 YSLib::UI::Menu::SetItemEnabled().

这是这个函数的调用关系图:

template<typename _type >
bool YSLib::IsInInterval ( _type  i,
_type  a,
_type  b 
)
inline

判断 i 是否在左闭右开区间 [a, b) 中。

前置条件
断言: a < b
自从
build 319

在文件 ycutil.h162 行定义.

参考 YAssert.

template<typename _type >
bool YSLib::IsInOpenInterval ( _type  i,
_type  b 
)
inline

判断 i 是否在开区间 (FetchZero<_type>(), b) 内。

前置条件
断言: FetchZero<_type>() < b
自从
build 319

在文件 ycutil.h176 行定义.

参考 YAssert.

template<typename _type >
bool YSLib::IsInOpenInterval ( _type  i,
_type  a,
_type  b 
)
inline

判断 i 是否在开区间 (a, b) 内。

前置条件
断言: a < b
自从
build 319

在文件 ycutil.h190 行定义.

参考 YAssert.

template<typename _tString , typename... _tParams>
ValueNode YSLib::MakeNode ( _tString &&  name,
_tParams &&...  args 
)
inline

取指定名称和退化参数的值类型节点。

自从
build 337

在文件 ValueNode.h267 行定义.

参考 ystdex::decay_copy() , 以及 yforward.

参考自 LoadConfiguration() , 以及 Reduce().

函数调用图:

这是这个函数的调用关系图:

template<typename _type >
bool YSLib::operator!= ( const shared_ptr< _type > &  sp,
_type *  p 
)

比较: shared_ptr 左值和内建指针类型的不等关系。

自从
build 209

在文件 yref.hpp101 行定义.

template<typename _type >
bool YSLib::operator!= ( shared_ptr< _type > &&  sp,
_type *  p 
)

比较: shared_ptr 右值和内建指针类型的不等关系。

自从
build 209

在文件 yref.hpp111 行定义.

File& YSLib::operator<< ( File &  f,
char  c 
)
inline

向指定文件写字符。

参数
f文件。
前置条件
bool(f)
自从
build 326

在文件 yfile.h237 行定义.

参考 YSLib::File::GetPtr() , 以及 YAssert.

函数调用图:

File& YSLib::operator<< ( File &  f,
const char *  str 
)
inline

向指定文件写字符串。

参数
f文件。
前置条件
bool(f)
自从
build 326

在文件 yfile.h251 行定义.

参考 YSLib::File::GetPtr() , 以及 YAssert.

函数调用图:

template<typename _tString >
File& YSLib::operator<< ( File &  f,
const _tString &  str 
)

向指定文件写字符串。

参数
f文件。
前置条件
bool(f)
自从
build 326
待办事项:
支持非 char 元素字符串。

在文件 yfile.h267 行定义.

参考 YSLib::File::GetPtr() , 以及 YAssert.

函数调用图:

template<typename _type >
bool YSLib::operator== ( const shared_ptr< _type > &  sp,
_type *  p 
)

比较: shared_ptr 左值和内建指针类型的相等关系。

自从
build 209

在文件 yref.hpp80 行定义.

template<typename _type >
bool YSLib::operator== ( shared_ptr< _type > &&  sp,
_type *  p 
)

比较: shared_ptr 右值和内建指针类型的相等关系。

自从
build 209

在文件 yref.hpp90 行定义.

template<typename _tChar >
File& YSLib::operator>> ( File &  f,
typename std::char_traits< _tChar >::char_type &  c 
)

从指定文件读字符。

参数
f文件。
前置条件
bool(f)
自从
build 326

在文件 yfile.h200 行定义.

参考 YAssert.

template<typename _tString >
File& YSLib::operator>> ( File &  f,
_tString &  str 
)

从指定文件读空白符分隔的字符串。

参数
f文件。
前置条件
bool(f)
自从
build 326

在文件 yfile.h217 行定义.

参考 YSLib::File::GetPtr() , 以及 YAssert.

函数调用图:

template<typename _tString , typename... _tParams>
ValueNode YSLib::PackNodes ( _tString &&  name,
_tParams &&...  args 
)
inline

取以指定分量为参数对应初始化得到的值类型节点为子节点的值类型节点。

自从
build 338

在文件 ValueNode.h333 行定义.

参考 CollectNodes(),UnpackToNode() , 以及 yforward.

参考自 InitializeInstalled() , 以及 LoadConfiguration().

函数调用图:

这是这个函数的调用关系图:

YF_API void YSLib::PostMessage ( const Message &  ,
Messaging::Priority   
)

全局默认队列消息发送函数。

警告
应用程序实例初始化前不保证线程安全性。
自从
build 297
build 317
void YSLib::PostMessage ( Messaging::ID  id,
Messaging::Priority  prior,
const ValueObject &  vo = {} 
)
inline
自从
build 320

在文件 yapp.h156 行定义.

void YSLib::PostMessage ( Messaging::ID  id,
Messaging::Priority  prior,
ValueObject &&  c 
)
inline
自从
build 320

在文件 yapp.h163 行定义.

参考 PostMessage().

函数调用图:

template<Messaging::MessageID _vID>
void YSLib::PostMessage ( Messaging::Priority  prior,
const typename Messaging::SMessageMap< _vID >::TargetType &  target 
)
inline
自从
build 320

在文件 yapp.h171 行定义.

参考 PostMessage().

函数调用图:

YF_API void YSLib::PostQuitMessage ( int  nExitCode,
Messaging::Priority  p = 0xF0 
)

以优先级 p 发起 Shell 终止请求,返回 nExitCode。

参考自 GetDesktopDownHandle().

这是这个函数的调用关系图:

template<typename _type >
void YSLib::RestrictInClosedInterval ( _type &  i,
int  a,
int  b 
)

约束整数 i 在闭区间 [a, b] 中。

前置条件
断言: !(b < a)
后置条件
!(i < a || b < i)
自从
build 319

在文件 ycutil.h252 行定义.

参考 YAssert.

参考自 YSLib::UI::ATrack::SetThumbPosition() , 以及 DualScreenReader::Stretch().

这是这个函数的调用关系图:

template<typename _type >
void YSLib::RestrictInInterval ( _type &  i,
int  a,
int  b 
)

约束整数 i 在左闭右开区间 [a, b) 中。

前置条件
断言: a < b
后置条件
!(i < a) && i < b
自从
build 319

在文件 ycutil.h270 行定义.

参考 YAssert.

参考自 DrawHLineSeg(),DrawTrackBackground(),DrawVLineSeg(),YSLib::UI::GSequenceViewer< ListType >::IncreaseHead(),YSLib::UI::GSequenceViewer< ListType >::IncreaseSelected(),YSLib::UI::TextList::LocateViewPosition(),YSLib::UI::ATrack::SetThumbLength() , 以及 InputManager::Update().

这是这个函数的调用关系图:

template<typename _type >
void YSLib::RestrictLessEqual ( _type &  a,
_type &  b 
)
inline

约束关系:a ≤ b 。

后置条件
a <= b
自从
build 319

在文件 ycutil.h316 行定义.

参考 std::swap().

参考自 DrawHLineSeg() , 以及 DrawVLineSeg().

函数调用图:

这是这个函数的调用关系图:

template<typename _type >
void YSLib::RestrictUnsigned ( _type &  u,
unsigned  b 
)

约束无符号整数 u 在左闭右开区间 [0, b) 中。

前置条件
断言: b != FetchZero<_type>()
后置条件
!(u < FetchZero<_type>()) && u < b
自从
build 319

在文件 ycutil.h301 行定义.

参考 YAssert.

template<typename _type >
void YSLib::RestrictUnsignedStrict ( _type &  u,
unsigned  b 
)

约束无符号整数 u 在区间上界 b 内。

后置条件
!(b < u)
自从
build 319

在文件 ycutil.h287 行定义.

参考自 YSLib::UI::TextList::InvalidateSelected().

这是这个函数的调用关系图:

template<typename _tString , typename... _tParams>
ValueNode YSLib::StringifyToNode ( _tString &&  name,
_tParams &&...  args 
)
inline

取指定名称和转换为字符串的值类型节点。

注解
使用非限定 to_string 转换。
自从
build 344

在文件 ValueNode.h279 行定义.

参考 ystdex::to_string() , 以及 yforward.

函数调用图:

template<typename _type >
size_t YSLib::SwitchAddedInterval ( _type  v,
const _type *  a,
size_t  n 
)

计算满足指定的值 v 在区间 [b(i), b(i + 1)) 内的最小的 i ; 其中 b(i) 是 a[i] 前 i 项的和。

前置条件
断言: a
断言: n != 0
断言: !(v < *a)
自从
build 319

在文件 ycutil.h230 行定义.

参考 YAssert.

template<typename _type >
size_t YSLib::SwitchInterval ( _type  v,
const _type *  a,
size_t  n 
)

计算满足指定的值 v 在区间 [a[i], a[i + 1]) 内最小的 i 。

前置条件
断言: a
断言: n != 0
断言: !(v < *a)
自从
build 319

在文件 ycutil.h207 行定义.

参考 YAssert.

参考自 YSLib::UI::ATrack::CheckArea().

这是这个函数的调用关系图:

const ValueNode& YSLib::UnpackToNode ( const ValueNode &  arg)
inline

从引用参数取值类型节点:返回自身。

自从
build 338

在文件 ValueNode.h290 行定义.

参考自 PackNodes().

这是这个函数的调用关系图:

ValueNode&& YSLib::UnpackToNode ( ValueNode &&  arg)
inline

在文件 ValueNode.h295 行定义.

template<class _tPack >
ValueNode YSLib::UnpackToNode ( _tPack &&  pk)
inline

从参数取以指定分量为初始化参数的值类型节点。

注解
取分量同 std::get ,但使用 ADL 。仅取前两个分量。
自从
build 338

在文件 ValueNode.h307 行定义.

参考 ystdex::decay_copy() , 以及 yforward.

函数调用图:

变量说明

yconstexpr char YSLib::BOM_UTF_16BE[] {"\xFE\xFF"}

在文件 yftext.h46 行定义.

参考自 YSLib::TextFile::CheckBOM().

yconstexpr char YSLib::BOM_UTF_16LE[] {"\xFF\xFE"}

Unicode 编码模式标记。

Unicode Encoding Scheme Signatures BOM(byte-order mark ,字节顺序标记)常量。

注解
在 Unicode 3.2 前作为零宽无间断空格字符在对应字符集的编码单字节序列。
适用于未明确字节序或字符集的流。
自从
build 297

在文件 yftext.h45 行定义.

参考自 YSLib::TextFile::CheckBOM().

yconstexpr char YSLib::BOM_UTF_32BE[] {"\x00\x00\xFE\xFF"}

在文件 yftext.h49 行定义.

参考自 YSLib::TextFile::CheckBOM().

yconstexpr char YSLib::BOM_UTF_32LE[] {"\xFF\xFE\x00\x00"}

在文件 yftext.h48 行定义.

参考自 YSLib::TextFile::CheckBOM().

yconstexpr char YSLib::BOM_UTF_8[] {"\xEF\xBB\xBF"}

在文件 yftext.h47 行定义.

参考自 YSLib::TextFile::CheckBOM().