FCDEffectCode Class Reference

A COLLADA code inclusion. More...

#include <FCDEffectCode.h>

Inheritance diagram for FCDEffectCode:

FCDObject FUParameterizable FUTrackable FUObject List of all members.

Public Types

enum  Type {
  INCLUDE,
  CODE
}
 The list of support code inclusion types. More...

Public Member Functions

 FCDEffectCode (FCDocument *document)
 Constructor: do not use directly.
virtual ~FCDEffectCode ()
 Destructor.
Type GetType () const
 Retrieves the form of the code inclusion.
void SetType (Type _type)
 Sets the form of the code inclusion.
const fm::stringGetSubId () const
 Retrieves the sub-id of the code inclusion.
void SetSubId (const fm::string &_sid)
 Sets the sub-id of the code inclusion.
const fstringGetCode () const
 Retrieves the inlined code.
void SetCode (const fstring &_code)
 Sets the inlined code.
const fstringGetFilename () const
 Retrieves the filename of the code file to open.
void SetFilename (const fstring &_filename)
 Sets the filename of the code file.
FCDEffectCodeClone (FCDEffectCode *clone=NULL) const
 Clones the code inclusion.

Detailed Description

A COLLADA code inclusion.

Code inclusions come in two forms: file includes and inline code. For file includes, you will want to grab the filename of the file using the GetFilename function and for inline code, you can get the code directly through the GetCode function.

Code inclusions are referenced through sub-ids by the effect pass shaders. Regardless of the extension of the filename of file includes, the code inclusions' language is solely determined by the effect profile they belong to.


Member Enumeration Documentation

enum FCDEffectCode::Type
 

The list of support code inclusion types.

Enumerator:
CODE  Inlined code.

See also:
GetCode


Constructor & Destructor Documentation

FCDEffectCode::FCDEffectCode FCDocument document  ) 
 

Constructor: do not use directly.

Instead, use the FCDEffectProfile::AddCode or the FCDEffectTechnique::AddCode functions.

Parameters:
document The COLLADA document that owns this code inclusion.


Member Function Documentation

FCDEffectCode* FCDEffectCode::Clone FCDEffectCode clone = NULL  )  const
 

Clones the code inclusion.

Parameters:
clone The cloned code inclusion. If this pointer is NULL, a new code inclusion is created and you will need to release this new code inclusion.
Returns:
The cloned effect object. This pointer will never be NULL.

const fstring& FCDEffectCode::GetCode  )  const [inline]
 

Retrieves the inlined code.

First verify that this code inclusion contains inlined code using the GetType function.

Returns:
The inlined code.

const fstring& FCDEffectCode::GetFilename  )  const [inline]
 

Retrieves the filename of the code file to open.

First verify that this code inclusion contains a filename using the GetType function.

Returns:
The code filename.

const fm::string& FCDEffectCode::GetSubId  )  const [inline]
 

Retrieves the sub-id of the code inclusion.

Used to match the code inclusion within the effect pass shaders.

Returns:
The sub-id.

Type FCDEffectCode::GetType  )  const [inline]
 

Retrieves the form of the code inclusion.

Returns:
The form.

void FCDEffectCode::SetCode const fstring _code  )  [inline]
 

Sets the inlined code.

As a side-effect, calling this function forces the type of the code inclusion.

Parameters:
_code The inlined code.

void FCDEffectCode::SetFilename const fstring _filename  ) 
 

Sets the filename of the code file.

As a side-effect, calling this function forces the type of the code inclusion.

Parameters:
_filename The code filename.

void FCDEffectCode::SetSubId const fm::string _sid  ) 
 

Sets the sub-id of the code inclusion.

This value may change on export, as the sub-id must be unique within its scope.

Parameters:
_sid The sub-id.

void FCDEffectCode::SetType Type  _type  )  [inline]
 

Sets the form of the code inclusion.

Changing the form of the code inclusion will not remove the inline code or the filename.

Parameters:
_type The form.


The documentation for this class was generated from the following file:
Generated on Thu Feb 14 16:58:37 2008 for FCollada by  doxygen 1.4.6-NO