// Note: Instrumentation statements are highlighted in green

#ifndef __PERSONALINFO_HPP
#define __PERSONALINFO_HPP

#include <iostream>
#include <vobject.hpp>
#include <vutility.hpp>
#include "relationshipinfo.hpp"
#include "stl/vlist"

using namespace visibility;

typedef vlist<RelationshipInfo> RelationshipList // Use vlist in place of stl::list


const unsigned short UNSPECIFIED  = 0x0000;
const unsigned short MALE          = 0x0001;
const unsigned short FEMALE        = 0x0002;


///////////////////////////////////////////////////////////////////////////////
// Bitset definitions
///////////////////////////////////////////////////////////////////////////////

VBITSET_START(Gender)
VEXCLUSIVE_VALUE(UNSPECIFIED, 0xffff, "Unspecified", 0)
VEXCLUSIVE_VALUE(MALE, 0xffff, "Male", 0)
VEXCLUSIVE_VALUE(FEMALE, 0xffff, "Female", 0)
VBITSET_END

///////////////////////////////////////////////////////////////////////////////
// PersonalInfo class
///////////////////////////////////////////////////////////////////////////////


class PersonalInfo : public VObject   // Add VObject to the inheritance chain
{
  DECLARE_VISIBILITY(PersonalInfo)      // Instrumentation statement

public: // data
  RelationshipInfo newRelationship;
  unsigned short gender;
  bool enableBirthday;
  bool enableAnniversary;
  time_t birthday;
  time_t anniversary;
  RelationshipList relationshipList;
  RelationshipList::iterator relationshipIter;

public: // functions
  PersonalInfo(void);
  PersonalInfo(const PersonalInfo & that);
  virtual ~PersonalInfo(void);
  PersonalInfo & operator =(const PersonalInfo & that);
  void add(void);
  void remove(void);
  virtual void populateEditView(void);
  friend std::ostream & operator<< (std::ostream & os, PersonalInfo & obj);
  friend std::istream & operator>> (std::istream & is, PersonalInfo & obj);
};
DECLARE_VISIBILITY_CREATOR(PersonalInfo)      // Instrumentation statement

#endif // __PERSONALINFO_HPP
Copyright 2002-2007 Outerface Technologies, Inc.