File: CppDoc.h

package info (click to toggle)
storm-lang 0.7.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 52,004 kB
  • sloc: ansic: 261,462; cpp: 140,405; sh: 14,891; perl: 9,846; python: 2,525; lisp: 2,504; asm: 860; makefile: 678; pascal: 70; java: 52; xml: 37; awk: 12
file content (44 lines) | stat: -rw-r--r-- 1,161 bytes parent folder | download | duplicates (3)
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
#pragma once
#include "Doc.h"
#include "Core/Gen/CppTypes.h"
#include "Core/Io/Url.h"

namespace storm {
	STORM_PKG(core.lang);

	/**
	 * Documentation for functions implemented in C++. Provided by the CppLoader class.
	 */
	class CppDoc : public NamedDoc {
		STORM_CLASS;
	public:
		// Create.
		CppDoc(Named *entity, Url *file, Nat entry, MAYBE(const CppParam *) params);

		// Create with a simple name instead of an Url. The name is assumed to be relative the root package's Url.
		CppDoc(Named *entity, const wchar *file, Nat entry, MAYBE(const CppParam *) params);

		// Get documentation.
		virtual Doc *STORM_FN get();

	private:
		// Original entity.
		Named *entity;

		// Url of the file containing documentation or a simple c-string containing the file name.
		UNKNOWN(PTR_GC) const void *data;

		// Pointer to the CppParams entry for this entity so that we can retrieve the parameter names.
		MAYBE(const CppParam *) params;

		// Documentation entry in the file and data indicating if 'data' is a c-string or an URL (least significant bit).
		Nat entryInfo;

		// Get an URL to the file.
		Url *file();

		// Get the entry.
		Nat entry();
	};

}