#			Copyright (c) 1994 by
#			Advanced Visual Systems Inc.
#			All Rights Reserved
#	
#	This software comprises unpublished confidential information of
#	Advanced Visual Systems Inc. and may not be used, copied or made
#	available to anyone, except in accordance with the license
#	under which it is furnished.
#	
#	This file is under Perforce control
#	$Id: //depot/express/fcs992/runtime/commands.hlp#1 $
#	
: print <obj>
	prints contents of obj (or current object if none specified)
	output can be redirected to a file, e.g. 
		$print Applications > /tmp/myapp.v
	print is equivalent to the "save" operation except that it will
	even save data generated by a module (i.e. transient data)
	If you are printing an object, only the values that are different
	than the superclass for that object will be printed.  See $dprint
	for information on printing even the inherited information.
: save <obj>
	same as print only it will not save values that were modified
	by a module.  It saves only "program state", not "user state" or 
	"transient state".
: save_usr <obj>
	save as 'save' only it will save both "program state" and "user
	state", i.e. the values that are directly controlled by the user
	interface.
: dprint <obj>
	prints out the object specified (including program state, user
	state and transient state).  In contrast to $print, though, it 
	will save even values that are inherited by the superclass.
: echo string
	echo string
: push <how>
	push context.  This will "delay" the execution of any events
	generated allowing multiple changes to be batched into a single
	stream of execution.  The execution of events is triggered by
	the "$pop" command.  It can also be used to change the "state"
	in which objects are modified so that changes can be tagged 
	as either "user state" or "transient state".  The state determines
	how these changes will be saved.  This state is controlled by
	the following options:
		-prog	program (the default)
		-usr	user
		-trn	transient
: pop
	pop context.  This will "end" the results of the previous "$push"
	command.  All pending events are delivered as a result of this
	operation.
: obj_proc obj
	print process id of obj.  This is useful to determine whether
	a particular object is local or in an external process.  A process
	id of '0' is usually reserved for the default process.  This index
	is incremented each time a new process is started.
: obj_id <obj>
	print object id of obj
: notify <obj>
	print notify requests for obj.  This command can be used to determine
	what functions will be executed when a particular event is sent
	for a specific object.
: refs_to <obj>
	print references to obj.  This command is useful to determine
	what connections are made to a specific object.
: get_array_ref <obj>
	This command will print the list of objects that this object is
	connected to (i.e. which connections will be drawn in the NE).
: obj_seq <obj>
	print the object's sequence number in "value" mode (i.e. the
	maximum sequence number of it and its sub-objects and its 
	references).
: obj_seq_base <obj>
	print the object's sequence number without including sub-objects
	or references.
: obj_seq_ptrs <obj>
	print the current object sequence number excluding sub-objects
	but including references.
: cur_seq
	print current object sequence number
: del_obj_ref <obj1 <obj2>>
	delete an object reference between:
		current obj and obj1 (of obj2 is not specified)
		obj1 and obj2 (if both are specified)
	This is similar to breaking a connection in the network editor.
: link <obj1 <obj2>>
	Adds an object reference between:
		current obj and obj1 (of obj2 is not specified)
		obj1 and obj2 (if both are specified)
	object which creates a "symbolic" connection.
	This is similar to making a connection between these objects
	in the network editor and can be used multiple times for a single
	object 1 if it is an array and object 2 is a scalar.
: match <obj1 <obj2>>
: ematch <obj1 <obj2>>
	template matches:
		current obj and obj1 (of obj2 is not specified)
		obj1 and obj2 (if both are specified)
	match is a "possible match".  it only excludes the match if there 
	is a directly conflict between sub-objects (i.e. obj1 = 3 and 
	obj2 = 4 but allows obj1 = <unset> and obj2 = 3)
	ematch is exact match.  it only matches if obj1 is a subset of
	the values in obj2.
: quit
	exits AVS/Express (see local_quit for only exiting this process)
: local_quit
	exits just this process without bringing down all of AVS/Express.
 	This only works if the VCP is not running in the main process.
: list <obj>
	lists sub-objects.  This command will print the "header" of the
	list of sub-objects for the specified object.
: valid <obj>
	tests validity of object.  Often a method will only execute if
	the corresponding object is "valid".  If a group object is not
	valid, this command can be used to determine which sub-object
	is causing the group to be invalid and to trace why the object
	will not execute.
: resolve <obj>
	resolves object.  By default, forward references to names are
	allowed.  This command forces the "resolve" operation to be 
	performed to catch any dangling forward references.
: reset <obj>
	resets object
: include  filename
	reads the contents of filename loading the objects specified 
	in the file as sub-objects of the current object.  Any existing
	sub-objects with the same name are replaced.
: set_verbose <item1> <item2> ... <itemn>
	sets verbose mode
	items include:
		functions - print a message before invoking each function
		events - print a message before delivering an event
		ctx - print a message for each push/pop ctx call
		files - print a message when each file is read
		lib - print a message when each flibrary is loaded 
		paths - prints out the list of default paths on startup
		lines - prints a message for each line loaded in a V file
		procs - prints a message each time a process is started
: unset_verbose <item1> <item2> ... <itemn>
	unsets verbose mode
	see set_verbose

: timer_start
: timer_get
	these two commands provide a simple timing mechanism.
	'timer_start' will begin timing, 'timer_get' will determine the
	amount of time that has elapsed since the last 'timer_start' command.
: obj_val <obj>
	prints the value of the object.  This can be used to trace down
	a series of links to the object that really stores the value.
: obj_path <obj>
	prints the path-name of the object.  This can be used to determine
	where in the object hierarchy your are.
: obj_ref <obj>
	prints the path-name of the next rooted object this object points
	to, i.e. skip one link in the chain.
