/*
    Copyright 2020 Siemens Digital Industries Software
    ==================================================
    Copyright 2014.
    Siemens Product Lifecycle Management Software Inc.
    All Rights Reserved.
    ==================================================
    Copyright 2020 Siemens Digital Industries Software
*/

/**
    @file

    This file implements Lifecycle Interoperability Services Framework (LIS0LISFMWRK) resource shape attribute 

*/

#ifndef LIS0LISFMWRK_LIS0RESOURCESHAPEATTRIBUTES_HXX
#define LIS0LISFMWRK_LIS0RESOURCESHAPEATTRIBUTES_HXX


#include <string>
#include <map>
#include <unidefs.h>
#include <Lis0lisfmwrk/toolkit/lis_datatypes.h>
#include <property/propdesc.h>

#include <Lis0lisfmwrk/libLis0lisfmwrk_exports.h>

/**
    @defgroup LIS0LISFMWRK Lifecycle Interoperability Services Framework Lis0ResourceShapeAttributes
    @ingroup TC 

    This class provides the mapping of teamcenter properties with Open Services for Lifecycle Collaboration (OSLC) properties corresponding to the Resource.
    <br\> Resource is created based on the above properties.
    <br\> The resource is finally used for generating output response based on the media type 
    @{
*/


namespace lis0lisfmwrk
{
    class Lis0ResourceShapeAttributes;
    /** 
     * A structure to represent Lis0Resource
     */
    typedef struct lis0ResourceShapeStruct_s
    {
        std::string tcPropName;                                     /**< TeamCenter property name */
        std::string title;                                          /**< Oslc:title */
        std::string desc;                                           /**< Oslc:description */
        std::string targetDomain;                                   /**< Target domain namespace URL */

        LIS_properties_value_occurs_t occurs;                       /**< Defines different values that can be used as LIS Property Occurs */
        LIS_properties_value_type_t valueType;                      /**< Defines different values that can be used as LIS property types */
        PROP_value_type_t tcValueType;                              /**< Defines different values that can be used as LIS property types */
        LIS_properties_representation_type_t representation;        /**< Defines different values that can be used as LIS Property Representation types */
        LIS_properties_range_type_t range;                          /**< Defines different values that can be used as LIS Property Range */

        bool isTcField;                                             /**< Flag identifies TeamCenter Property */
        bool isReadOnly;                                            /**< Property can not be changed */
        bool isArray;                                               /**< If Property is multivalued i.e. array*/
    } lis0ResourceShapeStruct_t;

}

/**
   Defines Mapping of the Teamcenter and OSLC properties corresponding to the Resource.
*/
typedef std::map<std::string, lis0lisfmwrk::lis0ResourceShapeStruct_t* > lis0ResourceShapeAttrMap_t; 

class LIS0LISFMWRK_API lis0lisfmwrk::Lis0ResourceShapeAttributes
{
public:

    /** Constructor */
    Lis0ResourceShapeAttributes();

    /** Destructor */
    virtual ~Lis0ResourceShapeAttributes();

    /**
    * Retrieves the mapping of OSLC and teamcenter properties corresponding to the resource
    * @returns Map of OSLC and teamcenter properties corresponding to the resource 
    */
    lis0ResourceShapeAttrMap_t* getResourceShapeAttrMap();

    /**
    * Sets mapping of teamcenter and OSLC properties corresponding to the resource
    * @param [in] Map of OSLC and teamcenter properties
    * @return void
    */
    void setResourceShapeAttrMap( lis0ResourceShapeAttrMap_t *attrMap );

private:

    /** Copy Constructor */
    Lis0ResourceShapeAttributes( const Lis0ResourceShapeAttributes& );

    /** Assignment Operator */
    Lis0ResourceShapeAttributes& operator=( const Lis0ResourceShapeAttributes& );

    lis0ResourceShapeAttrMap_t *m_lis0ResourceShapeAttrMap; 
};

#include <Lis0lisfmwrk/libLis0lisfmwrk_undef.h>
#endif
