YSTest: YObject.cpp 源文件

YSTest PreAlpha_b700_20160611 The YSLib Test Project

- 首页
- 相关页面
- 模块
- 命名空间
- 类
- 文件

- 文件列表
- 文件成员

YObject.cpp
浏览该文件的文档.
1 /*
2 © 2009-2013, 2015-2016 FrankHB.
3
4 This file is part of the YSLib project, and may only be used,
5 modified, and distributed under the terms of the YSLib project
6 license, LICENSE.TXT. By continuing to use, modify, or distribute
7 this file you indicate that you have read the license and
8 understand and accept it fully.
9 */
10
28 #include "YSLib/Core/YModules.h"
29 #include YFM_YSLib_Core_YObject
30 #include <ystdex/cast.hpp> // for ystdex::polymorphic_downcast;
31
32 namespace YSLib
33 {
34
35 ImplDeDtor(IValueHolder)
36
37
38 bool
39 operator==(const ValueObject& x, const ValueObject& y)
40 {
41 const auto p(x.content.get_holder());
42
43 if(const auto q = y.content.get_holder())
44 return p == q
45 || (p && ystdex::polymorphic_downcast<const IValueHolder&>(*p)
46 == ystdex::polymorphic_downcast<const IValueHolder&>(*q));
47 else
48 return !p;
49 return {};
50 }
51
52 } // namespace YSLib;
53
platform::p
while p p
Definition: YCLib/FileSystem.h:225
YSLib::Drawing::x
The boundary is out of the const Rect SDst SPos x
Definition: YDraw.h:127
YModules.h
YSLib
YSLib 命名空间。
Definition: AndroidHost.h:45
cast.hpp
C++ 转换模板。
YSLib::UI::y
SPos SPos y
Definition: YWidget.cpp:44
YSLib::ImplDeDtor
ImplDeDtor(LoggedEvent) FatalError
Definition: YException.cpp:47
platform::bool
std::FILE *fp bool
Definition: FileIO.h:1187