summaryrefslogtreecommitdiff
path: root/Documentation/theme/layout.html
blob: fcc6d221870c2fde4d656dba4a70b45e85940199 (plain)
1
2
3
4
5
6
7
8
9
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
{#
SPDX-License-Identifier: CC-BY-SA-4.0
#}
{# TEMPLATE VAR SETTINGS #}
{%- set url_root = pathto('', 1) %}
{%- if url_root == '#' %}{% set url_root = '' %}{% endif %}
{%- if not embedded and docstitle %}
  {%- set titlesuffix = " — "|safe + docstitle|e %}
{%- else %}
  {%- set titlesuffix = "" %}
{%- endif %}
<!DOCTYPE html>
<head>
  <meta charset="utf-8">
  {{ metatags }}
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  {% block htmltitle %}
  <title>{{ title|striptags|e }}{{ titlesuffix }}</title>
  {% endblock %}

  {# FAVICON #}
  {% if favicon %}
    <link rel="shortcut icon" href="{{ pathto('_static/' + favicon, 1) }}"/>
  {% endif %}

  {# CSS #}

  {# OPENSEARCH #}
  {% if not embedded %}
    {% if use_opensearch %}
      <link rel="search" type="application/opensearchdescription+xml" title="{% trans docstitle=docstitle|e %}Search within {{ docstitle }}{% endtrans %}" href="{{ pathto('_static/opensearch.xml', 1) }}"/>
    {% endif %}

  {% endif %}

  {# RTD hosts this file, so just load on non RTD builds #}
  {% if not READTHEDOCS %}
    <link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" />
  {% endif %}

  {% for cssfile in css_files %}
    <link rel="stylesheet" href="{{ pathto(cssfile, 1) }}" type="text/css" />
  {% endfor %}

  {% for cssfile in extra_css_files %}
    <link rel="stylesheet" href="{{ pathto(cssfile, 1) }}" type="text/css" />
  {% endfor %}

  {%- block linktags %}
    {%- if hasdoc('about') %}
        <link rel="author" title="{{ _('About these documents') }}"
              href="{{ pathto('about') }}"/>
    {%- endif %}
    {%- if hasdoc('genindex') %}
        <link rel="index" title="{{ _('Index') }}"
              href="{{ pathto('genindex') }}"/>
    {%- endif %}
    {%- if hasdoc('search') %}
        <link rel="search" title="{{ _('Search') }}" href="{{ pathto('search') }}"/>
    {%- endif %}
    {%- if hasdoc('copyright') %}
        <link rel="copyright" title="{{ _('Copyright') }}" href="{{ pathto('copyright') }}"/>
    {%- endif %}
    <link rel="top" title="{{ docstitle|e }}" href="{{ pathto('index') }}"/>
    {%- if parents %}
        <link rel="up" title="{{ parents[-1].title|striptags|e }}" href="{{ parents[-1].link|e }}"/>
    {%- endif %}
    {%- if next %}
        <link rel="next" title="{{ next.title|striptags|e }}" href="{{ next.link|e }}"/>
    {%- endif %}
    {%- if prev %}
        <link rel="prev" title="{{ prev.title|striptags|e }}" href="{{ prev.link|e }}"/>
    {%- endif %}
  {%- endblock %}
  {%- block extrahead %} {% endblock %}

</head>

<body role="document">
  <header>
    <div id="navbar">
      <div class="navbar-brand">
        <div class="navbar-logo">   _
+-/ \-+
| (o) |
+-----+</div>
        <div class="navbar-name"><span class="text-light">lib</span>camera</div>
      </div>

      <div class="navbar">
        {{ toctree(maxdepth=1) }}
        <div class="searchbox" role="search">
          <form class="search" action="{{ pathto('search') }}" method="get">
            <input type="text" name="q" />
	    <input type="submit" value="Go" />
            <input type="hidden" name="check_keywords" value="yes" />
            <input type="hidden" name="area" value="default" />
          </form>
        </div>
      </div>

    </div>
  </header>

  <div id="content">
    {# PAGE CONTENT #}
    <div class="block">
      {% block body %}{% endblock %}
    </div>
  </div>

  {% include "footer.html" %}
</body>
</html>
ss="hl kwc">InvokedObject::InvalidThread: cout << "Method invoked in incorrect thread for main thread" << endl; return TestFail; default: break; } if (object_.value() != 42) { cout << "Method invoked with incorrect value for main thread" << endl; return TestFail; } /* * Test that blocking invocation is delivered directly when the * caller and callee live in the same thread. */ object_.reset(); object_.invokeMethod(&InvokedObject::method, ConnectionTypeBlocking, 42); switch (object_.status()) { case InvokedObject::NoCall: cout << "Method not invoked for main thread (blocking)" << endl; return TestFail; case InvokedObject::InvalidThread: cout << "Method invoked in incorrect thread for main thread (blocking)" << endl; return TestFail; default: break; } /* * Move the object to a thread and verify that auto method * invocation is delivered in the correct thread. */ object_.reset(); object_.moveToThread(&thread_); thread_.start(); object_.invokeMethod(&InvokedObject::method, ConnectionTypeBlocking, 42); switch (object_.status()) { case InvokedObject::NoCall: cout << "Method not invoked for custom thread" << endl; return TestFail; case InvokedObject::InvalidThread: cout << "Method invoked in incorrect thread for custom thread" << endl; return TestFail; default: break; } if (object_.value() != 42) { cout << "Method invoked with incorrect value for custom thread" << endl; return TestFail; } /* Test that direct method invocation bypasses threads. */ object_.reset(); object_.invokeMethod(&InvokedObject::method, ConnectionTypeDirect, 42); switch (object_.status()) { case InvokedObject::NoCall: cout << "Method not invoked for custom thread" << endl; return TestFail; case InvokedObject::CallReceived: cout << "Method invoked in incorrect thread for direct call" << endl; return TestFail; default: break; } if (object_.value() != 42) { cout << "Method invoked with incorrect value for direct call" << endl; return TestFail; } /* * Test invoking a method that takes reference arguments. This * targets compilation, there's no need to check runtime * results. */ object_.invokeMethod(&InvokedObject::methodWithReference, ConnectionTypeBlocking, 42); /* Test invoking a method that returns a value. */ int ret = object_.invokeMethod(&InvokedObject::methodWithReturn, ConnectionTypeBlocking); if (ret != 42) { cout << "Method invoked return incorrect value (" << ret << ")" << endl; return TestFail; } return TestPass; } void cleanup() { thread_.exit(0); thread_.wait(); } private: Thread thread_; InvokedObject object_; }; TEST_REGISTER(ObjectInvokeTest)