32 lines
646 B
C++
32 lines
646 B
C++
//----------------------------------------------------------------------------
|
|
//
|
|
// Copyright (C) Intel Corporation, 2007 - 2008.
|
|
//
|
|
// File: CommonOptions.cpp
|
|
//
|
|
// Contents: A singelton class which caches common options
|
|
//
|
|
// Notes:
|
|
//----------------------------------------------------------------------------
|
|
|
|
#include "CommonOptions.h"
|
|
|
|
CommonOptions * CommonOptions::_instance = NULL;
|
|
|
|
// Return a Singleton.
|
|
CommonOptions& CommonOptions::instance()
|
|
{
|
|
if (_instance == NULL)
|
|
{
|
|
_instance = new CommonOptions;
|
|
}
|
|
return *_instance;
|
|
}
|
|
|
|
// Dtor
|
|
CommonOptions::~CommonOptions()
|
|
{
|
|
delete _instance;
|
|
_instance = NULL;
|
|
}
|