示例#1
0
const DynamicAny& DynamicAny::operator [] (const std::string& name) const
{
	const DynamicAnyHolderImpl<DynamicStruct>* pHolder = dynamic_cast<const DynamicAnyHolderImpl<DynamicStruct>* >(_pHolder);
	if (pHolder)
		return pHolder->operator[](name);
	else
		throw BadCastException();
}
示例#2
0
文件: false.cpp 项目: signatal/strine
False::False(Element_* element, SourceLocation const& location)
: Element(dynamic_cast<False_*>(element), location)
{
    if (0 == ElementHandle())
    {
        throw BadCastException();
    }
}
示例#3
0
False::False(std::shared_ptr<Element_> element, SourceLocation const& location)
: Element(False_::Instance(), location)
{
    if (0 == ElementHandle())
    {
        throw BadCastException();
    }
}
示例#4
0
Number::Number(std::shared_ptr<Element_> impl, SourceLocation const& location)
: Element(impl, location)
{
    SetFullyConstructed(true);
    if (0 == ElementHandle())
    {
        throw BadCastException();
    }
}