Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
dsogari-libcpporm-dev / usr / local / include / cpporm / constraint.h
Size: Mime:
#pragma once

#include <cpporm/util/macros.h>

CPPORM_BEGIN_NAMESPACE

// Forward declarations
class Entity;
class Attribute;
class PropertyMap;
class AttributeMap;

/*!
 * \brief Abstract class to represent database constraints
 *
 * An constraint maps a C++ object to a database constraint. All constraints should derive from this
 * class. It has a name, a set of properties and a set of attributes, all being static members of
 * the derived class. It does not contain any internal state.
 */
class CPPORM_EXPORT Constraint
{
public:
    /*!
     * \brief Destructor
     */
    virtual ~Constraint();

    /*!
     * \brief Get constraint name
     * \return The constraint name
     */
    virtual const std::string &GetName() const = 0;

    /*!
     * \brief Get constraint properties
     * \return The constraint properties
     */
    virtual const PropertyMap &GetProperties() const = 0;

    /*!
     * \brief Get constraint attributes
     * \return The constraint attributes
     */
    virtual const AttributeMap &GetAttributes() const = 0;
};

/*!
 * \example cpporm/constraint.cpp
 *
 * This is an example of how to use the Constraint class.
 */

CPPORM_END_NAMESPACE