1 //#*************************************************************************************** 2 //# filename: useroutputinterface.h 3 //# 4 //# author: Johannes Gerstmayr, Yuri Vetyukov 5 //# 6 //# generated: 7 //# description: 8 //# 9 //# comments: 10 //# 11 //# Copyright (c) 2003-2013 Johannes Gerstmayr, Linz Center of Mechatronics GmbH, Austrian 12 //# Center of Competence in Mechatronics GmbH, Institute of Technical Mechanics at the 13 //# Johannes Kepler Universitaet Linz, Austria. All rights reserved. 14 //# 15 //# This file is part of HotInt. 16 //# HotInt is free software: you can redistribute it and/or modify it under the terms of 17 //# the HOTINT license. See folder 'licenses' for more details. 18 //# 19 //# bug reports are welcome!!! 20 //# WWW: www.hotint.org 21 //# email: bug_reports@hotint.org or support@hotint.org 22 //#*************************************************************************************** 23 24 #pragma once 25 26 #include "elementdata.h" 27 28 typedef enum { UO_LVL_0 = 0, // no Output 29 UO_LVL_err = 1, // necessary output (Errors, start/end simulation) 30 UO_LVL_warn = 2, // almost necessary output (Warnings) 31 UO_LVL_multsim = 3, // multiple simulation (parameter variation/optimization) 32 UO_LVL_sim = 4, // simulation output (solver) 33 UO_LVL_ext = 5, // extended output (useful information) 34 UO_LVL_all = 6, // complete information 35 UO_LVL_dbg1 = 7, // debug level 1 36 UO_LVL_dbg2 = 8, // debug level 2 37 UO_LVL_max = 1000 //this should always be the maximum ==> used to have output in any case! 38 } UO_MSGLVL; 39 40 class Vector3D; 41 class Vector2D; 42 class Vector; 43 class SparseVector; 44 class Matrix3D; 45 class Matrix; 46 class SparseMatrix; 47 48 struct UserOutputInterface 49 { 50 virtual UserOutputInterface & operator <<(const char * pStr) = 0; 51 virtual UserOutputInterface & operator <<(int x) = 0; 52 virtual UserOutputInterface & operator <<(double x) = 0; 53 virtual UserOutputInterface & operator <<(const Vector3D & v) = 0; 54 virtual UserOutputInterface & operator <<(const Vector2D & v) = 0; 55 virtual UserOutputInterface & operator <<(const Vector & v) = 0; 56 virtual UserOutputInterface & operator <<(const IVector & v) = 0; 57 virtual UserOutputInterface & operator <<(const TArray<double> & v) = 0; 58 virtual UserOutputInterface & operator <<(const SparseVector & v) = 0; 59 virtual UserOutputInterface & operator <<(const Matrix3D & m) = 0; 60 virtual UserOutputInterface & operator <<(const Matrix & m) = 0; 61 virtual UserOutputInterface & operator <<(const SparseMatrix & m) = 0; 62 63 virtual void InstantMessageText(const char* pStr) = 0; 64 virtual int GetGlobalMessageLevel() = 0; 65 // cms elements wish to use this 66 virtual int CallWCDriverFunction(int action, int option = 0, int value = 0, ElementDataContainer* edc = NULL) = 0; 67 virtual void SaveLocalMessageLevel() = 0; 68 virtual void SetLocalMessageLevel(UO_MSGLVL message_level) = 0; 69 virtual void ResetLocalMessageLevel() = 0; 70 virtual int PrintMsg() = 0; 71 };