コード例 #1
0
ファイル: Logger.cpp プロジェクト: Steguer/SelfGoverningShip
void Logger::log(std::string logMess)
{
    time_t rawtime;
    struct tm * timeinfo;

    time (&rawtime);
    timeinfo = localtime (&rawtime);
    std::ofstream out("log", std::ofstream::app);

    // out<<logMess<<std::endl;

    if(isAutomatic())
    {
        out<<logMess<<std::endl;
    }
    else
    {
        std::cout<<"j'écris pas"<<std::endl;
    }
}
コード例 #2
0
	/** 
	 * Define implicit convertion to T
	**/
	operator T() {
		if(isAutomatic())
			step();
		return _value;
	}