MCPcopy Create free account
hub / github.com/bytedance/Fastbot_Android / Node

Class Node

native/desc/Node.h:27–55  ·  view source on GitHub ↗

Used for statistic, it retains the status and counts of being visited.

Source from the content-addressed store, hash-verified

25
26// Used for statistic, it retains the status and counts of being visited.
27 class Node : public Serializable {
28 public:
29 Node();
30
31 /// Update the count of being visited
32 /// \param timestamp The timestamp when it's been visited.
33 virtual void visit(time_t timestamp);
34
35 /// Test if this node has been visited or not
36 /// \return true if it's been visited before
37 bool isVisited() const { return _visitedCount > 0; }
38
39 /// Get the visited count
40 /// \return Visited count
41 int getVisitedCount() const { return this->_visitedCount; }
42
43 // implements Serializable
44 std::string toString() const override;
45
46 virtual const std::string getId() const { return std::to_string(_id); }
47
48 void setId(const int &id) { this->_id = id; }
49
50 int getIdi() const { return this->_id; }
51
52 protected:
53 int _visitedCount;
54 int _id;
55 };
56}
57
58#endif // Node_H_

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected