Back to the Framework Source
Browse the source tree:
      1. span.hpp
      2. stopwatch.hpp
      3. tick.hpp
      4. time.hpp
      5. timer.hpp
      1. cconsts.hpp
      2. wconsts.hpp
      1. class_macros.hpp
      2. compile_flags.hpp
      3. debug.hpp
      4. global.hpp
      5. helper.hpp
      6. omni_ver.hpp
      7. os.hpp
      1. 0.hpp
      2. 1.hpp
      3. 2.hpp
      4. 3.hpp
      5. 4.hpp
      6. 5.hpp
      7. 6.hpp
      8. 7.hpp
      9. 8.hpp
      10. 9.hpp
      11. 10.hpp
      12. 11.hpp
      13. 12.hpp
      14. 13.hpp
      15. 14.hpp
      16. 15.hpp
      17. 16.hpp
      1. cstring.hpp
      2. util.hpp
      3. wstring.hpp
      1. auto_lock.hpp
      2. basic_lock.hpp
      3. basic_thread.hpp
      4. binary_semaphore.hpp
      5. conditional.hpp
      6. lock.hpp
      7. mutex.hpp
      8. runnable.hpp
      9. runnable_thread.hpp
      10. scoped_lock.hpp
      11. semaphore.hpp
      12. spin.hpp
      13. this_thread.hpp
      14. thread.hpp
      15. threadpool.hpp
      1. char_t.hpp
      2. lock_t.hpp
      3. ostream_t.hpp
      4. seq_t.hpp
      5. thread_t.hpp
      6. tick_t.hpp
      1. version.hpp
      1. compile_flags.hxx
      2. const.hxx
      3. environment.hxx
      4. ext_const.hxx
      5. externs.hxx
      6. stopwatch.hxx
      7. string.hxx
      8. system.hxx
      9. version.hxx
    1. application.hpp
    2. argparser.hpp
    3. base_types.hpp
    4. chrono_types.hpp
    5. console.hpp
    6. constants.hpp
    7. delegates.hpp
    8. environment.hpp
    9. exception.hpp
    10. framework.hpp
    11. generic_ptr.hpp
    12. generic_ptr_safe.hpp
    13. object.hpp
    14. ostream.hpp
    15. property.hpp
    16. smart_ptr.hpp
    17. smart_ptr_safe.hpp
    18. strings.hpp
    19. sync_types.hpp
    20. system.hpp
    21. type.hpp
    22. type_value.hpp
  1. application.cpp
  2. argparser.cpp
  3. basic_thread.cpp
  4. binary_semaphore.cpp
  5. conditional.cpp
  6. framework.cpp
  7. library.cpp
  8. mutex.cpp
  9. omni.hpp
  10. runnable.cpp
  11. semaphore.cpp
  12. thread.cpp
  13. threadpool.cpp
  14. timer.cpp
01:
02:
03:
04:
05:
06:
07:
08:
09:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
/*
* This file is part of the Omni C++ framework
*
* Copyright 2015, Zeriph Enterprises, LLC
*
* PERMISSION TO USE, COPY, MODIFY, AND/OR DISTRIBUTE THIS SOFTWARE FOR ANY
* PURPOSE WITH OR WITHOUT FEE IS HEREBY GRANTED, PROVIDED THAT THE ABOVE
* COPYRIGHT NOTICE AND THIS PERMISSION NOTICE APPEAR IN ALL COPIES.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*
* ZERIPH DOES NOT MAKE ANY ASSURANCES WITH REGARD TO THE ACCURACY OF THE RESULTS
* OR OUTPUT THAT DERIVES FROM SUCH USE OF ANY SOFTWARE.
*/

#if !defined(OMNI_CONSOLE_HPP)
#define OMNI_CONSOLE_HPP 1
#include <omni/defs/class_macros.hpp>
#include <omni/string/util.hpp>
#if !defined(OMNI_OS_WIN)
    #include <errno.h> // errno
#endif

namespace omni {
    class console
    {
        public:
            
        private:
            console() {}
            ~console() {}
            // defined but not implemented, doesn't make sense to copy
            console(const omni::console &cp);
            omni::console& operator=(const omni::console& other);
    };
    
    // TODO: https://msdn.microsoft.com/en-us/library/system.string.format%28v=vs.110%29.aspx#Format_Brief
    // finish this
    // omni::console::write("This is a {0} {1}!", (test ? "hoot" : "hollar"), (test2 ? "hollar" : "hoot"));
    // omni::console::write_line("This is a {0} {1}!", (test ? "hoot" : "hollar"), (test2 ? "hollar" : "hoot"));
    /*void print(std::string fmt, ...)
    {
        if (omni::cstring::contains(fmt, "{0}")) {
            
        }
        
        int i,val,largest;
        va_list vl;
        va_start(vl, fmt);
        largest=va_arg(vl,int);
        for (i=1;i<n;i++)
        {
            val=va_arg(vl,int);
            largest=(largest>val)?largest:val;
        }
        va_end(vl);
    }
    
    void println(std::string fmt, ...)
    {
        int j;
        double sum = 0;

        va_list ap;
        va_start(ap, fmt); // Requires the last fixed parameter (to get the address)
        for (j = 0; j < count; j++) {
            sum += va_arg(ap, double); // Increments ap to the next argument.
        }
        va_end(ap);
    }*/

}

#endif // OMNI_CONSOLE_HPP