Yate Learning--yateclass.h--class Yate_api namedcounter:public String

Source: Internet
Author: User

Please state the source:

Namedcounter, Object-named counter:

/** * An atomic counter with an associated name * Atomic Counter of association name * @short Atomic counter with Name * @short Atomic counter */class YA Te_api namedcounter:public string{ynocopy (namedcounter);//No automatic copies Pleasepublic:/** * Construct  or * constructor * @param name Name of the counter * @ parameter name, counter name */explicit Namedcounter (const string&    name); /** * Check if the counter is enabled * checks if the counter is active * @return true if the counter is enabled * @ returns TRUE if the meter    The digital device is initiated by */inline bool enabled () const{return m_enabled;} /** * Enable or disable the counter * Enables or disables this counter * @param val True to enable counter, false to disable *    @ parameter val,true, enabled, FALSE, forbidden */inline void enable (bool val) {m_enabled = val;}    /** * Increment The counter * added count * @return post-increment value of the counter * @ Returns the values after the counter has increased */    int Inc (); /** * Decrement the counter * reduced count * @return post-decrement value of theCounter * @ Returns the value after the counter is reduced */int Dec ();    /** * Get the current value of the counter * to get the values of the present counter * @return value of the counter * @ return counter values */ inline int count () const{return m_count;}    Private:int M_count;    BOOL m_enabled; Mutex* M_mutex;};


Yate Learning--yateclass.h--class Yate_api namedcounter:public String

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.