| 957 | } |
| 958 | |
| 959 | void PrintAnnotations( YamlOutput& listing, const std::map<StringReference, Annotation>& annotations ) |
| 960 | { |
| 961 | if( !listing.enabled() ) |
| 962 | { |
| 963 | return; |
| 964 | } |
| 965 | listing.literal( "annotations" ).list(); |
| 966 | for( auto a = annotations.begin(); a != annotations.end(); ++a ) |
| 967 | { |
| 968 | listing.dict() |
| 969 | .literal( "name" ) |
| 970 | .literal( g_stringTable.GetString( a->first ) ) |
| 971 | .literal( "annotationType" ); |
| 972 | switch( a->second.type ) |
| 973 | { |
| 974 | case ANNOTATION_TYPE_BOOL: |
| 975 | listing |
| 976 | .literal( "bool" ) |
| 977 | .literal( "value" ) |
| 978 | .literal( a->second.intValue != 0 ); |
| 979 | break; |
| 980 | case ANNOTATION_TYPE_INT: |
| 981 | listing |
| 982 | .literal( "int" ) |
| 983 | .literal( "value" ) |
| 984 | .literal( a->second.intValue ); |
| 985 | break; |
| 986 | case ANNOTATION_TYPE_FLOAT: |
| 987 | listing |
| 988 | .literal( "float" ) |
| 989 | .literal( "value" ) |
| 990 | .literal( a->second.floatValue ); |
| 991 | break; |
| 992 | default: |
| 993 | listing |
| 994 | .literal( "string" ) |
| 995 | .literal( "value" ) |
| 996 | .literal( g_stringTable.GetString( a->second.stringValue ) ); |
| 997 | break; |
| 998 | } |
| 999 | listing.end(); |
| 1000 | } |
| 1001 | listing.end(); |
| 1002 | } |
| 1003 | |
| 1004 | void PrintStageInfo( YamlOutput& listing, const StageData& stage, const EffectData& result ) |
| 1005 | { |
no test coverage detected