1.2 (revision 3183)

OTF2_AttributeList.h

Go to the documentation of this file.
00001 /*
00002  * This file is part of the Score-P software (http://www.score-p.org)
00003  *
00004  * Copyright (c) 2009-2012,
00005  *    RWTH Aachen University, Germany
00006  *    Gesellschaft fuer numerische Simulation mbH Braunschweig, Germany
00007  *    Technische Universitaet Dresden, Germany
00008  *    University of Oregon, Eugene, USA
00009  *    Forschungszentrum Juelich GmbH, Germany
00010  *    German Research School for Simulation Sciences GmbH, Juelich/Aachen, Germany
00011  *    Technische Universitaet Muenchen, Germany
00012  *
00013  * See the COPYING file in the package base directory for details.
00014  *
00015  */
00016 
00017 
00018 #ifndef OTF2_ATTRIBUTE_LIST_H
00019 #define OTF2_ATTRIBUTE_LIST_H
00020 
00021 
00067 #include <stdint.h>
00068 #ifndef __cplusplus
00069 #include <stdbool.h>
00070 #endif
00071 
00072 
00073 #include <otf2/OTF2_ErrorCodes.h>
00074 
00075 
00076 #include <otf2/OTF2_GeneralDefinitions.h>
00077 
00078 
00079 #ifdef __cplusplus
00080 extern "C" {
00081 #endif /* __cplusplus */
00082 
00083 
00089 typedef union OTF2_AttributeValue_union
00090 {
00092     uint8_t  uint8;
00094     uint16_t uint16;
00096     uint32_t uint32;
00098     uint64_t uint64;
00100     int8_t   int8;
00102     int16_t  int16;
00104     int32_t  int32;
00106     int64_t  int64;
00108     float    float32;
00110     double   float64;
00116     OTF2_StringRef stringRef;
00122     OTF2_AttributeRef attributeRef;
00128     OTF2_LocationRef locationRef;
00134     OTF2_RegionRef regionRef;
00140     OTF2_GroupRef groupRef;
00146     OTF2_MetricRef metricRef;
00152     OTF2_CommRef commRef;
00158     OTF2_ParameterRef parameterRef;
00164     OTF2_RmaWinRef rmaWinRef;
00165 } OTF2_AttributeValue;
00166 
00167 
00169 typedef struct OTF2_AttributeList_struct OTF2_AttributeList;
00170 
00171 
00177 OTF2_AttributeList*
00178 OTF2_AttributeList_New( void );
00179 
00180 
00189 OTF2_ErrorCode
00190 OTF2_AttributeList_Delete( OTF2_AttributeList* attributeList );
00191 
00192 
00205 OTF2_ErrorCode
00206 OTF2_AttributeList_AddAttribute( OTF2_AttributeList* attributeList,
00207                                  OTF2_AttributeRef   attribute,
00208                                  OTF2_Type           type,
00209                                  OTF2_AttributeValue attributeValue );
00210 
00211 
00212 
00224 OTF2_ErrorCode
00225 OTF2_AttributeList_AddUint8( OTF2_AttributeList* attributeList,
00226                              OTF2_AttributeRef   attribute,
00227                              uint8_t             uint8Value );
00228 
00229 
00241 OTF2_ErrorCode
00242 OTF2_AttributeList_AddUint16( OTF2_AttributeList* attributeList,
00243                               OTF2_AttributeRef   attribute,
00244                               uint16_t            uint16Value );
00245 
00246 
00258 OTF2_ErrorCode
00259 OTF2_AttributeList_AddUint32( OTF2_AttributeList* attributeList,
00260                               OTF2_AttributeRef   attribute,
00261                               uint32_t            uint32Value );
00262 
00263 
00275 OTF2_ErrorCode
00276 OTF2_AttributeList_AddUint64( OTF2_AttributeList* attributeList,
00277                               OTF2_AttributeRef   attribute,
00278                               uint64_t            uint64Value );
00279 
00280 
00292 OTF2_ErrorCode
00293 OTF2_AttributeList_AddInt8( OTF2_AttributeList* attributeList,
00294                             OTF2_AttributeRef   attribute,
00295                             int8_t              int8Value );
00296 
00297 
00309 OTF2_ErrorCode
00310 OTF2_AttributeList_AddInt16( OTF2_AttributeList* attributeList,
00311                              OTF2_AttributeRef   attribute,
00312                              int16_t             int16Value );
00313 
00314 
00326 OTF2_ErrorCode
00327 OTF2_AttributeList_AddInt32( OTF2_AttributeList* attributeList,
00328                              OTF2_AttributeRef   attribute,
00329                              int32_t             int32Value );
00330 
00331 
00343 OTF2_ErrorCode
00344 OTF2_AttributeList_AddInt64( OTF2_AttributeList* attributeList,
00345                              OTF2_AttributeRef   attribute,
00346                              int64_t             int64Value );
00347 
00348 
00360 OTF2_ErrorCode
00361 OTF2_AttributeList_AddFloat( OTF2_AttributeList* attributeList,
00362                              OTF2_AttributeRef   attribute,
00363                              float               float32Value );
00364 
00365 
00377 OTF2_ErrorCode
00378 OTF2_AttributeList_AddDouble( OTF2_AttributeList* attributeList,
00379                               OTF2_AttributeRef   attribute,
00380                               double              float64Value );
00381 
00382 
00396 OTF2_ErrorCode
00397 OTF2_AttributeList_AddString( OTF2_AttributeList* attributeList,
00398                               OTF2_AttributeRef   attribute,
00399                               OTF2_StringRef      stringRef );
00400 
00401 
00413 OTF2_ErrorCode
00414 OTF2_AttributeList_AddStringRef( OTF2_AttributeList* attributeList,
00415                                  OTF2_AttributeRef   attribute,
00416                                  OTF2_StringRef      stringRef );
00417 
00418 
00430 OTF2_ErrorCode
00431 OTF2_AttributeList_AddAttributeRef( OTF2_AttributeList* attributeList,
00432                                     OTF2_AttributeRef   attribute,
00433                                     OTF2_AttributeRef   attributeRef );
00434 
00435 
00447 OTF2_ErrorCode
00448 OTF2_AttributeList_AddLocationRef( OTF2_AttributeList* attributeList,
00449                                    OTF2_AttributeRef   attribute,
00450                                    OTF2_LocationRef    locationRef );
00451 
00452 
00464 OTF2_ErrorCode
00465 OTF2_AttributeList_AddRegionRef( OTF2_AttributeList* attributeList,
00466                                  OTF2_AttributeRef   attribute,
00467                                  OTF2_RegionRef      regionRef );
00468 
00469 
00481 OTF2_ErrorCode
00482 OTF2_AttributeList_AddGroupRef( OTF2_AttributeList* attributeList,
00483                                 OTF2_AttributeRef   attribute,
00484                                 OTF2_GroupRef       groupRef );
00485 
00486 
00498 OTF2_ErrorCode
00499 OTF2_AttributeList_AddMetricRef( OTF2_AttributeList* attributeList,
00500                                  OTF2_AttributeRef   attribute,
00501                                  OTF2_MetricRef      metricRef );
00502 
00503 
00515 OTF2_ErrorCode
00516 OTF2_AttributeList_AddCommRef( OTF2_AttributeList* attributeList,
00517                                OTF2_AttributeRef   attribute,
00518                                OTF2_CommRef        commRef );
00519 
00520 
00532 OTF2_ErrorCode
00533 OTF2_AttributeList_AddParameterRef( OTF2_AttributeList* attributeList,
00534                                     OTF2_AttributeRef   attribute,
00535                                     OTF2_ParameterRef   parameterRef );
00536 
00537 
00549 OTF2_ErrorCode
00550 OTF2_AttributeList_AddRmaWinRef( OTF2_AttributeList* attributeList,
00551                                  OTF2_AttributeRef   attribute,
00552                                  OTF2_RmaWinRef      rmaWinRef );
00553 
00554 
00562 OTF2_ErrorCode
00563 OTF2_AttributeList_RemoveAttribute( OTF2_AttributeList* attributeList,
00564                                     OTF2_AttributeRef   attribute );
00565 
00566 
00573 OTF2_ErrorCode
00574 OTF2_AttributeList_RemoveAllAttributes( OTF2_AttributeList* attributeList );
00575 
00576 
00584 bool
00585 OTF2_AttributeList_TestAttributeByID( const OTF2_AttributeList* attributeList,
00586                                       OTF2_AttributeRef         attribute );
00587 
00588 
00598 OTF2_ErrorCode
00599 OTF2_AttributeList_GetAttributeByID( const OTF2_AttributeList* attributeList,
00600                                      OTF2_AttributeRef         attribute,
00601                                      OTF2_Type*                type,
00602                                      OTF2_AttributeValue*      attributeValue );
00603 
00604 
00616 OTF2_ErrorCode
00617 OTF2_AttributeList_GetUint8( const OTF2_AttributeList* attributeList,
00618                              OTF2_AttributeRef         attribute,
00619                              uint8_t*                  uint8Value );
00620 
00621 
00633 OTF2_ErrorCode
00634 OTF2_AttributeList_GetUint16( const OTF2_AttributeList* attributeList,
00635                               OTF2_AttributeRef         attribute,
00636                               uint16_t*                 uint16Value );
00637 
00638 
00650 OTF2_ErrorCode
00651 OTF2_AttributeList_GetUint32( const OTF2_AttributeList* attributeList,
00652                               OTF2_AttributeRef         attribute,
00653                               uint32_t*                 uint32Value );
00654 
00655 
00667 OTF2_ErrorCode
00668 OTF2_AttributeList_GetUint64( const OTF2_AttributeList* attributeList,
00669                               OTF2_AttributeRef         attribute,
00670                               uint64_t*                 uint64Value );
00671 
00672 
00684 OTF2_ErrorCode
00685 OTF2_AttributeList_GetInt8( const OTF2_AttributeList* attributeList,
00686                             OTF2_AttributeRef         attribute,
00687                             int8_t*                   int8Value );
00688 
00689 
00701 OTF2_ErrorCode
00702 OTF2_AttributeList_GetInt16( const OTF2_AttributeList* attributeList,
00703                              OTF2_AttributeRef         attribute,
00704                              int16_t*                  int16Value );
00705 
00706 
00718 OTF2_ErrorCode
00719 OTF2_AttributeList_GetInt32( const OTF2_AttributeList* attributeList,
00720                              OTF2_AttributeRef         attribute,
00721                              int32_t*                  int32Value );
00722 
00723 
00735 OTF2_ErrorCode
00736 OTF2_AttributeList_GetInt64( const OTF2_AttributeList* attributeList,
00737                              OTF2_AttributeRef         attribute,
00738                              int64_t*                  int64Value );
00739 
00740 
00752 OTF2_ErrorCode
00753 OTF2_AttributeList_GetFloat( const OTF2_AttributeList* attributeList,
00754                              OTF2_AttributeRef         attribute,
00755                              float*                    float32Value );
00756 
00757 
00769 OTF2_ErrorCode
00770 OTF2_AttributeList_GetDouble( const OTF2_AttributeList* attributeList,
00771                               OTF2_AttributeRef         attribute,
00772                               double*                   float64Value );
00773 
00774 
00788 OTF2_ErrorCode
00789 OTF2_AttributeList_GetString( const OTF2_AttributeList* attributeList,
00790                               OTF2_AttributeRef         attribute,
00791                               OTF2_StringRef*           stringRef );
00792 
00793 
00805 OTF2_ErrorCode
00806 OTF2_AttributeList_GetStringRef( const OTF2_AttributeList* attributeList,
00807                                  OTF2_AttributeRef         attribute,
00808                                  OTF2_StringRef*           stringRef );
00809 
00810 
00822 OTF2_ErrorCode
00823 OTF2_AttributeList_GetAttributeRef( const OTF2_AttributeList* attributeList,
00824                                     OTF2_AttributeRef         attribute,
00825                                     OTF2_AttributeRef*        attributeRef );
00826 
00827 
00839 OTF2_ErrorCode
00840 OTF2_AttributeList_GetLocationRef( const OTF2_AttributeList* attributeList,
00841                                    OTF2_AttributeRef         attribute,
00842                                    OTF2_LocationRef*         locationRef );
00843 
00844 
00856 OTF2_ErrorCode
00857 OTF2_AttributeList_GetRegionRef( const OTF2_AttributeList* attributeList,
00858                                  OTF2_AttributeRef         attribute,
00859                                  OTF2_RegionRef*           regionRef );
00860 
00861 
00873 OTF2_ErrorCode
00874 OTF2_AttributeList_GetGroupRef( const OTF2_AttributeList* attributeList,
00875                                 OTF2_AttributeRef         attribute,
00876                                 OTF2_GroupRef*            groupRef );
00877 
00878 
00890 OTF2_ErrorCode
00891 OTF2_AttributeList_GetMetricRef( const OTF2_AttributeList* attributeList,
00892                                  OTF2_AttributeRef         attribute,
00893                                  OTF2_MetricRef*           metricRef );
00894 
00895 
00907 OTF2_ErrorCode
00908 OTF2_AttributeList_GetCommRef( const OTF2_AttributeList* attributeList,
00909                                OTF2_AttributeRef         attribute,
00910                                OTF2_CommRef*             commRef );
00911 
00912 
00924 OTF2_ErrorCode
00925 OTF2_AttributeList_GetParameterRef( const OTF2_AttributeList* attributeList,
00926                                     OTF2_AttributeRef         attribute,
00927                                     OTF2_ParameterRef*        parameterRef );
00928 
00929 
00941 OTF2_ErrorCode
00942 OTF2_AttributeList_GetRmaWinRef( const OTF2_AttributeList* attributeList,
00943                                  OTF2_AttributeRef         attribute,
00944                                  OTF2_RmaWinRef*           rmaWinRef );
00945 
00946 
00957 OTF2_ErrorCode
00958 OTF2_AttributeList_GetAttributeByIndex( const OTF2_AttributeList* attributeList,
00959                                         uint32_t                  index,
00960                                         OTF2_AttributeRef*        attribute,
00961                                         OTF2_Type*                type,
00962                                         OTF2_AttributeValue*      attributeValue );
00963 
00964 
00976 OTF2_ErrorCode
00977 OTF2_AttributeList_PopAttribute( OTF2_AttributeList*  attributeList,
00978                                  OTF2_AttributeRef*   attribute,
00979                                  OTF2_Type*           type,
00980                                  OTF2_AttributeValue* attributeValue );
00981 
00982 
00990 uint32_t
00991 OTF2_AttributeList_GetNumberOfElements( const OTF2_AttributeList* attributeList );
00992 
00993 
00994 #ifdef __cplusplus
00995 }
00996 #endif /* __cplusplus */
00997 
00998 
00999 #endif /* !OTF2_ATTRIBUTE_LIST_H */