1.4 (revision 3771)
otf2/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  *
00007  * Copyright (c) 2009-2012,
00008  * Gesellschaft fuer numerische Simulation mbH Braunschweig, Germany
00009  *
00010  * Copyright (c) 2009-2012,
00011  * Technische Universitaet Dresden, Germany
00012  *
00013  * Copyright (c) 2009-2012,
00014  * University of Oregon, Eugene, USA
00015  *
00016  * Copyright (c) 2009-2012,
00017  * Forschungszentrum Juelich GmbH, Germany
00018  *
00019  * Copyright (c) 2009-2012,
00020  * German Research School for Simulation Sciences GmbH, Juelich/Aachen, Germany
00021  *
00022  * Copyright (c) 2009-2012,
00023  * Technische Universitaet Muenchen, Germany
00024  *
00025  * This software may be modified and distributed under the terms of
00026  * a BSD-style license.  See the COPYING file in the package base
00027  * directory for details.
00028  *
00029  */
00030 
00031 
00032 #ifndef OTF2_ATTRIBUTE_LIST_H
00033 #define OTF2_ATTRIBUTE_LIST_H
00034 
00035 
00085 #include <stdint.h>
00086 #ifndef __cplusplus
00087 #include <stdbool.h>
00088 #endif
00089 
00090 
00091 #include <otf2/OTF2_ErrorCodes.h>
00092 
00093 
00094 #include <otf2/OTF2_GeneralDefinitions.h>
00095 
00096 
00097 #ifdef __cplusplus
00098 extern "C" {
00099 #endif /* __cplusplus */
00100 
00101 
00107 typedef union OTF2_AttributeValue_union
00108 {
00110     uint8_t  uint8;
00112     uint16_t uint16;
00114     uint32_t uint32;
00116     uint64_t uint64;
00118     int8_t   int8;
00120     int16_t  int16;
00122     int32_t  int32;
00124     int64_t  int64;
00126     float    float32;
00128     double   float64;
00134     OTF2_StringRef stringRef;
00140     OTF2_AttributeRef attributeRef;
00146     OTF2_LocationRef locationRef;
00152     OTF2_RegionRef regionRef;
00158     OTF2_GroupRef groupRef;
00164     OTF2_MetricRef metricRef;
00170     OTF2_CommRef commRef;
00176     OTF2_ParameterRef parameterRef;
00182     OTF2_RmaWinRef rmaWinRef;
00183 } OTF2_AttributeValue;
00184 
00185 
00187 typedef struct OTF2_AttributeList_struct OTF2_AttributeList;
00188 
00189 
00195 OTF2_AttributeList*
00196 OTF2_AttributeList_New( void );
00197 
00198 
00207 OTF2_ErrorCode
00208 OTF2_AttributeList_Delete( OTF2_AttributeList* attributeList );
00209 
00210 
00223 OTF2_ErrorCode
00224 OTF2_AttributeList_AddAttribute( OTF2_AttributeList* attributeList,
00225                                  OTF2_AttributeRef   attribute,
00226                                  OTF2_Type           type,
00227                                  OTF2_AttributeValue attributeValue );
00228 
00229 
00230 
00242 OTF2_ErrorCode
00243 OTF2_AttributeList_AddUint8( OTF2_AttributeList* attributeList,
00244                              OTF2_AttributeRef   attribute,
00245                              uint8_t             uint8Value );
00246 
00247 
00259 OTF2_ErrorCode
00260 OTF2_AttributeList_AddUint16( OTF2_AttributeList* attributeList,
00261                               OTF2_AttributeRef   attribute,
00262                               uint16_t            uint16Value );
00263 
00264 
00276 OTF2_ErrorCode
00277 OTF2_AttributeList_AddUint32( OTF2_AttributeList* attributeList,
00278                               OTF2_AttributeRef   attribute,
00279                               uint32_t            uint32Value );
00280 
00281 
00293 OTF2_ErrorCode
00294 OTF2_AttributeList_AddUint64( OTF2_AttributeList* attributeList,
00295                               OTF2_AttributeRef   attribute,
00296                               uint64_t            uint64Value );
00297 
00298 
00310 OTF2_ErrorCode
00311 OTF2_AttributeList_AddInt8( OTF2_AttributeList* attributeList,
00312                             OTF2_AttributeRef   attribute,
00313                             int8_t              int8Value );
00314 
00315 
00327 OTF2_ErrorCode
00328 OTF2_AttributeList_AddInt16( OTF2_AttributeList* attributeList,
00329                              OTF2_AttributeRef   attribute,
00330                              int16_t             int16Value );
00331 
00332 
00344 OTF2_ErrorCode
00345 OTF2_AttributeList_AddInt32( OTF2_AttributeList* attributeList,
00346                              OTF2_AttributeRef   attribute,
00347                              int32_t             int32Value );
00348 
00349 
00361 OTF2_ErrorCode
00362 OTF2_AttributeList_AddInt64( OTF2_AttributeList* attributeList,
00363                              OTF2_AttributeRef   attribute,
00364                              int64_t             int64Value );
00365 
00366 
00378 OTF2_ErrorCode
00379 OTF2_AttributeList_AddFloat( OTF2_AttributeList* attributeList,
00380                              OTF2_AttributeRef   attribute,
00381                              float               float32Value );
00382 
00383 
00395 OTF2_ErrorCode
00396 OTF2_AttributeList_AddDouble( OTF2_AttributeList* attributeList,
00397                               OTF2_AttributeRef   attribute,
00398                               double              float64Value );
00399 
00400 
00414 OTF2_ErrorCode
00415 OTF2_AttributeList_AddString( OTF2_AttributeList* attributeList,
00416                               OTF2_AttributeRef   attribute,
00417                               OTF2_StringRef      stringRef );
00418 
00419 
00431 OTF2_ErrorCode
00432 OTF2_AttributeList_AddStringRef( OTF2_AttributeList* attributeList,
00433                                  OTF2_AttributeRef   attribute,
00434                                  OTF2_StringRef      stringRef );
00435 
00436 
00448 OTF2_ErrorCode
00449 OTF2_AttributeList_AddAttributeRef( OTF2_AttributeList* attributeList,
00450                                     OTF2_AttributeRef   attribute,
00451                                     OTF2_AttributeRef   attributeRef );
00452 
00453 
00465 OTF2_ErrorCode
00466 OTF2_AttributeList_AddLocationRef( OTF2_AttributeList* attributeList,
00467                                    OTF2_AttributeRef   attribute,
00468                                    OTF2_LocationRef    locationRef );
00469 
00470 
00482 OTF2_ErrorCode
00483 OTF2_AttributeList_AddRegionRef( OTF2_AttributeList* attributeList,
00484                                  OTF2_AttributeRef   attribute,
00485                                  OTF2_RegionRef      regionRef );
00486 
00487 
00499 OTF2_ErrorCode
00500 OTF2_AttributeList_AddGroupRef( OTF2_AttributeList* attributeList,
00501                                 OTF2_AttributeRef   attribute,
00502                                 OTF2_GroupRef       groupRef );
00503 
00504 
00516 OTF2_ErrorCode
00517 OTF2_AttributeList_AddMetricRef( OTF2_AttributeList* attributeList,
00518                                  OTF2_AttributeRef   attribute,
00519                                  OTF2_MetricRef      metricRef );
00520 
00521 
00533 OTF2_ErrorCode
00534 OTF2_AttributeList_AddCommRef( OTF2_AttributeList* attributeList,
00535                                OTF2_AttributeRef   attribute,
00536                                OTF2_CommRef        commRef );
00537 
00538 
00550 OTF2_ErrorCode
00551 OTF2_AttributeList_AddParameterRef( OTF2_AttributeList* attributeList,
00552                                     OTF2_AttributeRef   attribute,
00553                                     OTF2_ParameterRef   parameterRef );
00554 
00555 
00567 OTF2_ErrorCode
00568 OTF2_AttributeList_AddRmaWinRef( OTF2_AttributeList* attributeList,
00569                                  OTF2_AttributeRef   attribute,
00570                                  OTF2_RmaWinRef      rmaWinRef );
00571 
00572 
00580 OTF2_ErrorCode
00581 OTF2_AttributeList_RemoveAttribute( OTF2_AttributeList* attributeList,
00582                                     OTF2_AttributeRef   attribute );
00583 
00584 
00591 OTF2_ErrorCode
00592 OTF2_AttributeList_RemoveAllAttributes( OTF2_AttributeList* attributeList );
00593 
00594 
00602 bool
00603 OTF2_AttributeList_TestAttributeByID( const OTF2_AttributeList* attributeList,
00604                                       OTF2_AttributeRef         attribute );
00605 
00606 
00616 OTF2_ErrorCode
00617 OTF2_AttributeList_GetAttributeByID( const OTF2_AttributeList* attributeList,
00618                                      OTF2_AttributeRef         attribute,
00619                                      OTF2_Type*                type,
00620                                      OTF2_AttributeValue*      attributeValue );
00621 
00622 
00634 OTF2_ErrorCode
00635 OTF2_AttributeList_GetUint8( const OTF2_AttributeList* attributeList,
00636                              OTF2_AttributeRef         attribute,
00637                              uint8_t*                  uint8Value );
00638 
00639 
00651 OTF2_ErrorCode
00652 OTF2_AttributeList_GetUint16( const OTF2_AttributeList* attributeList,
00653                               OTF2_AttributeRef         attribute,
00654                               uint16_t*                 uint16Value );
00655 
00656 
00668 OTF2_ErrorCode
00669 OTF2_AttributeList_GetUint32( const OTF2_AttributeList* attributeList,
00670                               OTF2_AttributeRef         attribute,
00671                               uint32_t*                 uint32Value );
00672 
00673 
00685 OTF2_ErrorCode
00686 OTF2_AttributeList_GetUint64( const OTF2_AttributeList* attributeList,
00687                               OTF2_AttributeRef         attribute,
00688                               uint64_t*                 uint64Value );
00689 
00690 
00702 OTF2_ErrorCode
00703 OTF2_AttributeList_GetInt8( const OTF2_AttributeList* attributeList,
00704                             OTF2_AttributeRef         attribute,
00705                             int8_t*                   int8Value );
00706 
00707 
00719 OTF2_ErrorCode
00720 OTF2_AttributeList_GetInt16( const OTF2_AttributeList* attributeList,
00721                              OTF2_AttributeRef         attribute,
00722                              int16_t*                  int16Value );
00723 
00724 
00736 OTF2_ErrorCode
00737 OTF2_AttributeList_GetInt32( const OTF2_AttributeList* attributeList,
00738                              OTF2_AttributeRef         attribute,
00739                              int32_t*                  int32Value );
00740 
00741 
00753 OTF2_ErrorCode
00754 OTF2_AttributeList_GetInt64( const OTF2_AttributeList* attributeList,
00755                              OTF2_AttributeRef         attribute,
00756                              int64_t*                  int64Value );
00757 
00758 
00770 OTF2_ErrorCode
00771 OTF2_AttributeList_GetFloat( const OTF2_AttributeList* attributeList,
00772                              OTF2_AttributeRef         attribute,
00773                              float*                    float32Value );
00774 
00775 
00787 OTF2_ErrorCode
00788 OTF2_AttributeList_GetDouble( const OTF2_AttributeList* attributeList,
00789                               OTF2_AttributeRef         attribute,
00790                               double*                   float64Value );
00791 
00792 
00806 OTF2_ErrorCode
00807 OTF2_AttributeList_GetString( const OTF2_AttributeList* attributeList,
00808                               OTF2_AttributeRef         attribute,
00809                               OTF2_StringRef*           stringRef );
00810 
00811 
00823 OTF2_ErrorCode
00824 OTF2_AttributeList_GetStringRef( const OTF2_AttributeList* attributeList,
00825                                  OTF2_AttributeRef         attribute,
00826                                  OTF2_StringRef*           stringRef );
00827 
00828 
00840 OTF2_ErrorCode
00841 OTF2_AttributeList_GetAttributeRef( const OTF2_AttributeList* attributeList,
00842                                     OTF2_AttributeRef         attribute,
00843                                     OTF2_AttributeRef*        attributeRef );
00844 
00845 
00857 OTF2_ErrorCode
00858 OTF2_AttributeList_GetLocationRef( const OTF2_AttributeList* attributeList,
00859                                    OTF2_AttributeRef         attribute,
00860                                    OTF2_LocationRef*         locationRef );
00861 
00862 
00874 OTF2_ErrorCode
00875 OTF2_AttributeList_GetRegionRef( const OTF2_AttributeList* attributeList,
00876                                  OTF2_AttributeRef         attribute,
00877                                  OTF2_RegionRef*           regionRef );
00878 
00879 
00891 OTF2_ErrorCode
00892 OTF2_AttributeList_GetGroupRef( const OTF2_AttributeList* attributeList,
00893                                 OTF2_AttributeRef         attribute,
00894                                 OTF2_GroupRef*            groupRef );
00895 
00896 
00908 OTF2_ErrorCode
00909 OTF2_AttributeList_GetMetricRef( const OTF2_AttributeList* attributeList,
00910                                  OTF2_AttributeRef         attribute,
00911                                  OTF2_MetricRef*           metricRef );
00912 
00913 
00925 OTF2_ErrorCode
00926 OTF2_AttributeList_GetCommRef( const OTF2_AttributeList* attributeList,
00927                                OTF2_AttributeRef         attribute,
00928                                OTF2_CommRef*             commRef );
00929 
00930 
00942 OTF2_ErrorCode
00943 OTF2_AttributeList_GetParameterRef( const OTF2_AttributeList* attributeList,
00944                                     OTF2_AttributeRef         attribute,
00945                                     OTF2_ParameterRef*        parameterRef );
00946 
00947 
00959 OTF2_ErrorCode
00960 OTF2_AttributeList_GetRmaWinRef( const OTF2_AttributeList* attributeList,
00961                                  OTF2_AttributeRef         attribute,
00962                                  OTF2_RmaWinRef*           rmaWinRef );
00963 
00964 
00975 OTF2_ErrorCode
00976 OTF2_AttributeList_GetAttributeByIndex( const OTF2_AttributeList* attributeList,
00977                                         uint32_t                  index,
00978                                         OTF2_AttributeRef*        attribute,
00979                                         OTF2_Type*                type,
00980                                         OTF2_AttributeValue*      attributeValue );
00981 
00982 
00994 OTF2_ErrorCode
00995 OTF2_AttributeList_PopAttribute( OTF2_AttributeList*  attributeList,
00996                                  OTF2_AttributeRef*   attribute,
00997                                  OTF2_Type*           type,
00998                                  OTF2_AttributeValue* attributeValue );
00999 
01000 
01008 uint32_t
01009 OTF2_AttributeList_GetNumberOfElements( const OTF2_AttributeList* attributeList );
01010 
01011 
01012 #ifdef __cplusplus
01013 }
01014 #endif /* __cplusplus */
01015 
01016 
01017 #endif /* !OTF2_ATTRIBUTE_LIST_H */