ACT Library
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
ActOpen Class Reference

Functions to manage namespace search paths. More...

#include <namespaces.h>

Public Member Functions

 ActOpen ()
 
 ~ActOpen ()
 
int Open (ActNamespace *ns, const char *newname=NULL)
 
list_t * findAll (ActNamespace *cur, const char *s)
 
ActNamespacefind (ActNamespace *cur, const char *s)
 
ActNamespacefindType (ActNamespace *cur, const char *s)
 

Private Attributes

list_t * search_path
 

Detailed Description

Functions to manage namespace search paths.

There are two open commands: open foo; this adds "foo" to the search path, and allows access to items that would be accessible in the foo namespace context (w.r.t. exports)

open foo -> bar; this renames foo to bar (without changing the export definitions)

Constructor & Destructor Documentation

◆ ActOpen()

ActOpen::ActOpen ( )

◆ ~ActOpen()

ActOpen::~ActOpen ( )

Member Function Documentation

◆ find()

ActNamespace * ActOpen::find ( ActNamespace cur,
const char *  s 
)

◆ findAll()

list_t * ActOpen::findAll ( ActNamespace cur,
const char *  s 
)

Find namespace in the current context, given the context of opens

Parameters
curis the current default namespace
sis the name of the namespace to be located
Returns
a list of namespaces, if found, NULL otherwise

◆ findType()

ActNamespace * ActOpen::findType ( ActNamespace cur,
const char *  s 
)

Find namespace that contains the specified type, given the context of opens

Parameters
curis the current default namespace
sis the name of the type to be located
Returns
namespace if found, NULL otherwise

◆ Open()

int ActOpen::Open ( ActNamespace ns,
const char *  newname = NULL 
)

Opens a namespace (optionally as a new name)

Parameters
nsis the namespace to be opened
newnameis the new name to be assigned to the namespace. If NULL, then the namespace is simply opened
Returns
0 if the new namespace name already exists and therefore could not be created, otherwise 1 on a success.

Member Data Documentation

◆ search_path

list_t* ActOpen::search_path
private

list of "open" namespaces (a list of ActNamespace *)


The documentation for this class was generated from the following file: