libmusicbrainz3  3.0.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
MusicBrainz::User Class Reference

Represents a MusicBrainz user. More...

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
typea 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:

 - \a "http://musicbrainz.org/ns/ext-1.0#AutoEditor"
 - \a "http://musicbrainz.org/ns/ext-1.0#RelationshipEditor"
 - \a "http://musicbrainz.org/ns/ext-1.0#Bot"
 - \a "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
namea string containing the user name
void MusicBrainz::User::setShowNag ( bool  value)

Sets the value of the nag screen flag.

Parameters
valuetrue or false
See Also
getShowNag