C and C++ Code

This connector is available with any role (including Systems Synthesis Analyst).

This page discusses:

See Also
About Connectors

Supported Extensions

  • .c .cpp .cc .cxx .c++
  • .h .hpp .hh .hxx .h++

Extracted Elements

The following semantic elements are recognized and exposed:

Semantic Element Example of Extracted Code
define
define MAX 10
include
#include <stdio.h>
#include "defs.h"
struct types
struct S_Date {
    /* day number */
    int day;
};
typedef struct S_Point {
    int x;
    int y;
} Point;
typedef struct {
    Point p1; // top left point
    Point p2; // botton right point
} Rectangle;
union types
union U_Number {
    char m_char;
    int m_int;
    double m_double;
};
enum types
enum Color {red = 10, green, blue};

typedef enum {hor, vert} orientation_t;
typedef
typedef int integer32;

typedef char *string;

typedef int (*intfun)(int);

typedef double *pReal, real;
function declarations
extern void start(int code);
static int stop();
function definitions
extern void start(int code);
static int stop();
namespace definitions
namespace User {
	
}
class definitions
class Base
	{
	    float dist;

	    protected:
	    int id;

	    private:
	    int count;

	    void go() {
	        cout << "go called for id: " << id <<endl;
	    }

	    void start();
	    void stop();
	    virtual ~ Base();

	};
class Token : Base {

		class Hash {
			int code;
			Hash();
			~Hash();
		};

		Hash code;

	};

Traceability Links

There is no link to be extracted.

Preview

Tree
The tree displays the semantic elements.
Work Area
The preview shows the source of the file with syntax coloring. The following words and symbol are highlighted:
  • Reserved words
  • Preprocessor directives
  • String and char literals
  • Comments

In the preview, source fragments associated to semantic elements are selectable.

Properties Area

The following predicates are used for the semantic exposition of the elements:

  • dc:title the simple name of the element
  • dc:identifier an identifier of the element, typically a simple name or a qualified name (using dots)
  • syc:lineNumber the line number where the element starts
  • syc:sourceCode the source code text of the element
    Note: Available only on some elements, excluding namespaces.
  • syc:visibility the optional visibility (public, protected, private) of the element
  • dc:description description comment of the element; these comments start with /**, /*!, /// or //!
  • syc:comment all other (not description) comments of the element
  • dc = http://purl.org/dc/terms/
  • syc = http://www.3ds.com/vocabularies/syc/