: obj_pval
	prints the path-name of the next object this object points to but
	will often give you the path-name of a "name reference" object.
: open <obj>
	opens a buffered object.
: int <obj>
	prints the integer value of the object
: real <obj>
	prints the real (single or double) value of the object
: str <obj>
	print the string value of the object
: ptr <obj>
	print the hex version of the pointer value for the object specified
: find_sub obj
	prints the path of the found sub-object
: array_size <obj>
	print the array size
: array_dims <obj>
	print the array dimensions;
: invoke <obj>
	invokes a method object
: get_obj_prop <prop_name> <obj1>
	prints out the value of the property specified "prop_name" for
	the specified object.
: type <type>
	prints out the list of base types defined in the system.  When
	given the name of a specific base type, prints the list of types
	derived from that type.
: get_data_type <obj>
	prints the data type of the object specified
: set_data_type <obj> <type>
	sets the data type of the object specified where 'type' is the
	string name of the type int, float etc.
: get_array <obj>
	returns the array value of the object specified for primitive
	arrays of type byte, char, short, int, float and double.  Use
        get_str_array to get string array values.
: get_str_array <obj>
        returns the array value of an object that has an array of
        strings as its value.
: get_str_array_val <obj> index
        Prints a specified element of a string array object.  The <obj> 
	parameter specifies the name of a string array.  The index parameter
 	specifies which element of the string array to print.	
: sub_array <obj>
	allows the user to enter the dimensions of a sub-array of the
	array specified for examination.  The sub-array dimensions are
	inclusive of the maximum dimension (which is different than the
	parameters to the sub_array subroutine call).   If you have an
	array dimension of size 3, you would say: 0 2 to reference all
	elements in the array.
: set_obj_name <obj> <new_name>
	change the name of an object to the specified name (see OMset_obj_name)
: move <obj> <dest_parent>
	moves the object specified as <obj> to have the new parent
	<dest_parent>
: get_obj_att <att_name> <obj>
	returns the state of the attribute specified on the current object.
: pause
	pauses until a carriage return is entered.
: compile <obj>
	compiles the object specified (or more accurately the process
	the specified object is in).
: user_template <obj>
	prints the "user template name" of the object specified
: deps <obj>
	lists dependencies for the object specified.
: set_arr_trace
	turns global array alloc/free tracing on
: unset_arr_trace
	turns global array alloc/free tracing off
: set_trace <flag1> <flag2>... <flagn>
	turns tracing on of the operation specified (when used in
	conjunction with the 'trace' attribute, e.g. foo+trace).   
	The operations are one of the list (also see 'unset_trace'):
		all - all operations
		destroy - the destroy_subobj operation
		subobj - add_subobj or del_subobj
		set_val - any set value operation
		get_val - any get_value operation
		notify - any add or del notify operation
		invoke - the invoke  operation
		compile - the compile operation
	        array - trace array alloc's and free's
: unset_trace <flag1> <flag2>... <flagn>
	turns off tracing of the specified operations (see 'set_trace')
: count_objs/dcount_objs <obj>
  	These commands can be useful to understand the number of objects
        currently created to support the specified object.  These commands
        count only objects that have actually been created to support this
        instance and does not count objects that are currently inherited
        from base classes.  This count can be less than the number of objects
        displayed by the $list command.  The $count_objs command returns
        the number of objects defined in this object only.  The $dcount_objs
        prints the total number of descendents from this object (recursively
        counting subobjects as well).
: declare_type <super_type_name> <new_type_name>
	new base types should be declared in a "V" file before they
	are used so that they can be loaded even by a process that does
	not have the compiled type compiled in.  This command declares
	a new base type <new_type_name> that, until it is defined explicitly
	will behave like <super_type_name>
: refcnt <obj>
	prints the reference count of the specified object.
: save_project_as <new directory name>
	saves the current project to the new directory name specified
	(equivalent to the Project->Save As as menu in the Network Editor).
: save_project
	saves the current project (equivalent to Project->Save in the
	Network Editor).
: save_compiled_project [-build] [-into_exec] [-no_inst] [-ne] [-save_usr] <new dir name> <obj_name>
	saves a compiled project using the specified object <obj_name> into
	the specified directory <new dir name>.  
	If -build is used, the project is saved and compiled.  
	If -no_inst is used, the object specified is not instanced when restored.
	If -ne is used, the Network Editor is included in the project.
	If -into_exec is used, the binary V definition file is built in to the executable.
	If -save_usr is used, the current user interface settings are saved.
: server_info
	prints the server information to standard out (or redirected to a 
	file using '>') for use either by setting in the environment or
	the -client option.
: setenv <var_name> value of environment variable
	sets an environment variable in the process in which the VCP is
	active.  The value of the environment variable starts at the first
        non-space after the <var_name> and continues to the end of the line.
	e.g.: 
		setenv MY_PATH /tmp/one /tmp/two /tmp/three 
	is equivalent to the UNIX csh command:
		setenv MY_PATH "/tmp/one /tmp/two /tmp/three"
: shell
	executes the rest of the command line as a shell command.
: set_file_env <environment_variable>
	Takes the name of an environment variable and turns the value
	of the environment variable into a file variable used by AVS/Express
	File variables are used by AVS/Express whenever opening V or
	data files.
: #define <symbol> <value>
	Defines the symbol to have the value specified
: #ifdef <symbol>
	Conditionally parses the following V statements.  If <symbol>
	is not defined the following V statements are not parsed. The
	region is terminated by #endif.  Note that the more general 
	CPP construct #if is not supported.
: #else
	Switches the sense of an #ifdef.
: #endif
	Terminates conditional parsing of V statements.
: #undef 
	Undoes a definition set by #define.
