• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef SRC_DIAGNOSTICFILENAME_INL_H_
2 #define SRC_DIAGNOSTICFILENAME_INL_H_
3 
4 #if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
5 
6 #include "node_internals.h"
7 namespace node {
8 
9 class Environment;
10 
DiagnosticFilename(Environment * env,const char * prefix,const char * ext)11 inline DiagnosticFilename::DiagnosticFilename(
12     Environment* env,
13     const char* prefix,
14     const char* ext) :
15   filename_(MakeFilename(env->thread_id(), prefix, ext)) {
16 }
17 
DiagnosticFilename(uint64_t thread_id,const char * prefix,const char * ext)18 inline DiagnosticFilename::DiagnosticFilename(
19     uint64_t thread_id,
20     const char* prefix,
21     const char* ext) :
22   filename_(MakeFilename(thread_id, prefix, ext)) {
23 }
24 
25 inline const char* DiagnosticFilename::operator*() const {
26   return filename_.c_str();
27 }
28 
29 }  // namespace node
30 
31 #endif  // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
32 
33 #endif  // SRC_DIAGNOSTICFILENAME_INL_H_
34