MusicBrainz::User Class Reference

Represents a MusicBrainz user. More...

List of all members.

Public Member Functions

 User ()
 Constructor.
virtual ~User ()
 Destructor.
std::string getName () const
 Returns the user name.
void setName (const std::string &name)
 Sets the user name.
std::vector< std::string > & getTypes ()
 Returns the types of this user.
int getNumTypes () const
 Returns number of types.
std::string getType (int index) const
 Returns an type specified by index.
void addType (const std::string &type)
 Add a type to the list of types.
bool getShowNag () const
 Returns true if a nag screen should be displayed to the user.
void setShowNag (bool value)
 Sets the value of the nag screen flag.


Detailed Description

Represents a MusicBrainz user.

Constructor & Destructor Documentation

MusicBrainz::User::User (  ) 

Constructor.

virtual MusicBrainz::User::~User (  )  [virtual]

Destructor.


Member Function Documentation

void MusicBrainz::User::addType ( const std::string &  type  ) 

Add a type to the list of types.

Parameters:
type a string containing absolute URIs
See also:
getTypes

std::string MusicBrainz::User::getName (  )  const

Returns the user name.

Returns:
a string containing the user name

int MusicBrainz::User::getNumTypes (  )  const

Returns number of types.

This is equivalent to getTypes().size()

Returns:
an int containing number of types
See also:
getTypes

bool MusicBrainz::User::getShowNag (  )  const

Returns true if a nag screen should be displayed to the user.

Returns:
true or false

std::string MusicBrainz::User::getType ( int  index  )  const

Returns an type specified by index.

This is equivalent to getTypes()[index]

Returns:
a string containing the type
See also:
getTypes

std::vector<std::string>& MusicBrainz::User::getTypes (  ) 

Returns the types of this user.

Most users' type list is empty. Currently, the following types are defined:

  • "http://musicbrainz.org/ns/ext-1.0#AutoEditor"
  • "http://musicbrainz.org/ns/ext-1.0#RelationshipEditor"
  • "http://musicbrainz.org/ns/ext-1.0#Bot"
  • "http://musicbrainz.org/ns/ext-1.0#NotNaggable"

Returns:
a vector of strings containing absolute URIs

void MusicBrainz::User::setName ( const std::string &  name  ) 

Sets the user name.

Parameters:
name a string containing the user name

void MusicBrainz::User::setShowNag ( bool  value  ) 

Sets the value of the nag screen flag.

Parameters:
value true or false
See also:
getShowNag


Generated on Wed Feb 25 12:17:41 2009 for libmusicbrainz3 by  doxygen 1.5.8