Click here to Skip to main content
13,093,254 members (78,609 online)
Click here to Skip to main content


19 bookmarked
Posted 22 Apr 2002

Name genderization

, 22 Apr 2002
Extrapolate the gender of a person based on their first name
// CFPSGenderize
// Author:	Matt Gullett
// Copyright (c) 2000
// This is a back-end utility class implementing support for name
// genderization services.  It is an extremely simple class with
// a map of names and genders.
// This class is highly dependent on the list of names/genders 
// available.
// You may freely use this source code in personal, freeware, shareware
// or commercial applications provided that 1) my name is recognized in the
// code and if this code represents a substantial portion of the application
// that my name be included in the credits for the application (about box, etc)
// Use this code at your own risk.  This code is provided AS-IS.  No warranty
// is granted as to the correctness, usefulness or value of this code.
// *******************************************************************
// See .cpp file for tech notes

#if !defined(AFX_FPSGENDERIZER_H__500DF6DA_E2C9_46F2_8D89_C20D96FB77B6__INCLUDED_)
#define AFX_FPSGENDERIZER_H__500DF6DA_E2C9_46F2_8D89_C20D96FB77B6__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000


class CFPSGenderizer  
	virtual char Genderize(LPCTSTR lpszName);
	virtual ~CFPSGenderizer();

	virtual BOOL SetTableName(LPCTSTR lpszName);
	virtual BOOL Load(CArchive& ar);
	virtual BOOL Load(LPCTSTR lpszFileName);
	virtual BOOL Load(_ConnectionPtr& pConnection);

	void AddName(LPCTSTR lpszName, LPCTSTR lpszGender);
	void Optimize(CPtrList& List);

	char		m_szTableName[MAX_PATH+1];

	CMapStringToString	m_mapNames;

#endif // !defined(AFX_FPSGENDERIZER_H__500DF6DA_E2C9_46F2_8D89_C20D96FB77B6__INCLUDED_)

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Matt Gullett
Web Developer
United States United States
No Biography provided

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.170813.1 | Last Updated 23 Apr 2002
Article Copyright 2002 by Matt Gullett
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid