Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

Revision 5b94fd2c12712e04345d4b130358afbb352f6436 authored by vthierry on 28 October 2025, 18:54:37 UTC, committed by vthierry on 28 October 2025, 18:54:37 UTC
sync from makefile
1 parent 4ad30c1
  • Files
  • Changes
  • a206553
  • /
  • public
  • /
  • cpp2wjson.html
Raw File Download

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • revision
  • directory
  • content
revision badge
swh:1:rev:5b94fd2c12712e04345d4b130358afbb352f6436
directory badge
swh:1:dir:28c1523fab318e277996fac88c12a1b3d8a9190d
content badge
swh:1:cnt:d03cf5c2a8ce145df983cd2bea5c59b9391d6826

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • revision
  • directory
  • content
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
cpp2wjson.html
<!DOCTYPE html>
<html lang="en">
<head>
    
    <meta charset="utf-8">
    <title>cpp2wjson - Documentation</title>
    
    
    <script src="scripts/prettify/prettify.js"></script>
    <script src="scripts/prettify/lang-css.js"></script>
    <!--[if lt IE 9]>
      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link type="text/css" rel="stylesheet" href="styles/prettify.css">
    <link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
    <script src="scripts/nav.js" defer></script>
    
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>

<input type="checkbox" id="nav-trigger" class="nav-trigger" />
<label for="nav-trigger" class="navicon-button x">
  <div class="navicon"></div>
</label>

<label for="nav-trigger" class="overlay"></label>

<nav >
    
    <input type="text" id="nav-search" placeholder="Search" />
    
    
    <h2><a href="index.html">Home</a></h2><h3>Objects</h3><ul><li><a href="FValue.html">FValue</a><ul class='members'></ul><ul class='methods'><li data-type='method' style='display: none;'><a href="FValue.html#set">set</a></li></ul></li><li><a href="LValue.html">LValue</a><ul class='members'></ul><ul class='methods'><li data-type='method' style='display: none;'><a href="LValue.html#getTurtoise">getTurtoise</a></li><li data-type='method' style='display: none;'><a href="LValue.html#setTurtoise">setTurtoise</a></li><li data-type='method' style='display: none;'><a href="LValue.html#deduce">deduce</a></li><li data-type='method' style='display: none;'><a href="LValue.html#.readTriples">readTriples</a></li></ul></li><li><a href="Value.html">Value</a><ul class='members'><li data-type='member' style='display: none;'><a href="Value.html#.EMPTY">EMPTY</a></li></ul><ul class='methods'><li data-type='method' style='display: none;'><a href="Value.html#asString">asString</a></li><li data-type='method' style='display: none;'><a href="Value.html#isEmpty">isEmpty</a></li><li data-type='method' style='display: none;'><a href="Value.html#isRecord">isRecord</a></li><li data-type='method' style='display: none;'><a href="Value.html#isArray">isArray</a></li><li data-type='method' style='display: none;'><a href="Value.html#isMember">isMember</a></li><li data-type='method' style='display: none;'><a href="Value.html#length">length</a></li><li data-type='method' style='display: none;'><a href="Value.html#getNames">getNames</a></li><li data-type='method' style='display: none;'><a href="Value.html#size">size</a></li><li data-type='method' style='display: none;'><a href="Value.html#get">get</a></li><li data-type='method' style='display: none;'><a href="Value.html#at">at</a></li><li data-type='method' style='display: none;'><a href="Value.html#set">set</a></li><li data-type='method' style='display: none;'><a href="Value.html#add">add</a></li><li data-type='method' style='display: none;'><a href="Value.html#copy">copy</a></li><li data-type='method' style='display: none;'><a href="Value.html#erase">erase</a></li><li data-type='method' style='display: none;'><a href="Value.html#rename">rename</a></li><li data-type='method' style='display: none;'><a href="Value.html#clear">clear</a></li><li data-type='method' style='display: none;'><a href="Value.html#sort">sort</a></li><li data-type='method' style='display: none;'><a href="Value.html#sortNames">sortNames</a></li><li data-type='method' style='display: none;'><a href="Value.html#equals">equals</a></li></ul></li><li><a href="WJSONReader.html">WJSONReader</a><ul class='members'></ul><ul class='methods'><li data-type='method' style='display: none;'><a href="WJSONReader.html#.read">read</a></li></ul></li><li><a href="WJSONWriter.html">WJSONWriter</a><ul class='members'></ul><ul class='methods'><li data-type='method' style='display: none;'><a href="WJSONWriter.html#.write">write</a></li></ul></li><li><a href="cpp2wjson.html">cpp2wjson</a><ul class='members'></ul><ul class='methods'><li data-type='method' style='display: none;'><a href="cpp2wjson.html#.get">get</a></li><li data-type='method' style='display: none;'><a href="cpp2wjson.html#.get">get</a></li><li data-type='method' style='display: none;'><a href="cpp2wjson.html#.get">get</a></li></ul></li><li><a href="wJSON.html">wJSON</a><ul class='methods'><li data-type='method' style='display: none;'><a href="wJSON.html#.parse">parse</a></li><li data-type='method' style='display: none;'><a href="wJSON.html#.stringify">stringify</a></li><li data-type='method' style='display: none;'><a href="wJSON.html#.wjson2json">wjson2json</a></li><li data-type='method' style='display: none;'><a href="wJSON.html#.wjson2wjson">wjson2wjson</a></li></ul></li></ul><h3>Global</h3><ul><li><a href="global.html#string2json">string2json</a></li><li><a href="global.html#run_protege">run_protege</a></li><li><a href="global.html#ttl2n3">ttl2n3</a></li><li><a href="global.html#wjson2html">wjson2html</a></li><li><a href="global.html#wjson2json">wjson2json</a></li><li><a href="global.html#wjson2wjson">wjson2wjson</a></li></ul>
    
