Ipopt  3.12.12
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
IpoptRJournal.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2010 Jelmer Ypma. All Rights Reserved.
3  * This code is published under the Eclipse Public License.
4  *
5  * file: IpoptRJournal.hpp
6  * author: Jelmer Ypma
7  * date: 30 January 2011
8  *
9  * This file defines a C++ class that takes care of re-directing
10  * output to the R terminal. Needed for Windows.
11  *
12  * Financial support of the UK Economic and Social Research Council
13  * through a grant (RES-589-28-0001) to the ESRC Centre for Microdata
14  * Methods and Practice (CeMMAP) is gratefully acknowledged.
15  */
16 
17 #ifndef __IpoptRJournal_HPP__
18 #define __IpoptRJournal_HPP__
19 
20 #include "IpJournalist.hpp" // ISA Journal
21 #include <R.h> // USES Rprintf
22 
23 class IpoptRJournal : public Ipopt::Journal {
24  public:
25 
26  // The constructor.
27  IpoptRJournal( Ipopt::EJournalLevel default_level );
28 
29  // The destructor.
30  virtual ~IpoptRJournal() { };
31 
32  protected:
33 
34  // These functions override the functions in the Journal class.
35  virtual void PrintImpl(
36  Ipopt::EJournalCategory category,
37  Ipopt::EJournalLevel level,
38  const char* str);
39 
40  virtual void PrintfImpl(
41  Ipopt::EJournalCategory category,
42  Ipopt::EJournalLevel level,
43  const char* pformat,
44  va_list ap);
45 
46  virtual void FlushBufferImpl();
47 };
48 
49 #endif
EJournalLevel
Print Level Enum.
virtual ~IpoptRJournal()
virtual void PrintfImpl(Ipopt::EJournalCategory category, Ipopt::EJournalLevel level, const char *pformat, va_list ap)
Printf to the designated output location.
IpoptRJournal(Ipopt::EJournalLevel default_level)
Journal class (part of the Journalist implementation.).
EJournalCategory
Category Selection Enum.
virtual void PrintImpl(Ipopt::EJournalCategory category, Ipopt::EJournalLevel level, const char *str)
Print to the designated output location.
virtual void FlushBufferImpl()
Flush output buffer.