mirror of
https://github.com/espressif/openthread.git
synced 2026-07-30 15:47:46 +00:00
[core] add explicit to one-argument constructors (#2422)
This commit is contained in:
committed by
Jonathan Hui
parent
6047a94dce
commit
3a46740c24
@@ -55,7 +55,7 @@ public:
|
||||
* This constructor initializes the object.
|
||||
*
|
||||
*/
|
||||
LinkRaw(Instance &aInstance);
|
||||
explicit LinkRaw(Instance &aInstance);
|
||||
|
||||
/**
|
||||
* This method returns true if the raw link-layer is enabled.
|
||||
|
||||
@@ -747,7 +747,7 @@ public:
|
||||
* @param[in] aInstance A reference to the OpenThread instance.
|
||||
*
|
||||
*/
|
||||
Coap(Instance &aInstance);
|
||||
explicit Coap(Instance &aInstance);
|
||||
|
||||
private:
|
||||
static void HandleRetransmissionTimer(Timer &aTimer);
|
||||
@@ -769,7 +769,7 @@ public:
|
||||
* @param[in] aInstance A reference to the OpenThread instance.
|
||||
*
|
||||
*/
|
||||
ApplicationCoap(Instance &aInstance);
|
||||
explicit ApplicationCoap(Instance &aInstance);
|
||||
|
||||
private:
|
||||
static void HandleRetransmissionTimer(Timer &aTimer);
|
||||
|
||||
@@ -73,7 +73,7 @@ public:
|
||||
* @param[in] aInstance A reference to the OpenThread instance.
|
||||
*
|
||||
*/
|
||||
CoapSecure(Instance &aInstance);
|
||||
explicit CoapSecure(Instance &aInstance);
|
||||
|
||||
/**
|
||||
* This method starts the secure CoAP agent.
|
||||
|
||||
@@ -1140,7 +1140,7 @@ public:
|
||||
* This constructor initializes the object.
|
||||
*
|
||||
*/
|
||||
MessagePool(Instance &aInstance);
|
||||
explicit MessagePool(Instance &aInstance);
|
||||
|
||||
/**
|
||||
* This method is used to obtain a new message. The default priority `kDefaultMessagePriority`
|
||||
|
||||
@@ -106,7 +106,7 @@ public:
|
||||
* @param[in] aInstance A reference to OpenThread instance.
|
||||
*
|
||||
*/
|
||||
Notifier(Instance &aInstance);
|
||||
explicit Notifier(Instance &aInstance);
|
||||
|
||||
/**
|
||||
* This method registers a callback.
|
||||
|
||||
@@ -54,7 +54,7 @@ public:
|
||||
* This constructor initializes the object.
|
||||
*
|
||||
*/
|
||||
AnnounceBeginClient(Instance &aInstance);
|
||||
explicit AnnounceBeginClient(Instance &aInstance);
|
||||
|
||||
/**
|
||||
* This method sends a Announce Begin message.
|
||||
|
||||
@@ -65,7 +65,7 @@ public:
|
||||
* @param[in] aInstance A reference to the OpenThread instance.
|
||||
*
|
||||
*/
|
||||
Commissioner(Instance &aInstance);
|
||||
explicit Commissioner(Instance &aInstance);
|
||||
|
||||
/**
|
||||
* This method starts the Commissioner service.
|
||||
|
||||
@@ -282,7 +282,7 @@ public:
|
||||
* @param[in] aInstance A reference to the OpenThread instance.
|
||||
*
|
||||
*/
|
||||
ActiveDatasetBase(Instance &aInstance);
|
||||
explicit ActiveDatasetBase(Instance &aInstance);
|
||||
|
||||
/**
|
||||
* This method restores the Active Operational Dataset from non-volatile memory.
|
||||
@@ -364,7 +364,7 @@ public:
|
||||
* @param[in] The Thread network interface.
|
||||
*
|
||||
*/
|
||||
PendingDatasetBase(Instance &aInstance);
|
||||
explicit PendingDatasetBase(Instance &aInstance);
|
||||
|
||||
/**
|
||||
* This method restores the Operational Dataset from non-volatile memory.
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace MeshCoP {
|
||||
class ActiveDataset: public ActiveDatasetBase
|
||||
{
|
||||
public:
|
||||
ActiveDataset(Instance &aInstance);
|
||||
explicit ActiveDataset(Instance &aInstance);
|
||||
|
||||
otError GenerateLocal(void);
|
||||
|
||||
@@ -74,7 +74,7 @@ private:
|
||||
class PendingDataset: public PendingDatasetBase
|
||||
{
|
||||
public:
|
||||
PendingDataset(Instance &aInstance);
|
||||
explicit PendingDataset(Instance &aInstance);
|
||||
|
||||
void StartLeader(void);
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ public:
|
||||
* @param[in] aNetif A reference to the Thread network interface.
|
||||
*
|
||||
*/
|
||||
Dtls(Instance &aInstance);
|
||||
explicit Dtls(Instance &aInstance);
|
||||
|
||||
/**
|
||||
* This function pointer is called when a connection is established or torn down.
|
||||
|
||||
@@ -58,7 +58,7 @@ public:
|
||||
* This constructor initializes the object.
|
||||
*
|
||||
*/
|
||||
EnergyScanClient(Instance &aInstance);
|
||||
explicit EnergyScanClient(Instance &aInstance);
|
||||
|
||||
/**
|
||||
* This method sends an Energy Scan Query message.
|
||||
|
||||
@@ -63,7 +63,7 @@ public:
|
||||
* @param[in] aInstance A reference to the OpenThread instance.
|
||||
*
|
||||
*/
|
||||
Joiner(Instance &aInstance);
|
||||
explicit Joiner(Instance &aInstance);
|
||||
|
||||
/**
|
||||
* This method starts the Joiner service.
|
||||
|
||||
@@ -64,7 +64,7 @@ public:
|
||||
* @param[in] aInstance A reference to the OpenThread instance.
|
||||
*
|
||||
*/
|
||||
JoinerRouter(Instance &aInstance);
|
||||
explicit JoinerRouter(Instance &aInstance);
|
||||
|
||||
/**
|
||||
* This method returns the Joiner UDP Port.
|
||||
|
||||
@@ -70,7 +70,7 @@ public:
|
||||
* @param[in] aInstance A reference to the OpenThread instance.
|
||||
*
|
||||
*/
|
||||
Leader(Instance &aInstance);
|
||||
explicit Leader(Instance &aInstance);
|
||||
|
||||
/**
|
||||
* This method sends a MGMT_DATASET_CHANGED message to commissioner.
|
||||
|
||||
@@ -58,7 +58,7 @@ public:
|
||||
* This constructor initializes the object.
|
||||
*
|
||||
*/
|
||||
PanIdQueryClient(Instance &aInstance);
|
||||
explicit PanIdQueryClient(Instance &aInstance);
|
||||
|
||||
/**
|
||||
* This method sends a PAN ID Query message.
|
||||
|
||||
@@ -231,7 +231,7 @@ public:
|
||||
* @param[in] aInstance A reference to the OpenThread instance.
|
||||
*
|
||||
*/
|
||||
Icmp(Instance &aInstance);
|
||||
explicit Icmp(Instance &aInstance);
|
||||
|
||||
/**
|
||||
* This method returns a new ICMP message with sufficient header space reserved.
|
||||
|
||||
@@ -123,7 +123,7 @@ public:
|
||||
* @param[in] aInstance A reference to the otInstance object.
|
||||
*
|
||||
*/
|
||||
Ip6(Instance &aInstance);
|
||||
explicit Ip6(Instance &aInstance);
|
||||
|
||||
/**
|
||||
* This method sends an IPv6 datagram.
|
||||
|
||||
@@ -439,7 +439,7 @@ public:
|
||||
* @param[in] aInstance A reference to the OpenThread instance.
|
||||
*
|
||||
*/
|
||||
Mpl(Instance &aInstance);
|
||||
explicit Mpl(Instance &aInstance);
|
||||
|
||||
/**
|
||||
* This method initializes the MPL option.
|
||||
|
||||
@@ -80,7 +80,7 @@ public:
|
||||
* @param[in] aInstance A reference to the OpenThread instance.
|
||||
*
|
||||
*/
|
||||
Routes(Instance &aInstance);
|
||||
explicit Routes(Instance &aInstance);
|
||||
|
||||
/**
|
||||
* This method adds an IPv6 route.
|
||||
|
||||
@@ -175,7 +175,7 @@ public:
|
||||
* @param[in] aIp6 A reference to OpenThread instance.
|
||||
*
|
||||
*/
|
||||
Udp(Instance &aInstance);
|
||||
explicit Udp(Instance &aInstance);
|
||||
|
||||
/**
|
||||
* This method adds a UDP socket.
|
||||
|
||||
@@ -56,7 +56,7 @@ public:
|
||||
* This constructor initializes the object.
|
||||
*
|
||||
*/
|
||||
AnnounceBeginServer(Instance &aInstance);
|
||||
explicit AnnounceBeginServer(Instance &aInstance);
|
||||
|
||||
/**
|
||||
* This method begins the MLE Announce transmission process using Count=3 and Period=1s.
|
||||
|
||||
@@ -64,7 +64,7 @@ public:
|
||||
* This constructor initializes the object.
|
||||
*
|
||||
*/
|
||||
EnergyScanServer(Instance &aInstance);
|
||||
explicit EnergyScanServer(Instance &aInstance);
|
||||
|
||||
private:
|
||||
enum
|
||||
|
||||
@@ -63,7 +63,7 @@ public:
|
||||
* This constructor initializes the object.
|
||||
*
|
||||
*/
|
||||
PanIdQueryServer(Instance &aInstance);
|
||||
explicit PanIdQueryServer(Instance &aInstance);
|
||||
|
||||
private:
|
||||
enum
|
||||
|
||||
@@ -104,7 +104,7 @@ public:
|
||||
* @param[in] aInstance A reference to the OpenThread instance.
|
||||
*
|
||||
*/
|
||||
ThreadNetif(Instance &aInstance);
|
||||
explicit ThreadNetif(Instance &aInstance);
|
||||
|
||||
/**
|
||||
* This method enables the Thread network interface.
|
||||
|
||||
Reference in New Issue
Block a user