Ignore:
Timestamp:
06/07/06 18:38:29 (18 years ago)
Author:
mattausch
Message:

environment as a singleton

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/src/Environment.cpp

    r1002 r1004  
    2626 
    2727 
    28 Environment *environment = NULL; 
     28//Environment *environment = NULL; 
     29Environment *Environment::sEnvironment = NULL; 
     30 
     31 
     32Environment *Environment::GetSingleton() 
     33{ 
     34        if (!sEnvironment) 
     35        { 
     36                sEnvironment = new Environment(); 
     37        } 
     38 
     39        return sEnvironment; 
     40} 
     41 
     42void Environment::DelSingleton() 
     43{ 
     44        DEL_PTR(sEnvironment); 
     45} 
     46 
    2947 
    3048Environment::~Environment() 
     
    22192237  if (!GetParam(' ', 0, filename)) { 
    22202238    // user didn't specified environment file explicitly, so 
    2221     strcpy(filename, "default.env"); 
     2239    strcpy(filename, "default.Environment::GetSingleton()"); 
    22222240  } 
    22232241   
Note: See TracChangeset for help on using the changeset viewer.