Пример #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::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();
    }
}