⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 imgobjdatabase.h

📁 face recognition using hmm. first version.
💻 H
字号:
/*
/*	Description: Implements a simple database of imgusers 
*/

#ifndef _ImgObjDatabase_H_
#define _ImgObjDatabase_H_

#include "ImgObj.h"
#include <vector>
#include <iostream>

//Exception specification warning
#pragma warning( disable : 4290 )

class ImgObjDatabase
{
public:

	ImgObjDatabase( );

	virtual ~ImgObjDatabase( );

	void Create( const std::string &databaseName );

	void Load( const std::string &databaseName, const std::string &path );

	void Save( const std::string &path );

	void Release( );

	void LoadObj( const std::string &userName, const std::string &path );

	void AddObj( const std::string &userName );

	void RemoveObj( size_t index );

	void RemoveObj( const std::string &userName );

	ImgObj& GetObj( size_t index );

	ImgObj& GetObj( const std::string &userName ) throw( exception );

	size_t GetNoObjs( ) const;

	friend std::ostream& operator<<( std::ostream &os, ImgObjDatabase &obj );

private:

	//Stores all the users with their 
	//associated properties
	std::vector< ImgObj* > _objs;

	//Name of the database file
	std::string _databaseName;
};

std::ostream& operator<<( std::ostream &os, ImgObjDatabase &obj );

#endif //_ImgObjDatabase_H_

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -