void StackOutTranslator::setOutputBuffer(WriteBufferBase* out)
 {
     if(out->getTypeIdentifier() != TypeInfo<uint8_t>::identifier)
     {
         throw InvalidDataTypeException("Only uint8_t data types are valid in the StackEngine");
     }
     outputBuffer_ = dynamic_cast< WriteBuffer<uint8_t>* >(out);
 }
Beispiel #2
0
 //! Create a PhyDataBuffer of a particular data type
 b::shared_ptr< DataBufferBase > PhyEngine::createPhyDataBuffer(int type) const
 {
     b::shared_ptr< DataBufferBase> ret;
     if(!internal::getPhyBufferOfType<>::EXEC(type, ret))
     {
         throw InvalidDataTypeException("Attempted to create DataBuffer with invalid data type value: " + type);
     }
     return ret;
 }
Beispiel #3
0
void ArrayVariant::addMember(const Variant& member) {
    if (value) {
        if (member.getType().isValid())
            boost::dynamic_pointer_cast<Value>(value)->addMember(member);
        else
            throw InvalidDataTypeException();
    }
    else
        throw InvalidOperationException("Adding a member to an invalid array");
}
Beispiel #4
0
ArrayDataType::Impl::Impl(const DataType& memberType) :
  memberType(memberType) {
  if (!memberType.isValid())
    throw InvalidDataTypeException();  
}