opensurgsim
Public Member Functions | List of all members
SurgSim::Graphics::MockProgram Class Reference
Inheritance diagram for SurgSim::Graphics::MockProgram:
SurgSim::Graphics::Program SurgSim::Framework::Asset SurgSim::Framework::Accessible SurgSim::Framework::FactoryBase< Asset >

Public Member Functions

 SURGSIM_CLASSNAME ("MockProgram")
 
 MOCK_CONST_METHOD0 (hasGeometryShader, bool())
 
 MOCK_CONST_METHOD0 (hasVertexShader, bool())
 
 MOCK_CONST_METHOD0 (hasFragmentShader, bool())
 
 MOCK_METHOD1 (setGeometryShaderSource, void(const std::string &))
 
 MOCK_METHOD1 (setVertexShaderSource, void(const std::string &))
 
 MOCK_METHOD1 (setFragmentShaderSource, void(const std::string &))
 
 MOCK_METHOD1 (loadGeometryShader, bool(const std::string &))
 
 MOCK_METHOD1 (loadVertexShader, bool(const std::string &))
 
 MOCK_METHOD1 (loadFragmentShader, bool(const std::string &))
 
 MOCK_CONST_METHOD1 (getGeometryShaderSource, bool(std::string *))
 
 MOCK_CONST_METHOD1 (getVertexShaderSource, bool(std::string *))
 
 MOCK_CONST_METHOD1 (getFragmentShaderSource, bool(std::string *))
 
 MOCK_METHOD0 (clearGeometryShader, void())
 
 MOCK_METHOD0 (clearVertexShader, void())
 
 MOCK_METHOD0 (clearFragmentShader, void())
 
 MOCK_CONST_METHOD0 (isGlobalScope, bool())
 
 MOCK_METHOD1 (setGlobalScope, void(bool))
 
 MOCK_METHOD1 (doLoad, bool(const std::string &))
 
- Public Member Functions inherited from SurgSim::Graphics::Program
virtual ~Program ()=0
 Destructor.
 
virtual bool hasVertexShader () const =0
 
virtual void clearVertexShader ()=0
 Removes the vertex shader, returning that portion of the shader program to fixed-function.
 
virtual bool loadVertexShader (const std::string &filePath)=0
 Loads the vertex shader source code from a file. More...
 
virtual void setVertexShaderSource (const std::string &source)=0
 Set the vertex shader source code. More...
 
virtual bool getVertexShaderSource (std::string *source) const =0
 Gets the vertex shader source code. More...
 
virtual bool hasGeometryShader () const =0
 
virtual void clearGeometryShader ()=0
 Removes the geometry shader, returning that portion of the shader program to fixed-function.
 
virtual bool loadGeometryShader (const std::string &filePath)=0
 Loads the geometry shader source code from a file. More...
 
virtual void setGeometryShaderSource (const std::string &source)=0
 Set the geometry shader source code. More...
 
virtual bool getGeometryShaderSource (std::string *source) const =0
 Gets the geometry shader source code. More...
 
virtual bool hasFragmentShader () const =0
 
virtual void clearFragmentShader ()=0
 
virtual bool loadFragmentShader (const std::string &filePath)=0
 Loads the fragment shader source code from a file. More...
 
virtual void setFragmentShaderSource (const std::string &source)=0
 Set the fragment shader source code. More...
 
virtual bool getFragmentShaderSource (std::string *source) const =0
 Gets the fragment shader source code. More...
 
virtual void clear ()
 Clears the entire shader, returning to fixed-function pipeline.
 
virtual void setGlobalScope (bool val)=0
 When this is set to true, this shader should be used instead of other shaders that might apply, depending on the hierarchy that is set out. More...
 
virtual bool isGlobalScope () const =0
 Query if this shader is of global scope. More...
 
- Public Member Functions inherited from SurgSim::Framework::Asset
 Asset ()
 Constructor.
 
 Asset (const Asset &rhs)
 Copy Constructor.
 
virtual ~Asset ()
 Destructor.
 
void load (const std::string &fileName, const SurgSim::Framework::ApplicationData &data)
 Load a file with given name using 'data' as look up path(s). More...
 
void load (const std::string &fileName)
 Overloaded function using SurgSim::Framework::Runtime::getApplicationData() as look up path(s). More...
 
std::string getFileName () const
 Return the name of file loaded by this class. More...
 
virtual std::string getClassName () const =0
 Support serialization with a classname. More...
 
- Public Member Functions inherited from SurgSim::Framework::Accessible
 Accessible ()
 Default Constructor.
 
 ~Accessible ()
 Destructor.
 
template<class T >
getValue (const std::string &name) const
 Retrieves the value with the name by executing the getter if it is found and tries to convert it to the given type. More...
 
boost::any getValue (const std::string &name) const
 Retrieves the value with the name by executing the getter if it is found. More...
 
template<class T >
bool getValue (const std::string &name, T *value) const
 Retrieves the value with the name by executing the getter if it is found, and converts it to the type of the output parameter. More...
 
void setValue (const std::string &name, const boost::any &value)
 Sets a value of a property that has setter. More...
 
bool isReadable (const std::string &name) const
 Check whether a property is readable. More...
 
bool isWriteable (const std::string &name) const
 Check whether a property is writable. More...
 
void setGetter (const std::string &name, GetterType func)
 Sets a getter for a given property. More...
 
void setSetter (const std::string &name, SetterType func)
 Sets a setter for a given property. More...
 
void setAccessors (const std::string &name, GetterType getter, SetterType setter)
 Sets the accessors getter and setter in one function. More...
 
void removeAccessors (const std::string &name)
 Removes all the accessors (getter and setter) for a given property. More...
 
void forwardProperty (const std::string &name, const Accessible &target, const std::string &targetProperty)
 Adds a property with the given name that uses the targets accessors, in effect forwarding the value to the target. More...
 
void setSerializable (const std::string &name, EncoderType encoder, DecoderType decoder)
 Sets the functions used to convert data from and to a YAML::Node. More...
 
void setDecoder (const std::string &name, DecoderType decoder)
 Sets the functions used to convert data from a YAML::Node. More...
 
YAML::Node encode () const
 Encode this Accessible to a YAML::Node. More...
 
void decode (const YAML::Node &node, const std::vector< std::string > &ignoredProperties=std::vector< std::string >())
 Decode this Accessible from a YAML::Node, will throw an exception if the data type cannot be converted. More...
 
std::vector< std::string > getProperties ()
 
template<>
boost::any getValue (const std::string &name) const
 

Additional Inherited Members

- Public Types inherited from SurgSim::Framework::Accessible
typedef std::function< boost::any(void)> GetterType
 
typedef std::function< void(boost::any)> SetterType
 
typedef std::function< YAML::Node(void)> EncoderType
 
typedef std::function< void(const YAML::Node *)> DecoderType
 
- Public Types inherited from SurgSim::Framework::FactoryBase< Asset >
typedef ObjectFactory< AssetFactoryType
 
- Static Public Member Functions inherited from SurgSim::Framework::FactoryBase< Asset >
static FactoryTypegetFactory ()
 
- Protected Member Functions inherited from SurgSim::Framework::Asset
virtual bool doLoad (const std::string &filePath)=0
 Derived classes will overwrite this method to do actual loading. More...
 

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