Cpp2cm is a semiautomatic source-to-source tool for converting a Visual Studio C++ project to a Cmajor project. It parses C++ source code, generates AST from it and then visits the AST nodes by converting each C++ language construct it can to the corresponding Cmajor language construct. If it cannot convert something, it places the string "NOT_CONVERTED" to the output source code.
The tool has a small "system" C++ library that contains interfaces of some standard C++ library classes and functions. The system library is used for mapping an std C++ class or function to the corresponding Cmajor class or function. The system library can be extended.
The tool is configured with XML files and patch text files.
This document presents the steps needed for converting a toy C++ example project to the corresponding Cmajor project. The example project can be found in the %SOULNG_ROOT%\tools\cpp2cm\projects\example directory (that is by default C:\soulng-3.0.0\tools\cpp2cm\projects\example directory).
The example Visual Studio C++ project contains three source files: main.cpp contains the main function that places the arguments given to the program to an std::vector, calls a sorting function declarared in sort.hpp file to sort the vector, and prints the sorted vector. The sort function is defined in the sort.cpp file.
Here's the contents of the main.cpp source file:
// main.cpp: #include <iostream> #include <example/sort.hpp> int main(int argc, const char** argv) { std::vector<std::string> args; int n = argc; for (int i = 1; i < n; ++i) { std::cout << "arg " << i << " " << argv[i] << std::endl; args.push_back(argv[i]); } example_ns::sort(args); std::cout << "sorted:" << std::endl; for (int i = 0; i < args.size(); ++i) { std::cout << args[i] << std::endl; } return 0; }
The sort function is enclosed in a namespace for demonstrating the namespace mapping mechanism of cpp2cm. Here's the contents of the sort.hpp source file:
// sort.hpp: #ifndef SORT_HPP #define SORT_HPP #include <vector> #include <string> namespace example_ns { void sort(std::vector<std::string>& v); } #endif
The sort function just calls standard sort for the vector. Here's the contents of the sort.cpp source file:
// sort.cpp: #include <example/sort.hpp> #include <algorithm> namespace example_ns { void sort(std::vector<std::string>& v) { std::sort(v.begin(), v.end()); } }
The tool is given as argument an XML file that contains conversion settings. Here's the contents of the configuration XML file that is named example.xml:
<!-- example.xml: --> <?xml version="1.0" encoding="utf-8"?> <project name="example" type="program" targetName="Example"> <imports> </imports> <references> </references> <vcxproject file="cpp_project/example/example.vcxproj"/> <include path=".."/> <target dir="build"/> <install dir="install"/> <map file="map.xml"/> <patches> </patches> <filter> </filter> <text> </text> </project>
The map xml file is used for mapping namespace names. Here we map C++ namespace example_ns as Example namespace in the generated target source code:
<!-- map.xml: --> <?xml version="1.0" encoding="utf-8"?> <map> <namespace source="example_ns" target="Example"/> </map>
Here we run the cpp2cm converter with the -v argument for generating verbose output messages:
D:\work\soulng-project\tools\cpp2cm\projects\example>cpp2cm -v example.xml example> D:/work/soulng-project/tools/cpp2cm/projects/example/cpp_project/example/example.vcxproj example> D:/work/soulng-project/tools/cpp2cm/projects/example/map.xml example> D:/work/soulng-project/tools/cpp2cm/projects/example/cpp_project/example/sort.hpp example> D:/work/soulng-project/tools/cpp2cm/projects/example/cpp_project/example/main.cpp example> D:/work/soulng-project/tools/cpp2cm/projects/example/cpp_project/example/sort.cpp example==> D:/work/soulng-project/tools/cpp2cm/projects/example/stage/example.ast example==> D:/work/soulng-project/tools/cpp2cm/projects/example/stage/example.xml warning: main.cpp:10: expression not converted warning: main.cpp:10: expression not converted warning: main.cpp:14: expression not converted warning: main.cpp:14: expression not converted warning: main.cpp:17: expression not converted warning: main.cpp:17: expression not converted creating project file: ==> D:/work/soulng-project/tools/cpp2cm/projects/example/build/Example.cmp
The tool warns about constructs it could not convert. It places the converted files to the build directory.
Here's the contents of the converted main.cm:
// main.cm (1): using System; using System.Collections; // this file has been semiautomatically generated from 'D:/work/soulng-project/tools/cpp2cm/projects/example/cpp_project/example/main.cpp' using cpp2cm version 1.0.0 public int main(int argc, const char** argv) { NOT_CONVERTED<NOT_CONVERTED> args; int n = argc; for (int i = 1; i < n; ++i) { NOT_CONVERTED << "arg " << i << " " << argv[i] << NOT_CONVERTED; args.push_back(argv[i]); } sort(args); NOT_CONVERTED << "sorted:" << NOT_CONVERTED; for (int i = 0; i < args.size(); ++i) { NOT_CONVERTED << args[i] << NOT_CONVERTED; } return 0; }
The tool could not convert std::vector and output statements, but local variales and the for loop was converted.
Here's the contents of the converted sort.cm:
// sort.cm (1): using System; using System.Collections; // this file has been semiautomatically generated from 'D:/work/soulng-project/tools/cpp2cm/projects/example/cpp_project/example/sort.hpp' using cpp2cm version 1.0.0 // this file has been semiautomatically generated from 'D:/work/soulng-project/tools/cpp2cm/projects/example/cpp_project/example/sort.cpp' using cpp2cm version 1.0.0 namespace Example { public void sort(NOT_CONVERTED<NOT_CONVERTED>& v) { sort(v.begin(), v.end()); } } // namespace Example
Again the vector was not converted but the namespace was mapped and the sort call was left as is.
We now import the std system module by setting the name attribute of the import element in the configuration file:
<!-- example.xml --> ... <imports> <import name="std"/> </imports> ...
Other modules that can be imported are boost and soulng.util.
By running the conversion second time will give the following main.cm output:
D:\work\soulng-project\tools\cpp2cm\projects\example>cpp2cm -v example.xml
// main.cm: using System; using System.Collections; // this file has been semiautomatically generated from 'D:/work/soulng-project/tools/cpp2cm/projects/example/cpp_project/example/main.cpp' using cpp2cm version 1.0.0 public int main(int argc, const char** argv) { List<string> args; int n = argc; for (int i = 1; i < n; ++i) { NOT_CONVERTED << "arg " << i << " " << argv[i] << NOT_CONVERTED; args.Add(argv[i]); } sort(args); NOT_CONVERTED << "sorted:" << NOT_CONVERTED; for (int i = 0; i < args.Count(); ++i) { NOT_CONVERTED << args[i] << NOT_CONVERTED; } return 0; }
Now std::vector and std::string were found from the std module, so they are now converted to a Cmajor List<string> type.
Here's the contents of the sort.cm output:
using System; using System.Collections; // this file has been semiautomatically generated from 'D:/work/soulng-project/tools/cpp2cm/projects/example/cpp_project/example/sort.hpp' using cpp2cm version 1.0.0 // this file has been semiautomatically generated from 'D:/work/soulng-project/tools/cpp2cm/projects/example/cpp_project/example/sort.cpp' using cpp2cm version 1.0.0 namespace Example { public void sort(List<string>& v) { Sort(v.Begin(), v.End()); } } // namespace Example
The vector was converted to a List, the std::sort function call to a Sort function call, and the iterator access functions to Begin() and End(). So the sort.cpp was successfully converted.
The tool has a simple source code patching mechanism. The names of the patch files are declared using the file attribute of the patch element within patches element in the project XML configuration file:
<!-- example.xml --> ... <patches> <patch file="example.patches"/> </patches> ...
Patching works by inserting, deleting and modifying lines in the final output source code file.
Here we patch the stream output operations of the main.cpp:
main.cm:12:M/NOT_CONVERTED << "arg " << i << " " << argv[i] << NOT_CONVERTED;/Console.Out() << "arg " << i << " " << argv[i] << endl();/ main.cm:15:M/sort(args);/Example.sort(args);/ main.cm:16:M/NOT_CONVERTED << "sorted:" << NOT_CONVERTED;/Console.Out() << "sorted:" << endl();/ main.cm:19:M/NOT_CONVERTED << args[i] << NOT_CONVERTED;/Console.Out() << args[i] << endl();/
The patch file has four modification patches for lines 12, 15, 16 and 19. The syntax of the modification patch is as follows:
source-file.cm:line number:M/source text/replacement text/
The modification patch finds the source substring text from the given line of the output file and replaces it with the replacement text.
The syntax of the insertion patch is as follows:
source-file.cm:line number:I/text line to insert/
The insertion patch inserts a line to the output file.
The syntax of the deletion patch is as follows:
source-file.cm:line number:D
The deletion patch deletes a line from the output file.
D:\work\soulng-project\tools\cpp2cm\projects\example>cpp2cm -v example.xml
Here's the contents of the patched main.cm:
// main.cm: using System; using System.Collections; // this file has been semiautomatically generated from 'D:/work/soulng-project/tools/cpp2cm/projects/example/cpp_project/example/main.cpp' using cpp2cm version 1.0.0 public int main(int argc, const char** argv) { List<string> args; int n = argc; for (int i = 1; i < n; ++i) { Console.Out() << "arg " << i << " " << argv[i] << endl(); args.Add(argv[i]); } Example.sort(args); Console.Out() << "sorted:" << endl(); for (int i = 0; i < args.Count(); ++i) { Console.Out() << args[i] << endl(); } return 0; }
Now compiling the output project succeeeds:
D:\work\soulng-project\tools\cpp2cm\projects\example\build>cmc -v Example.cmp Cmajor compiler version 3.5.0 for Windows x64 00>===== Building project 'Example' (D:/work/soulng-project/tools/cpp2cm/projects/example/build/Example.cmp) using debug configuration. 00>Parsing 2 source files in main thread... 00>Source files parsed. 00>Binding types... 00>Compiling using 4 threads... 00>> D:/work/soulng-project/tools/cpp2cm/projects/example/build/main.cm 00>> D:/work/soulng-project/tools/cpp2cm/projects/example/build/sort.cm 00>Example compilation time: 00:00:00.183 00>Creating library... 00>==> D:/work/soulng-project/tools/cpp2cm/projects/example/build/lib/debug/Example.lib 00>Linking... 00>==> D:/work/soulng-project/tools/cpp2cm/projects/example/build/bin/debug/Example.exe 00>Writing module file... 00>==> D:/work/soulng-project/tools/cpp2cm/projects/example/build/lib/debug/Example.cmm 00>1543 class template specializations, 5 new, 5 copied. 00>Project 'Example' built successfully.
We can now install the output project to a installation directory by running the converter with the --install option:
D:\work\soulng-project\tools\cpp2cm\projects\example>cpp2cm -v --install example.xml example> D:/work/soulng-project/tools/cpp2cm/projects/example/cpp_project/example/example.vcxproj example> D:/work/soulng-project/tools/cpp2cm/projects/example/map.xml example> D:/work/soulng-project/tools/cpp2cm/projects/example/cpp_project/example/sort.hpp example> D:/work/soulng-project/tools/cpp2cm/projects/example/cpp_project/example/main.cpp example> D:/work/soulng-project/tools/cpp2cm/projects/example/cpp_project/example/sort.cpp example==> D:/work/soulng-project/tools/cpp2cm/projects/example/stage/example.ast std> D:/work/soulng-project/tools/cpp2cm/system/std/stage/std.ast example==> D:/work/soulng-project/tools/cpp2cm/projects/example/stage/example.xml warning: main.cpp:10: expression not converted warning: main.cpp:10: expression not converted warning: main.cpp:14: expression not converted warning: main.cpp:14: expression not converted warning: main.cpp:17: expression not converted warning: main.cpp:17: expression not converted patching: > D:/work/soulng-project/tools/cpp2cm/projects/example/example.patches installing: D:/work/soulng-project/tools/cpp2cm/projects/example/build/main.cm -> D:/work/soulng-project/tools/cpp2cm/projects/example/install/main.cm D:/work/soulng-project/tools/cpp2cm/projects/example/build/sort.cm -> D:/work/soulng-project/tools/cpp2cm/projects/example/install/sort.cm creating project file: ==> D:/work/soulng-project/tools/cpp2cm/projects/example/install/Example.cmp
Besides importing a system module, a project can import another project. The imported project is specified by setting the path to its XML configuration file as the value of the project attribute of an import element. For example the following setting will import a Cm.xml project from a sibling directory whose name is Cm:
<!-- configuration.xml --> ... <imports> <import project="../Cm/Cm.xml"/> </imports> ...
Then the symbol table of the imported project will be made available in the project that contains the import. The symbol table will be used for resolving references to namespace names, typedef names, class names and function names.
You can add Cmajor project references to the output project by setting the path to its .cmp project file as the value of the project attribute of the reference element. For example the following setting will add a reference to a Cm.cmp Cmajor project to the output project that will reside in a sibling directory whose name is Cm:
<!-- configuration.xml --> ... <references> <reference project="../Cm/Cm.cmp"/> </references> ...
A reference element may have a kind attribute that specifies whether the reference is for build the configuration: kind="stage", for installation configuration: kind="install", or both (the default).
The %SOULNG_ROOT%\tools\cpp2cm\system directory contains an XML file named system.xml and a subdirectory for each system module. The system.xml lists paths to system module projects in those subdirectories.
The contents of the default system.xml is as follows:
<?xml version="1.0" encoding="utf-8"?> <cpp2cm> <projects> <project file="std/std.xml"/> <project file="boost/boost.xml"/> <project file="soulng.util/soulng.util.xml"/> </projects> </cpp2cm>
A system module project XML file contains names of C++ header files that are used for building the symbol table of the system module. It may also contain an INCLUDE path and it may import the symbol table of another system module project.
Here's the contents of the std.xml project XML file for the std system module:
<project name="std"> <source file="algorithm.hpp"/> <source file="exception.hpp"/> <source file="list.hpp"/> <source file="map.hpp"/> <source file="move.hpp"/> <source file="pair.hpp"/> <source file="set.hpp"/> <source file="stack.hpp"/> <source file="stdint.hpp"/> <source file="string.hpp"/> <source file="stringstream.hpp"/> <source file="ostream.hpp"/> <source file="unique_ptr.hpp"/> <source file="unordered_map.hpp"/> <source file="unordered_set.hpp"/> <source file="vector.hpp"/> <include path="."/> </project>
Here's the contents of the boost.xml project XML file for the boost system module:
<project name="boost"> <imports> <import project="../std/std.xml"/> </imports> <source file="filesystem.hpp"/> <source file="uuid.hpp"/> <include path="."/> </project>
Here's the contents of the soulng.util.xml project XML file for the soulng.util system module:
<project name="soulng.util"> <imports> <import project="../std/std.xml"/> <import project="../boost/boost.xml"/> </imports> <source file="BinaryReader.hpp"/> <source file="BinaryWriter.hpp"/> <source file="CodeFormatter.hpp"/> <source file="Path.hpp"/> <source file="Sha1.hpp"/> <source file="TextUtils.hpp"/> <source file="Unicode.hpp"/> <include path="../.."/> </project>
Each C++ header file of a system module contains declarations of classes, typedefs and functions without implementations. For example the vector.hpp looks like this:
namespace std { template<class T> class vector { public: typedef type iterator; typedef type const_iterator; vector(); vector(int, const T&); iterator begin(); iterator end(); const_iterator cbegin() const; const_iterator cend() const; const T& front() const; const T& back() const; T operator[](int); bool empty() const; int size() const; void reserve(int); void clear(); void push_back(const T&); void pop_back(); void resize(int); }; }
By running the cpp2cm with --system option builds an AST and a symbol table for each system module from the C++ header files and exports them as binary AST file and an XML file to the stage subdirectory of the module directory:
D:\work\soulng-project\tools\cpp2cm\system>cpp2cm -v --system std> D:/work/soulng-project/tools/cpp2cm/system/std/algorithm.hpp std> D:/work/soulng-project/tools/cpp2cm/system/std/exception.hpp std> D:/work/soulng-project/tools/cpp2cm/system/std/list.hpp std> D:/work/soulng-project/tools/cpp2cm/system/std/map.hpp std> D:/work/soulng-project/tools/cpp2cm/system/std/move.hpp std> D:/work/soulng-project/tools/cpp2cm/system/std/pair.hpp std> D:/work/soulng-project/tools/cpp2cm/system/std/set.hpp std> D:/work/soulng-project/tools/cpp2cm/system/std/stack.hpp std> D:/work/soulng-project/tools/cpp2cm/system/std/stdint.hpp std> D:/work/soulng-project/tools/cpp2cm/system/std/string.hpp std> D:/work/soulng-project/tools/cpp2cm/system/std/stringstream.hpp std> D:/work/soulng-project/tools/cpp2cm/system/std/ostream.hpp std> D:/work/soulng-project/tools/cpp2cm/system/std/unique_ptr.hpp std> D:/work/soulng-project/tools/cpp2cm/system/std/unordered_map.hpp std> D:/work/soulng-project/tools/cpp2cm/system/std/unordered_set.hpp std> D:/work/soulng-project/tools/cpp2cm/system/std/vector.hpp std==> D:/work/soulng-project/tools/cpp2cm/system/std/stage/std.ast std==> D:/work/soulng-project/tools/cpp2cm/system/std/stage/std.xml boost> D:/work/soulng-project/tools/cpp2cm/system/boost/filesystem.hpp boost> D:/work/soulng-project/tools/cpp2cm/system/boost/uuid.hpp boost==> D:/work/soulng-project/tools/cpp2cm/system/boost/stage/boost.ast std> D:/work/soulng-project/tools/cpp2cm/system/std/stage/std.ast boost==> D:/work/soulng-project/tools/cpp2cm/system/boost/stage/boost.xml soulng.util> D:/work/soulng-project/tools/cpp2cm/system/soulng.util/BinaryReader.hpp soulng.util> D:/work/soulng-project/tools/cpp2cm/system/soulng.util/BinaryWriter.hpp soulng.util> D:/work/soulng-project/tools/cpp2cm/system/soulng.util/CodeFormatter.hpp soulng.util> D:/work/soulng-project/tools/cpp2cm/system/soulng.util/Path.hpp soulng.util> D:/work/soulng-project/tools/cpp2cm/system/soulng.util/Sha1.hpp soulng.util> D:/work/soulng-project/tools/cpp2cm/system/soulng.util/TextUtils.hpp soulng.util> D:/work/soulng-project/tools/cpp2cm/system/soulng.util/Unicode.hpp soulng.util==> D:/work/soulng-project/tools/cpp2cm/system/soulng.util/stage/soulng.util.ast std> D:/work/soulng-project/tools/cpp2cm/system/std/stage/std.ast boost> D:/work/soulng-project/tools/cpp2cm/system/boost/stage/boost.ast soulng.util==> D:/work/soulng-project/tools/cpp2cm/system/soulng.util/stage/soulng.util.xml
The final step of extending a system module is to add a target attribute to a class, typedef of function, so that cpp2cm can map the name of that entity to the corresponding Cmajor name.
For example after adding target attributes to the std::vector class template, the vector class template in the symbol table XML will look like this:
<class access="public" definitionFile="vector.hpp" definitionFileId="file/vector.hpp_63EA1C07F0554E9C9B2C897958713F267BC4030B.html" definitionLine="4" id="class_vector_5CB6B8D7BBC6164DAFFCFA17CDCFF0469BA58EEC" key="class" name="vector" project="std" target="System.Collections.List"> <templateParameters> <templateParameter access="public" id="templateParameter_T_C2C53D66948214258A26CA9CA845D7AC0C17F8E7" name="T"/> </templateParameters> <functions> <function access="public" definitionFile="vector.hpp" definitionFileId="file/vector.hpp_63EA1C07F0554E9C9B2C897958713F267BC4030B.html" definitionLine="12" id="function_back_76678EF262959C8F973EDB7C15900833EF9664D3" name="back" returnType="const.type_C2C53D66948214258A26CA9CA845D7AC0C17F8E7.lvalueref.type_C2C53D66948214258A26CA9CA845D7AC0C17F8E7" specifiers="const" target="Back"/> <function access="public" definitionFile="vector.hpp" definitionFileId="file/vector.hpp_63EA1C07F0554E9C9B2C897958713F267BC4030B.html" definitionLine="16" id="function_clear_FF0F6151BE376CD0D70A0BB5169017BC32854CD9" name="clear" returnType="void" target="Clear"/> <function access="public" definitionFile="vector.hpp" definitionFileId="file/vector.hpp_63EA1C07F0554E9C9B2C897958713F267BC4030B.html" definitionLine="13" id="function_empty_81EE6F57CB2C61553E5677950913871E31FAAF79" name="empty" returnType="bool" specifiers="const" target="IsEmpty"/> <function access="public" definitionFile="vector.hpp" definitionFileId="file/vector.hpp_63EA1C07F0554E9C9B2C897958713F267BC4030B.html" definitionLine="10" id="function_front_86732689DE3A08F388FEACDF70ACD2E33688EDFA" name="front" returnType="const.type_C2C53D66948214258A26CA9CA845D7AC0C17F8E7.lvalueref.type_C2C53D66948214258A26CA9CA845D7AC0C17F8E7" specifiers="const" target="Front"/> <function access="public" definitionFile="vector.hpp" definitionFileId="file/vector.hpp_63EA1C07F0554E9C9B2C897958713F267BC4030B.html" definitionLine="19" id="function_pop_back_4F4524BD683677A0DAE8A8A3AE0FE4F7DA9A6D82" name="pop_back" returnType="void" target="RemoveLast"/> <function access="public" definitionFile="vector.hpp" definitionFileId="file/vector.hpp_63EA1C07F0554E9C9B2C897958713F267BC4030B.html" definitionLine="15" id="function_reserve_5E15BAF638E60510CC778FF1B24AD449FDEB658B" name="reserve" returnType="void" target="Reserve"> <parameters> <parameter access="public" id="parameter__920337013164492D54CA637CEFEAEAB2D4EDA302" name="" type="int"/> </parameters> </function> <function access="public" definitionFile="vector.hpp" definitionFileId="file/vector.hpp_63EA1C07F0554E9C9B2C897958713F267BC4030B.html" definitionLine="20" id="function_resize_9835A95FBEA4C2BFE0A20AA6CA6B70850DC54F77" name="resize" returnType="void" target="Resize"> <parameters> <parameter access="public" id="parameter__0AE83340F5CF20CE81E1D296B6A0CA7B8C3E16B6" name="" type="int"/> </parameters> </function> <function access="public" definitionFile="vector.hpp" definitionFileId="file/vector.hpp_63EA1C07F0554E9C9B2C897958713F267BC4030B.html" definitionLine="14" id="function_size_72A8E6C8099B35303A5A5AD3863DFF67FDA6BDE5" name="size" returnType="int" specifiers="const" target="Count"/> <function access="public" definitionFile="vector.hpp" definitionFileId="file/vector.hpp_63EA1C07F0554E9C9B2C897958713F267BC4030B.html" definitionLine="11" id="function_begin_749A3BBD89B9A90039FD7C6DD6FB2F3CBC5A890B" name="begin" returnType="typedef_iterator_A5CB8116875EBD90E1FD4D1AD3D707791675F1B1" target="Begin"/> <function access="public" definitionFile="vector.hpp" definitionFileId="file/vector.hpp_63EA1C07F0554E9C9B2C897958713F267BC4030B.html" definitionLine="13" id="function_cbegin_D15153952FEE3BE3F8222BAA083F62ACDE24F1B6" name="cbegin" returnType="typedef_const_iterator_627A48632213CE5CB8257035EC37851C75544BE4" specifiers="const" target="CBegin"/> <function access="public" definitionFile="vector.hpp" definitionFileId="file/vector.hpp_63EA1C07F0554E9C9B2C897958713F267BC4030B.html" definitionLine="14" id="function_cend_CB71E67A7A24DE96F599BCCF229F7A35058358D6" name="cend" returnType="typedef_const_iterator_627A48632213CE5CB8257035EC37851C75544BE4" specifiers="const" target="CEnd"/> <function access="public" definitionFile="vector.hpp" definitionFileId="file/vector.hpp_63EA1C07F0554E9C9B2C897958713F267BC4030B.html" definitionLine="12" id="function_end_5BA0A8AF5BBE4469D13E8671990F4EB82768D53A" name="end" returnType="typedef_iterator_A5CB8116875EBD90E1FD4D1AD3D707791675F1B1" target="End"/> <function access="public" definitionFile="vector.hpp" definitionFileId="file/vector.hpp_63EA1C07F0554E9C9B2C897958713F267BC4030B.html" definitionLine="21" id="function_push_back_C5AD21E6449CAE4EABFF40732FA9D855A413B4E2" name="push_back" returnType="void" target="Add"> <parameters> <parameter access="public" id="parameter__E7F96002FFA26DC3BF6C6F45C0FAD944ADDA9C6E" name="" type="const.templateParameter_T_C2C53D66948214258A26CA9CA845D7AC0C17F8E7.lvalueref.templateParameter_T_C2C53D66948214258A26CA9CA845D7AC0C17F8E7"/> </parameters> </function> <function access="public" definitionFile="vector.hpp" definitionFileId="file/vector.hpp_63EA1C07F0554E9C9B2C897958713F267BC4030B.html" definitionLine="17" id="function_operator_subscript_5AA680DE882D1A6DA43DD2E589324023E13178D0" name="operator[]" returnType="templateParameter_T_C2C53D66948214258A26CA9CA845D7AC0C17F8E7"> <parameters> <parameter access="public" id="parameter__1E7B4EBC985A2A810BC7D15FBB352A4234ED939D" name="" type="int"/> </parameters> </function> </functions> <typedefs> <typedef access="public" id="typedef_const_iterator_627A48632213CE5CB8257035EC37851C75544BE4" name="const_iterator" target="ConstIterator" type="type_D0A3E7F81A9885E99049D1CAE0336D269D5E47A9"/> <typedef access="public" id="typedef_iterator_A5CB8116875EBD90E1FD4D1AD3D707791675F1B1" name="iterator" target="Iterator" type="type_D0A3E7F81A9885E99049D1CAE0336D269D5E47A9"/> </typedefs> <constructors> <constructor access="public" definitionFile="vector.hpp" definitionFileId="file/vector.hpp_63EA1C07F0554E9C9B2C897958713F267BC4030B.html" definitionLine="9" id="constructor_vector_BCB05555AEFC1BCEB9B4A11816D9AFE17900D1B5" name="vector" target="@constructor"/> <constructor access="public" definitionFile="vector.hpp" definitionFileId="file/vector.hpp_63EA1C07F0554E9C9B2C897958713F267BC4030B.html" definitionLine="10" id="constructor_vector_A07D23FE1DC0A4D369766DC97E4842F0E19AA278" name="vector" target="@constructor"> <parameters> <parameter access="public" id="parameter__AE298771F7E9F1E5D80BCA7D593D455D0D39A79D" name="" type="int"/> <parameter access="public" id="parameter__AE298771F7E9F1E5D80BCA7D593D455D0D39A79D" name="" type="const.templateParameter_T_C2C53D66948214258A26CA9CA845D7AC0C17F8E7.lvalueref.templateParameter_T_C2C53D66948214258A26CA9CA845D7AC0C17F8E7"/> </parameters> </constructor> </constructors> </class>That's the end of this tutorial.