Changeset 256 for trunk/nv/library.hh


Ignore:
Timestamp:
06/14/14 21:06:00 (11 years ago)
Author:
epyon
Message:
  • various minor fixes
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/nv/library.hh

    r166 r256  
    1515
    1616#include <nv/exception.hh>
    17 #include <string>
     17#include <nv/string.hh>
    1818
    1919namespace nv
     
    3737                 * Throws library_error on failure
    3838                 */
    39                 void open( const std::string& name );
     39                void open( const string& name );
    4040
    4141                /**
     
    4444                 * returns true if succeeded, false otherwise
    4545                 */
    46                 bool try_open( const std::string& name );
     46                bool try_open( const string& name );
    4747
    4848                /**
     
    5454                 * Returns library name
    5555                 */
    56                 const std::string& get_name() const;
     56                const string& get_name() const;
    5757
    5858                /**
     
    6161                 * Throws on symbol not found
    6262                 */
    63                 void* get( const std::string& symbol );
     63                void* get( const string& symbol );
    6464
    6565                /**
     
    6868                 * Returns null if symbol not found
    6969                 */
    70                 void* try_get( const std::string& symbol );
     70                void* try_get( const string& symbol );
    7171
    7272                /**
     
    8282                 * Exact implementation depends on platform/compiler.
    8383                 */
    84                 static std::string get_error();
     84                static string get_error();
    8585
    8686        protected:
     
    107107
    108108                /// Library name
    109                 std::string m_name;
     109                string m_name;
    110110
    111111        };  // class Library
     
    114114        {
    115115                /// Library name
    116                 std::string m_name;
     116                string m_name;
    117117        public:
    118118                /**
    119119                 * Constructor
    120120                 */
    121                 library_error( const std::string& message, const std::string& name )
     121                library_error( const string& message, const string& name )
    122122                        : runtime_error( "Library (" + name + ") : " + message + " [ " + library::get_error() + " ]"), m_name( name )
    123123                {
     
    134134                 * Returns library name
    135135                 */
    136                 const std::string& get_name()
     136                const string& get_name()
    137137                {
    138138                        return m_name;
Note: See TracChangeset for help on using the changeset viewer.