</nav>

<div id="main">
    
    <h1 class="page-title">cpp2wjson</h1>
    

    




<section>

<header>
    
        <h2>
        
            cpp2wjson
        
        </h2>
        
    
</header>

<article>
    
        <div class="container-overview">
        
            

    

    <h4 class="name" id="cpp2wjson"><span class="type-signature"></span>factory cpp2wjson<span class="type-signature"></span></h4>

    




<dl class="details">
    
    <dt class="tag-description">Description:</dt>
    <dd class="tag-description"><ul class="dummy"><li><p>This factory defines a wrapper between C++ and wjson data structures.</p>
<ul>
<li>It is to be called using the <code>wjson::cpp2wjson::get(...)</code> construct.</li>
<li>This is (indeed) not available from non C/C++ language wrappers.</li>
</ul></li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>






























        
        </div>
    

    

    

    
    
    

     

    

    
        <h3 class="subsection-title">Methods</h3>

        
            

    

    <h4 class="name" id=".get"><span class="type-signature type-signature-static">(static) </span>get<span class="signature">(value)</span><span class="type-signature"> &rarr; {<a href="Value.html">Value</a>}</span></h4>

    




<dl class="details">
    
    <dt class="tag-description">Description:</dt>
    <dd class="tag-description"><ul class="dummy"><li><p>Gets a JSON representation from a compatible data structure.</p>
<ul>
<li>It is the responsability of the user to call this template static method with compatible types.</li>
</ul></li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













    <h5 class="h5-parameters">Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>value</code></td>
            

            <td class="type">
            
                
<span class="param-type">vector</span>
|

<span class="param-type">map</span>
|

<span class="param-type">pair</span>
|

<span class="param-type">Mat</span>
|

<span class="param-type"><a href="Value.html">Value</a></span>
|

<span class="param-type">string</span>
|

<span class="param-type">double</span>
|

<span class="param-type">int</span>
|

