/* * This is the source code of Telegram for iOS v. 1.1 * It is licensed under GNU GPL v. 2 or later. * You should have received a copy of the license in this archive (see LICENSE). * * Copyright Peter Iakovlev, 2013. */ #ifndef __Telegraph__TLMetaConstructor__ #define __Telegraph__TLMetaConstructor__ #import #include #include #include #include "TLMetaType.h" #include "TLMetaField.h" #include "TLMetaObject.h" #include "TLConstructedValue.h" #import "TLSerializationEnvironment.h" #import "TLSerializationContext.h" class TLMetaConstructor { public: int32_t name; int32_t signature; std::tr1::shared_ptr > fields; std::tr1::shared_ptr > fieldNameToIndex; std::tr1::shared_ptr resultType; public: TLMetaConstructor(int32_t name, int32_t signature, std::tr1::shared_ptr > fields, std::tr1::shared_ptr resultType); virtual ~TLMetaConstructor(); inline int32_t getName() { return name; } inline int32_t getSignature() { return signature; } inline std::tr1::shared_ptr getResultType() { return resultType; } inline std::tr1::shared_ptr > getFields() { return fields; } TLConstructedValue construct(NSInputStream *is, id environment, TLSerializationContext *context, __autoreleasing NSError **error); void serialize(NSOutputStream *os, id object); }; #endif