JAULA::Name_Duplicated Class Reference
JAULA: Error handling

Class for bad object property name exceptions. More...

`#include <jaula_name_duplicated.h>`

Inheritance diagram for JAULA::Name_Duplicated:

## Public Member Functions

virtual std::string const & | getDetail (void) const
| Retrieves the detailed description for the exception.
std::string const & | getName (void) const
| Retrieves the name of the duplicated property.
| Name_Duplicated (std::string const &name="", std::string const &action="", std::string const &origin="")
| Constructor.
Name_Duplicated & | operator= (Name_Duplicated const &orig)
| Assignment operator.
void | setName (std::string const &name)
| Establishes the name for the duplicated property.
virtual | ~Name_Duplicated ()
| Destructor.
Public Member Functions inherited from JAULA::Exception
void | addOrigin (std::string const &origin)
| Attachs a new origin after the existing ones.
void | display (std::ostream &ostr) const
| Represents the instance in a stream.
| Exception (Exception const &orig)
| Copy constructor.
| Exception (ExCode code=NO_ERROR, std::string const &detail="", std::string const &action="", std::string const &origin="")
| Constructor.
std::string const & | getAction (void) const
| Retrieves the action that caused the exception.
ExCode | getCode (void) const
| Retrieves the error code for the exception.
std::string const & | getOrigin (void) const
| Retrieves the method being run when the exception arose.
Exception & | operator= (Exception const &orig)
| Assignment operator.
void | setAction (std::string const &action)
| Establishes the action that caused the exception.
void | setDetail (std::string const &detail)
| Establishes the description for the exception.
void | setOrigin (std::string const &origin)
| Establishes the method being run when the exception arose.
virtual | ~Exception ()
| Destructor.

## Private Attributes

std::string | detail_
std::string | name_

## Additional Inherited Members

Public Types inherited from JAULA::Exception
enum | ExCode { NO_ERROR , BAD_DATA_TYPE , NAME_DUPLICATED , LEXAN_ERROR , SYNTAX_ERROR }
| Enumeration of available error codes. More...
Protected Member Functions inherited from JAULA::Exception
void | setCode (ExCode code)
| Establishes the error code for the exception.

## Detailed Description

Class for bad object property name exceptions.

  This class defines the exceptions to be thrown in case a property name has been used more than once in the same object.

Author
  Kombo Morongo moron.nosp@m.go66.nosp@m.6@gma.nosp@m.il.c.nosp@m.om

## Constructor & Destructor Documentation

## Name_Duplicated()

JAULA::Name_Duplicated::Name_Duplicated | ( | std::string const & | name = "",
|  | std::string const & | action = "",
|  | std::string const & | origin = "" )

Constructor.

Parameters

  name | Invalid object property name (duplicated).
  action | action being performed when the exception arose.
  origin | Name of the method (and others methods that have called this) by the time the exception arose.

Description
  This method construct a new exception instance with JAULA::Name_DUPLICATED code.

References detail_, JAULA::Exception::Exception(), name_, JAULA::Exception::NAME_DUPLICATED, and setName().

Referenced by operator=().

## ~Name_Duplicated()

JAULA::Name_Duplicated::~Name_Duplicated | ( |  | ) |

virtual

Destructor.

## Member Function Documentation

## getDetail()

std::string const & JAULA::Name_Duplicated::getDetail | ( | void |  | ) | const

virtual

Retrieves the detailed description for the exception.

Description
  This method creates a standard detailed description for the exception based on the duplicated object property name.

Reimplemented from JAULA::Exception.

References detail_.

## getName()

std::string const & JAULA::Name_Duplicated::getName | ( | void |  | ) | const

Retrieves the name of the duplicated property.

References name_.

## operator=()

Name_Duplicated & JAULA::Name_Duplicated::operator= | ( | Name_Duplicated const & | orig | ) |

Assignment operator.

Parameters

  orig | Original instance to copy

Returns
  a reference to the destination instance

Description
  Copies the contents of the original instance to destination.

Note
  This method has been redefined from the base class preventing instance type modification.

References Name_Duplicated(), and JAULA::Exception::operator=().

## setName()

void JAULA::Name_Duplicated::setName | ( | std::string const & | name | ) |

Establishes the name for the duplicated property.

Parameters

  name | Name of the object property that launched the exception.

References detail_, and name_.

Referenced by Name_Duplicated().

## Field Documentation

## detail_

std::string JAULA::Name_Duplicated::detail_

private

workspace where to generate class specific detail

Referenced by getDetail(), Name_Duplicated(), and setName().

## name_

std::string JAULA::Name_Duplicated::name_

private

Container for the repeated name

Referenced by getName(), Name_Duplicated(), and setName().

The documentation for this class was generated from the following files:

- jaula_name_duplicated.h
- jaula_name_duplicated.cc

Back to JAULA Project Documentation Page.

Go to JAULA Project Home Page.

Copyright (c) 2007, 2008, 2009 Kombo Morongo.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".

SourceForge.net