static void print_summarized_value_relation (MonoSummarizedValueRelation *relation) { printf ("Relation "); print_relation (relation->relation); printf (" with value "); print_summarized_value (&(relation->related_value)); }
std::ostream & print_relation( std::ostream & s , relation_attr_type attr , entity_key_type key ) { print_relation( s , attr ); print_entity_key( s , key ); return s ; }
std::ostream & operator << ( std::ostream & s , const Relation & con ) { Entity * const e = con.entity(); print_relation( s , con.attribute() ); if ( e ) { print_entity_key( s , e->key() ); } else { s << "?" ; } return s ; }
Relation::Relation( relation_attr_type arg_attr , Entity & arg_entity ) : m_attr( arg_attr ), m_entity( & arg_entity ) { if ( relation_entity_type( arg_attr ) != arg_entity.entity_type() ) { std::ostringstream msg ; msg << "phdmesh::Relation::Relation( " ; print_relation( msg , arg_attr ); msg << " , " ; print_entity_key( msg , arg_entity.key() ); msg << " ) INCOMPATIBLE ARGUMENTS" ; throw std::invalid_argument( msg.str() ); } }
static bool print_condition (struct cldr_plural_condition_ty *condition, enum cldr_plural_condition parent, bool space, FILE *fp) { if (condition->type == CLDR_PLURAL_CONDITION_AND) { if (parent == CLDR_PLURAL_CONDITION_OR) fputc ('(', fp); print_condition (condition->value.conditions[0], CLDR_PLURAL_CONDITION_AND, false, fp); fprintf (fp, " && "); print_condition (condition->value.conditions[1], CLDR_PLURAL_CONDITION_AND, false, fp); if (parent == CLDR_PLURAL_CONDITION_OR) fputc (')', fp); return true; } else if (condition->type == CLDR_PLURAL_CONDITION_OR) { if (parent == CLDR_PLURAL_CONDITION_AND) fputc ('(', fp); print_condition (condition->value.conditions[0], CLDR_PLURAL_CONDITION_OR, false, fp); fprintf (fp, " || "); print_condition (condition->value.conditions[1], CLDR_PLURAL_CONDITION_OR, false, fp); if (parent == CLDR_PLURAL_CONDITION_AND) fputc (')', fp); return true; } else if (condition->type == CLDR_PLURAL_CONDITION_RELATION) { print_relation (condition->value.relation, parent, space, fp); return true; } return false; }
void print_cmd_list(FILE *stream, cmd_list *list, int newline) { cmd_list_item *current; if (list == NULL) { fprintf(stream, "[NULL_CMD_LIST]\n"); return; } current = list->first_item; while (current != NULL) { print_cmd_pipeline(stream, current->pl); print_relation(stream, current->rel); current = current->next; } if (!list->foreground) fprintf(stream, "&"); if (newline) fprintf(stream, "\n"); }