Home
last modified time | relevance | path

Searched refs:Type (Results 1 – 25 of 131) sorted by relevance

123456

/openthread-latest/src/core/common/
Dlinked_list.hpp67 template <class Type> class LinkedListEntry
75 …const Type *GetNext(void) const { return static_cast<const Type *>(static_cast<const Type *>(this)… in GetNext()
82 Type *GetNext(void) { return static_cast<Type *>(static_cast<Type *>(this)->mNext); } in GetNext()
89 void SetNext(Type *aNext) { static_cast<Type *>(this)->mNext = aNext; } in SetNext()
98 template <typename Type> class LinkedList
117 Type *GetHead(void) { return mHead; } in GetHead()
124 const Type *GetHead(void) const { return mHead; } in GetHead()
131 void SetHead(Type *aHead) { mHead = aHead; } in SetHead()
151 void Push(Type &aEntry) in Push()
163 void PushAfter(Type &aEntry, Type &aPrevEntry) in PushAfter()
[all …]
Das_core_type.hpp64 template <typename Type> typename CoreType<Type>::Type &AsCoreType(Type *aObject) in AsCoreType()
68 return *static_cast<typename CoreType<Type>::Type *>(aObject); in AsCoreType()
80 template <typename Type> const typename CoreType<Type>::Type &AsCoreType(const Type *aObject) in AsCoreType()
84 return *static_cast<const typename CoreType<Type>::Type *>(aObject); in AsCoreType()
96 template <typename Type> typename CoreType<Type>::Type *AsCoreTypePtr(Type *aObject) in AsCoreTypePtr()
98 return static_cast<typename CoreType<Type>::Type *>(aObject); in AsCoreTypePtr()
110 template <typename Type> const typename CoreType<Type>::Type *AsCoreTypePtr(const Type *aObject) in AsCoreTypePtr()
112 return static_cast<const typename CoreType<Type>::Type *>(aObject); in AsCoreTypePtr()
134 template <typename EnumType> const typename MappedEnum<EnumType>::Type MapEnum(EnumType aValue) in MapEnum()
136 return static_cast<typename MappedEnum<EnumType>::Type>(aValue); in MapEnum()
[all …]
Darray.hpp59 template <typename Type, uint16_t kArrayLength> constexpr inline uint16_t GetArrayLength(const Type in GetArrayLength()
77 template <typename Type, uint16_t kArrayLength> inline Type *GetArrayEnd(Type (&aArray)[kArrayLengt… in GetArrayEnd()
95 template <typename Type, uint16_t kArrayLength> inline const Type *GetArrayEnd(const Type (&aArray)… in GetArrayEnd()
109 template <typename Type,
112 …ypename TypeTraits::Conditional<kMaxSize <= NumericLimits<uint8_t>::kMax, uint8_t, uint16_t>::Type>
154 for (Type &element : mElements) in Array()
207 Type *GetArrayBuffer(void) { return mElements; } in GetArrayBuffer()
214 const Type *GetArrayBuffer(void) const { return mElements; } in GetArrayBuffer()
225 Type &operator[](IndexType aIndex) { return mElements[aIndex]; } in operator []()
236 const Type &operator[](IndexType aIndex) const { return mElements[aIndex]; } in operator []()
[all …]
Dheap_array.hpp65 template <typename Type, uint16_t kCapacityIncrements = 2> class Array
108 for (Type &entry : *this) in Clear()
110 entry.~Type(); in Clear()
130 const Type *AsCArray(void) const { return (mLength != 0) ? mArray : nullptr; } in AsCArray()
180 Type &operator[](IndexType aIndex) { return mArray[aIndex]; } in operator []()
191 const Type &operator[](IndexType aIndex) const { return mArray[aIndex]; } in operator []()
203 Type *At(IndexType aIndex) { return (aIndex < mLength) ? &mArray[aIndex] : nullptr; } in At()
215 … const Type *At(IndexType aIndex) const { return (aIndex < mLength) ? &mArray[aIndex] : nullptr; } in At()
224 Type *Front(void) { return At(0); } in Front()
233 const Type *Front(void) const { return At(0); } in Front()
[all …]
Dconst_cast.hpp50 template <typename Type> const Type &AsConst(Type &aObject) { return const_cast<const Type &>(aObje… in AsConst()
61 template <typename Type> const Type *AsConst(Type *aPointer) { return const_cast<const Type *>(aPoi… in AsConst()
72 template <typename Type> Type &AsNonConst(const Type &aObject) { return const_cast<Type &>(aObject)… in AsNonConst()
83 template <typename Type> Type *AsNonConst(const Type *aPointer) { return const_cast<Type *>(aPointe… in AsNonConst()
Dtype_traits.hpp64 template <typename Type> struct IsPointer : public FalseValue
70 template <typename Type> struct IsPointer<Type *> : public TrueValue
74 template <typename Type> struct IsPointer<const Type *> : public TrueValue
78 template <typename Type> struct IsPointer<volatile Type *> : public TrueValue
82 template <typename Type> struct IsPointer<const volatile Type *> : TrueValue
99 template <typename Type> struct IsSame<Type, Type> : public TrueValue
115 typedef TypeOnFalse Type; ///< The selected type based on `kCondition`. typedef
120 typedef TypeOnTrue Type; typedef
136 typedef RetType Type; ///< The return type. typedef
153 typedef FirstArgType Type; ///< The first argument type. typedef
Downing_list.hpp49 template <typename Type> class OwningList : public LinkedList<Type>
89 OwnedPtr<Type> Pop(void) { return OwnedPtr<Type>(LinkedList<Type>::Pop()); } in Pop()
101 …OwnedPtr<Type> PopAfter(Type *aPrevEntry) { return OwnedPtr<Type>(LinkedList<Type>::PopAfter(aPrev… in PopAfter()
118 template <typename... Args> OwnedPtr<Type> RemoveMatching(const Args &...aArgs) in RemoveMatching()
120 return OwnedPtr<Type>(LinkedList<Type>::RemoveMatching(aArgs...)); in RemoveMatching()
138 LinkedList<Type>::RemoveAllMatching(aRemovedList, aArgs...); in RemoveAllMatching()
Dnum_utils.hpp54 template <typename Type> Type Min(Type aFirst, Type aSecond) { return (aFirst < aSecond) ? aFirst :… in Min()
68 template <typename Type> Type Max(Type aFirst, Type aSecond) { return (aFirst < aSecond) ? aSecond … in Max()
83 template <typename Type> Type Clamp(Type aValue, Type aMin, Type aMax) in Clamp()
85 Type value = Max(aValue, aMin); in Clamp()
163 template <typename Type> int ThreeWayCompare(Type aFirst, Type aSecond) in ThreeWayCompare()
Dptr_wrapper.hpp51 template <class Type> class Ptr
67 explicit Ptr(Type *aPointer) in Ptr()
85 Type *Get(void) { return mPointer; } in Get()
92 const Type *Get(void) const { return mPointer; } in Get()
99 Type *operator->(void) { return mPointer; } in operator ->()
106 const Type *operator->(void) const { return mPointer; } in operator ->()
115 Type &operator*(void) { return *mPointer; } in operator *()
124 const Type &operator*(void) const { return *mPointer; } in operator *()
134 bool operator==(const Type *aPointer) const { return (mPointer == aPointer); } in operator ==()
144 bool operator!=(const Type *aPointer) const { return (mPointer != aPointer); } in operator !=()
[all …]
Dpool.hpp63 template <class Type, uint16_t kPoolSize> class Pool : private NonCopyable
72 for (Type &entry : mPool) in Pool()
89 for (Type &entry : mPool) in Pool()
102 Type *Allocate(void) { return mFreeList.Pop(); } in Allocate()
112 void Free(Type &aEntry) { mFreeList.Push(aEntry); } in Free()
121 for (Type &entry : mPool) in FreeAll()
142 …bool IsPoolEntry(const Type &aObject) const { return (&mPool[0] <= &aObject) && (&aObject < GetArr… in IsPoolEntry()
153 uint16_t GetIndexOf(const Type &aEntry) const { return static_cast<uint16_t>(&aEntry - mPool); } in GetIndexOf()
164 Type &GetEntryAt(uint16_t aIndex) { return mPool[aIndex]; } in GetEntryAt()
175 const Type &GetEntryAt(uint16_t aIndex) const { return mPool[aIndex]; } in GetEntryAt()
[all …]
Dheap_allocatable.hpp58 template <class Type> class Allocatable
71 template <typename... Args> static Type *Allocate(Args &&...aArgs) in Allocate()
73 void *buf = Heap::CAlloc(1, sizeof(Type)); in Allocate()
75 return (buf != nullptr) ? new (buf) Type(static_cast<Args &&>(aArgs)...) : nullptr; in Allocate()
89 template <typename... Args> static Type *AllocateAndInit(Args &&...aArgs) in AllocateAndInit()
91 void *buf = Heap::CAlloc(1, sizeof(Type)); in AllocateAndInit()
92 Type *object = nullptr; in AllocateAndInit()
96 object = new (buf) Type(); in AllocateAndInit()
119 static_cast<Type *>(this)->~Type(); in Free()
Dequatable.hpp51 template <typename Type> class Unequatable
64 …bool operator!=(const Type &aOther) const { return !(*static_cast<const Type *>(this) == aOther); } in operator !=()
75 template <typename Type> class Equatable : public Unequatable<Type>
86 bool operator==(const Type &aOther) const in operator ==()
88 return memcmp(static_cast<const Type *>(this), &aOther, sizeof(Type)) == 0; in operator ==()
Dretain_ptr.hpp57 template <class Type> class RetainPtr : public Ptr<Type>
59 using Ptr<Type>::mPointer;
74 explicit RetainPtr(Type *aPointer) in RetainPtr()
75 : Ptr<Type>(aPointer) in RetainPtr()
86 : Ptr<Type>(aOther.mPointer) in RetainPtr()
107 void Reset(Type *aPointer = nullptr) in Reset()
125 Type *Release(void) in Release()
127 Type *pointer = mPointer; in Release()
172 template <class Type> friend class RetainPtr;
Downed_ptr.hpp53 template <class Type> class OwnedPtr : public Ptr<Type>
55 using Ptr<Type>::mPointer;
70 explicit OwnedPtr(Type *aPointer) in OwnedPtr()
71 : Ptr<Type>(aPointer) in OwnedPtr()
116 void Reset(Type *aPointer = nullptr) in Reset()
132 Type *Release(void) in Release()
134 Type *pointer = mPointer; in Release()
Dclearable.hpp67 template <typename Type> class Clearable
70 void Clear(void) { ClearAllBytes<Type>(*static_cast<Type *>(this)); } in Clear()
/openthread-latest/src/core/meshcop/
Ddataset.hpp67 enum Type : uint8_t enum in ot::MeshCoP::Dataset
149 template <Component kComponent> const typename TypeFor<kComponent>::Type &Get(void) const;
160 … template <Component kComponent> void Get(typename TypeFor<kComponent>::Type &aComponent) const;
169 … template <Component kComponent> void Set(const typename TypeFor<kComponent>::Type &aComponent) in Set()
182 template <Component kComponent> typename TypeFor<kComponent>::Type &Update(void) in Update()
251 bool ContainsTlv(Tlv::Type aType) const { return (FindTlv(aType) != nullptr); } in ContainsTlv()
263 return ContainsTlv(static_cast<Tlv::Type>(TlvType::kType)); in Contains()
275 bool ContainsAllTlvs(const Tlv::Type aTlvTypes[], uint8_t aLength) const;
285 bool ContainsAllRequiredTlvsFor(Type aType) const;
294 Tlv *FindTlv(Tlv::Type aType) { return AsNonConst(AsConst(this)->FindTlv(aType)); } in FindTlv()
[all …]
Ddataset_manager.hpp231 using Type = Dataset::Type; typedef in ot::MeshCoP::DatasetManager
243 using KeyRefType = Crypto::Storage::KeyRefManager::Type;
247 KeyRefType GetKeyRefType(Dataset::Type aType) const in GetKeyRefType()
252 Tlv::Type mTlvType;
276 DatasetManager(Instance &aInstance, Type aType, TimerMilli::Handler aTimerHandler);
300 …void SaveTlvInSecureStorageAndClearValue(Dataset &aDataset, Tlv::Type aTlvType, KeyRef aKeyRef) c…
301 Error ReadTlvFromSecureStorage(Dataset &aDataset, Tlv::Type aTlvType, KeyRef aKeyRef) const;
312 Type mType;
/openthread-latest/src/lib/utils/
Dmath.hpp53 template <typename Type> Type Min(Type aFirst, Type aSecond) { return (aFirst < aSecond) ? aFirst :… in Min()
67 template <typename Type> Type Max(Type aFirst, Type aSecond) { return (aFirst < aSecond) ? aSecond … in Max()
/openthread-latest/src/lib/spinel/
Dspinel_driver.hpp231 template <typename Type, uint16_t kMaxSize> class Array
245 otError PushBack(const Type &aEntry) in PushBack()
250 const Type *Find(const Type &aEntry) const in Find()
252 const Type *matched = nullptr; in Find()
254 for (const Type &element : *this) in Find()
266 bool Contains(const Type &aEntry) const { return Find(aEntry) != nullptr; } in Contains()
268 Type *begin(void) { return &mElements[0]; } in begin()
269 Type *end(void) { return &mElements[mLength]; } in end()
270 const Type *begin(void) const { return &mElements[0]; } in begin()
271 const Type *end(void) const { return &mElements[mLength]; } in end()
[all …]
/openthread-latest/src/core/net/
Ddns_dso.hpp125 typedef uint16_t Type; ///< DSO TLV type. typedef in ot::Dns::Dso::Tlv
127 static constexpr Type kReservedType = 0; ///< Reserved TLV type.
128 static constexpr Type kKeepAliveType = 1; ///< Keep Alive TLV type.
129 static constexpr Type kRetryDelayType = 2; ///< Retry Delay TLV type.
130 static constexpr Type kEncryptionPaddingType = 3; ///< Encryption Padding TLV type.
138 void Init(Type aType, uint16_t aLength) in Init()
149 Type GetType(void) const { return BigEndian::HostSwap16(mType); } in GetType()
166 Type mType;
288 Tlv::Type aPrimaryTlvType);
309 Tlv::Type aPrimaryTlvType);
[all …]
Dicmp6.hpp79 enum Type : uint8_t enum in ot::Ip6::Icmp::Header
121 Type GetType(void) const { return static_cast<Type>(mType); } in GetType()
128 void SetType(Type aType) { mType = static_cast<uint8_t>(aType); } in SetType()
263 …Error SendError(Header::Type aType, Header::Code aCode, const MessageInfo &aMessageInfo, const Mes…
276 …Error SendError(Header::Type aType, Header::Code aCode, const MessageInfo &aMessageInfo, const Hea…
/openthread-latest/src/posix/platform/
Dlogger.hpp53 template <typename Type> class Logger
67 otLogPlatArgs(OT_LOG_LEVEL_CRIT, Type::kLogModuleName, aFormat, args); in LogCrit()
82 otLogPlatArgs(OT_LOG_LEVEL_WARN, Type::kLogModuleName, aFormat, args); in LogWarn()
97 otLogPlatArgs(OT_LOG_LEVEL_NOTE, Type::kLogModuleName, aFormat, args); in LogNote()
112 otLogPlatArgs(OT_LOG_LEVEL_INFO, Type::kLogModuleName, aFormat, args); in LogInfo()
127 otLogPlatArgs(OT_LOG_LEVEL_DEBG, Type::kLogModuleName, aFormat, args); in LogDebg()
/openthread-latest/src/core/thread/
Dnetwork_data_tlvs.hpp117 enum Type : uint8_t enum in ot::NetworkData::NetworkDataTlv
142 Type GetType(void) const { return static_cast<Type>(mType >> kTypeOffset); } in GetType()
149 … void SetType(Type aType) { mType = (mType & ~kTypeMask) | ((aType << kTypeOffset) & kTypeMask); } in SetType()
248 static NetworkDataTlv *Find(NetworkDataTlv *aStart, NetworkDataTlv *aEnd, Type aType) in Find()
262 …c const NetworkDataTlv *Find(const NetworkDataTlv *aStart, const NetworkDataTlv *aEnd, Type aType);
305 …static NetworkDataTlv *Find(NetworkDataTlv *aStart, NetworkDataTlv *aEnd, Type aType, bool aStable) in Find()
323 Type aType,
489 static constexpr Type kType = kTypeHasRoute; ///< The TLV Type.
579 static constexpr Type kType = kTypePrefix; ///< The TLV Type.
758 return As<SubTlvType>(FindSubTlv(static_cast<Type>(SubTlvType::kType), aStable)); in FindSubTlv()
[all …]
Dnetwork_data_tlvs.cpp42 …DataTlv *NetworkDataTlv::Find(const NetworkDataTlv *aStart, const NetworkDataTlv *aEnd, Type aType) in Find()
62 Type aType, in Find()
84 const NetworkDataTlv *PrefixTlv::FindSubTlv(Type aType) const { return Find(GetSubTlvs(), GetNext()… in FindSubTlv()
86 const NetworkDataTlv *PrefixTlv::FindSubTlv(Type aType, bool aStable) const in FindSubTlv()
120 const NetworkDataTlv *TlvIterator::Iterate(NetworkDataTlv::Type aType) in Iterate()
131 const NetworkDataTlv *TlvIterator::Iterate(NetworkDataTlv::Type aType, bool aStable) in Iterate()
/openthread-latest/src/core/radio/
Dtrel_packet.hpp60 enum Type : uint8_t enum in ot::Trel::Header
88 void Init(Type aType) { mControl = aType + kVersion; } in Init()
102 Type GetType(void) const { return static_cast<Type>(mControl & kTypeMask); } in GetType()
206 static uint16_t GetSize(Type aType);
259 void Init(Header::Type aType, uint8_t *aPayload, uint16_t aPayloadLength);

123456