File: scopes.h

package info (click to toggle)
freespace2 24.2.0%2Brepack-1
  • links: PTS, VCS
  • area: non-free
  • in suites: forky, sid
  • size: 43,716 kB
  • sloc: cpp: 595,001; ansic: 21,741; python: 1,174; sh: 457; makefile: 248; xml: 181
file content (37 lines) | stat: -rw-r--r-- 731 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37

#ifndef FS2_OPEN_SCOPES_H
#define FS2_OPEN_SCOPES_H
#pragma once

#include "globalincs/pstypes.h"


/** @file
 *  @ingroup tracing
 *
 *  This file contains the tracing scopes that exist. In order to add a new one you need to create the instance in scopes.cpp,
 *  declare the @c extern reference here and then use it wherever appropriate.
 */

namespace tracing {

/**
 * @brief A tracing scope
 *
 * A scope is similar to a category but should be used for events that take a longer time or that can happen asynchronously.
 */
class Scope {
	const char* _name;

 public:
	explicit Scope(const char* name);
	~Scope();

	const char* getName() const { return _name; }
};

extern Scope MainFrameScope;

}

#endif //FS2_OPEN_SCOPES_H