blob: 60e97eba9e19d27f2eab70c8ddc86404c271f3d9 [file] [log] [blame]
// Copyright 2020 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef SRC_DEVELOPER_DEBUG_ZXDB_CONSOLE_ANALYTICS_SCOPE_H_
#define SRC_DEVELOPER_DEBUG_ZXDB_CONSOLE_ANALYTICS_SCOPE_H_
namespace zxdb {
// Manages static resources needed by analytics. Analytics related functions can be called as
// long as there is one object of this class alive. Example usage:
//
// int main() {
// AnalyticsScope _scope;
// // Do other things...
// }
class AnalyticsScope {
public:
AnalyticsScope();
AnalyticsScope(const AnalyticsScope&) = delete;
~AnalyticsScope();
private:
inline static int object_count = 0;
};
} // namespace zxdb
#endif // SRC_DEVELOPER_DEBUG_ZXDB_CONSOLE_ANALYTICS_SCOPE_H_