<span class="param-type">uint</span>
|

<span class="param-type">bool</span>



            
            </td>

            

            

            <td class="description last"><p>A mappable value to wjson value.</p>
<ul>
<li>Here, <code>std::vector</code> and <code>std::pair</code> is returned as lists.</li>
<li>Here, <code>std:map</code> is returned as record with key converted to string.</li>
<li>The conversion of <a href="https://docs.opencv.org/4.8.0/d3/d63/classcv_1_1Mat.html">opencv <code>cv::Mat</code></a> is also implemented</li>
</ul></td>
        </tr>

    
    </tbody>
</table>
















<h5 class="h5-returns">Returns:</h5>

        
<div class="param-desc">
    <p>The obtained <code>wjson::Value</code> value.</p>
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Value.html">Value</a></span>



    </dd>
</dl>

    



        
            

    

    <h4 class="name" id=".get"><span class="type-signature type-signature-static">(static) </span>get<span class="signature">(value, key, item)</span><span class="type-signature"> &rarr; {map}</span></h4>

    




<dl class="details">
    
    <dt class="tag-description">Description:</dt>
    <dd class="tag-description"><ul class="dummy"><li><p>Gets a std::map &lt; S, T &gt;  from a wjson data structure.</p>
<ul>
<li>.</li>
</ul></li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













    <h5 class="h5-parameters">Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>value</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Value.html">Value</a></span>



            
            </td>

            

            

            <td class="description last"><p>The input value.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">S</span>



            
            </td>

            

            

            <td class="description last"><p>A key of the <code>std::map</code> expected type to allow the compiler to infer the <code>S</code> type.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>item</code></td>
            

            <td class="type">
            
                
<span class="param-type">T</span>



            
            </td>

            

            

            <td class="description last"><p>A value of the <code>std::map</code> expected type to allow the compiler to infer the <code>T</code> type.</p></td>
        </tr>

    
    </tbody>
</table>
















<h5 class="h5-returns">Returns:</h5>

        
<div class="param-desc">
    <p>The obtained <code>std::map</code> value.</p>
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">map</span>



    </dd>
</dl>

    



        
            

    

    <h4 class="name" id=".get"><span class="type-signature type-signature-static">(static) </span>get<span class="signature">(value, item)</span><span class="type-signature"> &rarr; {vector}</span></h4>

    




<dl class="details">
    
    <dt class="tag-description">Description:</dt>
    <dd class="tag-description"><ul class="dummy"><li><p>Gets a std::vector &lt; T &gt;  from a wjson data structure.</p>
<ul>
<li>.</li>
</ul></li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>













    <h5 class="h5-parameters">Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>value</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Value.html">Value</a></span>



            
            </td>

            

            

            <td class="description last"><p>The input value.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>item</code></td>
            

            <td class="type">
            
                
<span class="param-type">T</span>



            
            </td>

            

            

            <td class="description last"><p>A value of the <code>std::vector</code> expected type to allow the compiler to infer the <code>T</code> type.</p></td>
        </tr>

    
    </tbody>
</table>
















<h5 class="h5-returns">Returns:</h5>

        
<div class="param-desc">
    <p>The obtained <code>std::vector</code> value.</p>
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">vector</span>



    </dd>
</dl>

    



        
    

    

    
</article>

</section>




    
    
</div>

<br class="clear">

<footer>
    <div style='float: right;font-style: italic;'>2023-11-03 version.</div>
</footer>

<script>prettyPrint();</script>
<script src="scripts/polyfill.js"></script>
<script src="scripts/linenumber.js"></script>

<script src="scripts/search.js" defer></script>


<script src="scripts/collapse.js" defer></script>


</body>
</html>
The diff you're trying to view is too large. Only the first 1000 changed files have been loaded.
Showing with 0 additions and 0 deletions (0 / 0 diffs computed)
swh spinner

Computing file changes ...

back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API