Searched defs:std (Results 176 - 200 of 224) sorted by relevance

123456789

/external/stlport/stlport/stl/
H A D_cmath.h51 namespace std { namespace
353 /* In this config Borland native lib only define functions in std namespace.
/external/stlport/test/unit/
H A Dfstream_test.cpp16 using namespace std;
615 namespace std { namespace
H A Dtype_traits_test.cpp8 using namespace std;
60 # define __true_type std::__true_type
61 # define __false_type std::__false_type
116 namespace std { namespace
511 namespace std { namespace
/external/chromium/chrome/browser/chromeos/input_method/
H A Dinput_method_util.cc33 typedef std::multimap<std::string, std::string> LanguageCodeToIdsMap;
35 typedef std::map<std::string, chromeos::InputMethodDescriptor>
38 typedef std::map<std::string, std::string> InputMethodNameToOverlayIdMap;
42 scoped_ptr<std::map<std
563 GetInputMethodIdsFromLanguageCodeInternal( const std::multimap<std::string, std::string>& language_code_to_ids, const std::string& normalized_language_code, InputMethodType type, std::vector<std::string>* out_input_method_ids) argument
[all...]
/external/chromium/chrome/browser/prerender/
H A Dprerender_manager.cc101 PendingContentsData(const GURL& url, const std::vector<GURL>& alias_urls,
106 std::vector<GURL> alias_urls_;
138 const std::vector<GURL>& alias_urls,
146 std::vector<GURL> all_alias_urls = alias_urls;
203 const std::pair<int,int>& child_route_id_pair,
205 const std::vector<GURL>& alias_urls,
209 for (std::list<PrerenderContentsData>::iterator it = prerender_list_.begin();
240 PendingPrerenderList::value_type el = std::make_pair(child_route_id_pair,
241 std::vector<PendingContentsData>());
263 for (std
202 AddPendingPreload( const std::pair<int,int>& child_route_id_pair, const GURL& url, const std::vector<GURL>& alias_urls, const GURL& referrer) argument
[all...]
/external/chromium/testing/gtest/test/
H A Dgtest-printers_test.cc80 std::ostream& operator<<(std::ostream& os, EnumWithStreaming e) {
89 void PrintTo(EnumWithPrintTo e, std::ostream* os) {
114 inline void operator<<(::std::ostream& os, const StreamableInGlobal& /* x */) {
118 void operator<<(::std::ostream& os, const StreamableInGlobal* /* x */) {
139 void PrintTo(const PrintableViaPrintTo& x, ::std::ostream* os) {
147 ::std::ostream& operator<<(::std::ostream& os,
164 void PrintTo(const PrintableViaPrintToTemplate<T>& x, ::std::ostream* os) {
180 inline ::std
718 operator <<( std::basic_ostream<Char, CharTraits>& os, const AllowsGenericStreaming& ) argument
735 operator <<( std::basic_ostream<Char, CharTraits>& os, const AllowsGenericStreamingTemplate<T>& ) argument
756 operator <<( std::basic_ostream<Char, CharTraits>& os, const AllowsGenericStreamingAndImplicitConversionTemplate<T>& ) argument
[all...]
/external/clang/lib/ARCMigrate/
H A DARCMT.cpp36 std::find(IDs.begin(), IDs.end(), I->getID()) != IDs.end()) &&
64 std::find(IDs.begin(), IDs.end(), I->getID()) != IDs.end()) &&
167 std::string verstr = version.str();
219 CInvok->getPreprocessorOpts().ImplicitPCHInclude = std::string();
220 CInvok->getPreprocessorOpts().ImplicitPTHInclude = std::string();
221 std::string define = getARCMTMacroName();
230 std::vector<std::string> WarnOpts;
231 for (std::vector<std
452 getFileRemappingsFromFileList( std::vector<std::pair<std::string,std::string> > &remap, ArrayRef<StringRef> remapFiles, DiagnosticConsumer *DiagClient) argument
[all...]
/external/clang/test/SemaCXX/
H A Dcxx98-compat.cpp1 // RUN: %clang_cc1 -fsyntax-only -std=c++11 -Wc++98-compat -verify %s
2 // RUN: %clang_cc1 -fsyntax-only -std=c++11 %s
4 namespace std { namespace
55 InitListCtor(std::initializer_list<bool>);
67 std::initializer_list<int> xs = { 1, 2, 3 }; // expected-warning {{initialization of initializer_list object is incompatible with C++98}}
313 const std::type_info &ti = typeid(S::n); // expected-warning {{use of non-static data member 'n' in an unevaluated context is incompatible with C++98}}
/external/gtest/test/
H A Dgtest-printers_test.cc80 std::ostream& operator<<(std::ostream& os, EnumWithStreaming e) {
89 void PrintTo(EnumWithPrintTo e, std::ostream* os) {
114 inline void operator<<(::std::ostream& os, const StreamableInGlobal& /* x */) {
118 void operator<<(::std::ostream& os, const StreamableInGlobal* /* x */) {
139 void PrintTo(const PrintableViaPrintTo& x, ::std::ostream* os) {
147 ::std::ostream& operator<<(::std::ostream& os,
164 void PrintTo(const PrintableViaPrintToTemplate<T>& x, ::std::ostream* os) {
180 inline ::std
718 operator <<( std::basic_ostream<Char, CharTraits>& os, const AllowsGenericStreaming& ) argument
735 operator <<( std::basic_ostream<Char, CharTraits>& os, const AllowsGenericStreamingTemplate<T>& ) argument
756 operator <<( std::basic_ostream<Char, CharTraits>& os, const AllowsGenericStreamingAndImplicitConversionTemplate<T>& ) argument
[all...]
/external/llvm/include/llvm/ADT/
H A DHashing.h121 hash_code hash_value(const std::pair<T, U> &arg);
125 hash_code hash_value(const std::basic_string<T> &arg);
309 std::swap(h2, h0);
359 // Special case std::pair to detect when both types are viable and when there
361 // std::pair isn't truly POD, but it's close enough in all reasonable
363 template <typename T, typename U> struct is_hashable_data<std::pair<T, U> >
367 sizeof(std::pair<T, U>))> {};
435 std::rotate(buffer, buffer_ptr, buffer_end);
459 const size_t length = std::distance(s_begin, s_end);
634 std
752 hash_value(const std::pair<T, U> &arg) argument
[all...]
H A DSmallVector.h102 typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
103 typedef std::reverse_iterator<iterator> reverse_iterator;
178 /// std::move, but not all stdlibs actually provide that.
183 *Dest = ::std::move(*I);
186 return ::std::copy(I, E, Dest);
193 /// std::move_backward, but not all stdlibs actually provide that.
198 *--Dest = ::std::move(*--E);
201 return ::std::copy_backward(I, E, Dest);
211 ::new ((void*) &*Dest) T(::std::move(*I));
213 ::std
922 namespace std { namespace
[all...]
/external/llvm/lib/VMCore/
H A DConstantsContext.h327 std::vector<Constant*> operands;
359 std::string asm_string;
360 std::string constraints;
398 struct ConstantTraits< std::vector<T, Alloc> > {
399 static unsigned uses(const std::vector<T, Alloc>& v) { argument
460 std::vector<Constant*> IdxList(V.operands.begin()+1, V.operands.end());
482 std::vector<Constant*> Operands;
517 typedef std::pair<TypeClass*, ValType> MapKey;
518 typedef std::map<MapKey, ConstantClass *> MapTy;
519 typedef std
[all...]
/external/llvm/tools/bugpoint/
H A DToolRunner.cpp32 cl::opt<std::string>
36 cl::opt<std::string>
40 cl::opt<std::string>
44 cl::opt<std::string>
48 cl::opt<std::string>
63 std::string *ErrMsg = 0) {
116 std::ostringstream OS;
123 std::ifstream ErrorFile(StdOutFile.c_str());
125 std::copy(std
274 ExecuteProgram(const std::string &Bitcode, const std::vector<std::string> &Args, const std::string &InputFile, const std::string &OutputFile, std::string *Error, const std::vector<std::string> &GCCArgs = std::vector<std::string>(), const std::vector<std::string> &SharedLibs = std::vector<std::string>(), unsigned Timeout = 0, unsigned MemoryLimit = 0) argument
[all...]
/external/llvm/utils/TableGen/
H A DX86RecognizableInstr.cpp203 static uint8_t byteFromRec(const Record* rec, const std::string &name) {
253 std::vector<Record*> Predicates = Rec->getValueAsListOfDefs("Predicates");
470 const std::vector<CGIOperandList::OperandInfo> &OperandList = *Operands;
474 const std::string &recName = OperandList[operandIndex].Rec->getName();
483 const std::vector<CGIOperandList::OperandInfo> &OperandList = *Operands;
487 const std::string &recName = OperandList[operandIndex].Rec->getName();
501 (const std::string&,
517 const std::string &typeName = (*Operands)[operandIndex].Rec->getName();
549 const std::vector<CGIOperandList::OperandInfo> &OperandList = *Operands;
1037 OperandType RecognizableInstr::typeFromString(const std
496 handleOperand(bool optional, unsigned &operandIndex, unsigned &physicalOperandIndex, unsigned &numPhysicalOperands, const unsigned *operandMapping, OperandEncoding (*encodingFromString) (const std::string&, bool hasOpSizePrefix)) argument
[all...]
/external/webrtc/src/modules/audio_processing/aec/
H A Decho_cancellation.c802 int WebRtcAec_GetDelayMetrics(void* handle, int* median, int* std) { argument
818 if (std == NULL) {
841 *std = -1;
861 *std = (int) (l1_norm / (float) num_delay_values + 0.5f) * kMsPerBlock;
/external/webrtc/src/modules/audio_processing/test/
H A Dprocess_test.cc520 std::ostringstream trace_stream;
681 std::ostringstream trace_stream;
909 int std = 0; local
910 apm->echo_cancellation()->GetDelayMetrics(&median, &std);
913 printf("Standard deviation: %3d\n", std);
H A Dunit_test.cc56 std::string trace_filename = webrtc::test::OutputPath() +
65 const std::string resource_path;
66 const std::string output_filename;
106 std::string input_filename = resource_path + "aec_far.pcm";
213 void WriteMessageLiteToFile(const std::string filename,
230 void ReadMessageLiteFromFile(const std::string filename,
316 std::vector<ThreadWrapper*> threads(num_threads);
317 std::vector<ThreadData*> thread_data(num_threads);
524 int std = 0; local
526 apm_->echo_cancellation()->GetDelayMetrics(&median, &std));
1167 int std = 0; local
[all...]
/external/chromium/android/autofill/
H A Dprofile_android.h218 virtual ProfileSyncService* GetProfileSyncService(const std::string&) { NOTREACHED(); return NULL; } argument
235 const std::string& app_id) { NOTREACHED(); return NULL; }
/external/chromium/chrome/browser/task_manager/
H A Dtask_manager_resource_providers.cc254 std::map<TabContentsWrapper*, TaskManagerTabContentsResource*>::iterator
326 std::map<TabContentsWrapper*, TaskManagerTabContentsResource*>::const_iterator
342 std::map<TabContentsWrapper*, TaskManagerTabContentsResource*>::iterator
404 process_route_id_pair_(std::make_pair(render_view_host->process()->id(),
473 std::make_pair(render_process_host_id, routing_id));
525 const std::pair<int, int>& process_route_id_pair) {
537 const std::pair<int, int>& process_route_id_pair) {
553 const std::pair<int, int>& process_route_id_pair) {
587 Add(*Source<std::pair<int, int> >(source).ptr());
591 Remove(*Source<std
524 AddToTaskManager( const std::pair<int, int>& process_route_id_pair) argument
536 Add( const std::pair<int, int>& process_route_id_pair) argument
552 Remove( const std::pair<int, int>& process_route_id_pair) argument
[all...]
/external/chromium/chrome/browser/themes/
H A Dbrowser_theme_pack.cc149 int GetPersistentIDByName(const std::string& key) {
231 int GetIntForString(const std::string& key, StringToIntTable* table) {
287 std::vector<unsigned char> raw_data;
370 FilePath path, const std::string& expected_id) {
391 std::string theme_id(reinterpret_cast<char*>(pack->header_->theme_id),
393 std::string truncated_id = expected_id.substr(0, Extension::kIdSize);
597 const std::string& id = extension->id();
614 std::map<int, color_utils::HSL> temp_tints;
635 for (std::map<int, color_utils::HSL>::const_iterator it =
652 std
705 GenerateMissingColors( std::map<int, SkColor>* colors) argument
[all...]
/external/chromium/testing/gmock/include/gmock/
H A Dgmock-generated-actions.h54 class InvokeHelper<R, ::std::tr1::tuple<> > {
57 static R Invoke(Function function, const ::std::tr1::tuple<>&) { argument
64 const ::std::tr1::tuple<>&) {
70 class InvokeHelper<R, ::std::tr1::tuple<A1> > {
73 static R Invoke(Function function, const ::std::tr1::tuple<A1>& args) {
74 using ::std::tr1::get;
81 const ::std::tr1::tuple<A1>& args) {
82 using ::std::tr1::get;
88 class InvokeHelper<R, ::std::tr1::tuple<A1, A2> > {
91 static R Invoke(Function function, const ::std argument
62 InvokeMethod(Class* obj_ptr, MethodPtr method_ptr, const ::std::tr1::tuple<>&) argument
97 InvokeMethod(Class* obj_ptr, MethodPtr method_ptr, const ::std::tr1::tuple<A1, A2>& args) argument
109 Invoke(Function function, const ::std::tr1::tuple<A1, A2, A3>& args) argument
116 InvokeMethod(Class* obj_ptr, MethodPtr method_ptr, const ::std::tr1::tuple<A1, A2, A3>& args) argument
128 Invoke(Function function, const ::std::tr1::tuple<A1, A2, A3, A4>& args) argument
135 InvokeMethod(Class* obj_ptr, MethodPtr method_ptr, const ::std::tr1::tuple<A1, A2, A3, A4>& args) argument
149 Invoke(Function function, const ::std::tr1::tuple<A1, A2, A3, A4, A5>& args) argument
157 InvokeMethod(Class* obj_ptr, MethodPtr method_ptr, const ::std::tr1::tuple<A1, A2, A3, A4, A5>& args) argument
171 Invoke(Function function, const ::std::tr1::tuple<A1, A2, A3, A4, A5, A6>& args) argument
179 InvokeMethod(Class* obj_ptr, MethodPtr method_ptr, const ::std::tr1::tuple<A1, A2, A3, A4, A5, A6>& args) argument
193 Invoke(Function function, const ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7>& args) argument
201 InvokeMethod(Class* obj_ptr, MethodPtr method_ptr, const ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7>& args) argument
216 Invoke(Function function, const ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7, A8>& args) argument
224 InvokeMethod(Class* obj_ptr, MethodPtr method_ptr, const ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7, A8>& args) argument
239 Invoke(Function function, const ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7, A8, A9>& args) argument
247 InvokeMethod(Class* obj_ptr, MethodPtr method_ptr, const ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7, A8, A9>& args) argument
265 Invoke(Function function, const ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10>& args) argument
274 InvokeMethod(Class* obj_ptr, MethodPtr method_ptr, const ::std::tr1::tuple<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10>& args) argument
660 Perform(Impl* impl, const ::std::tr1::tuple<A0, A1>& args) argument
669 Perform(Impl* impl, const ::std::tr1::tuple<A0, A1, A2>& args) argument
678 Perform(Impl* impl, const ::std::tr1::tuple<A0, A1, A2, A3>& args) argument
688 Perform(Impl* impl, const ::std::tr1::tuple<A0, A1, A2, A3, A4>& args) argument
699 Perform(Impl* impl, const ::std::tr1::tuple<A0, A1, A2, A3, A4, A5>& args) argument
710 Perform(Impl* impl, const ::std::tr1::tuple<A0, A1, A2, A3, A4, A5, A6>& args) argument
721 Perform(Impl* impl, const ::std::tr1::tuple<A0, A1, A2, A3, A4, A5, A6, A7>& args) argument
732 Perform(Impl* impl, const ::std::tr1::tuple<A0, A1, A2, A3, A4, A5, A6, A7, A8>& args) argument
743 Perform(Impl* impl, const ::std::tr1::tuple<A0, A1, A2, A3, A4, A5, A6, A7, A8, A9>& args) argument
[all...]
/external/chromium/third_party/libjingle/source/talk/base/
H A Dphysicalsocketserver.cc518 std::string dbg_addr_;
764 typedef std::map<int, void (*)(int)> HandlerMap;
1205 DispatcherList::iterator pos = std::find(dispatchers_.begin(),
1215 DispatcherList::iterator pos = std::find(dispatchers_.begin(),
1446 std::vector<WSAEVENT> events;
1447 std::vector<Dispatcher *> event_owners;
598 ASSERT(signum < ARRAY_SIZE(received_signal_)); if (signum < ARRAY_SIZE(received_signal_)) { return received_signal_[signum]; } else { return false; } } void ClearSignal(int signum) { ASSERT(signum < ARRAY_SIZE(received_signal_)); if (signum < ARRAY_SIZE(received_signal_)) { received_signal_[signum] = false; } } int GetDescriptor() const { return afd_[0]; } void OnPosixSignalReceived(int signum) { if (signum >= ARRAY_SIZE(received_signal_)) { return; } received_signal_[signum] = true; const uint8 b[1] = { 0 }; if (-1 == write(afd_[1], b, sizeof(b))) { return; } } private: PosixSignalHandler() { if (pipe(afd_) < 0) { LOG_ERR(LS_ERROR) << Ó; return; } if (fcntl(afd_[0], F_SETFL, O_NONBLOCK) < 0) { LOG_ERR(LS_WARNING) << Ó; } if (fcntl(afd_[1], F_SETFL, O_NONBLOCK) < 0) { LOG_ERR(LS_WARNING) << Ó; } memset(const_cast<void *>(static_cast<volatile void *>(received_signal_)), 0, sizeof(received_signal_)); } ~PosixSignalHandler() { int fd1 = afd_[0]; int fd2 = afd_[1]; afd_[0] = -1; afd_[1] = -1; close(fd1); close(fd2); } static PosixSignalHandler instance_; int afd_[2]; volatile uint8 received_signal_[kNumPosixSignals]; }; PosixSignalHandler PosixSignalHandler::instance_; class PosixSignalDispatcher : public Dispatcher { public: PosixSignalDispatcher(PhysicalSocketServer *owner) : owner_(owner) { owner_->Add(this); } virtual ~PosixSignalDispatcher() { owner_->Remove(this); } virtual uint32 GetRequestedEvents() { return DE_READ; } virtual void OnPreEvent(uint32 ff) { uint8 b[16]; ssize_t ret = read(GetDescriptor(), b, sizeof(b)); if (ret < 0) { LOG_ERR(LS_WARNING) << Ó; } else if (ret == 0) { LOG(LS_WARNING) << Ó; } } virtual void OnEvent(uint32 ff, int err) { for (int signum = 0; signum < PosixSignalHandler::kNumPosixSignals; ++signum) { if (PosixSignalHandler::Instance()->IsSignalSet(signum)) { PosixSignalHandler::Instance()->ClearSignal(signum); HandlerMap::iterator i = handlers_.find(signum); if (i == handlers_.end()) { LOG(LS_INFO) << Ó << signum; } else { (*i->second)(signum); } } } } virtual int GetDescriptor() { return PosixSignalHandler::Instance()->GetDescriptor(); } virtual bool IsDescriptorClosed() { return false; } void SetHandler(int signum, void (*handler)(int)) { handlers_[signum] = handler; } void ClearHandler(int signum) { handlers_.erase(signum); } bool HasHandlers() { return !handlers_.empty(); } private: typedef std::map<int, void (*)(int)> HandlerMap; HandlerMap handlers_; PhysicalSocketServer *owner_; }; class SocketDispatcher : public Dispatcher, public PhysicalSocket { public: explicit SocketDispatcher(PhysicalSocketServer *ss) : PhysicalSocket(ss) { } SocketDispatcher(SOCKET s, PhysicalSocketServer *ss) : PhysicalSocket(ss, s) { } virtual ~SocketDispatcher() { Close(); } bool Initialize() { ss_->Add(this); fcntl(s_, F_SETFL, fcntl(s_, F_GETFL, 0) | O_NONBLOCK); return true; } virtual bool Create(int type) { if (!PhysicalSocket::Create(type)) return false; return Initialize(); } virtual int GetDescriptor() { return s_; } virtual bool IsDescriptorClosed() { char ch; ssize_t res = ::recv(s_, &ch, 1, MSG_PEEK); if (res > 0) { return false; } else if (res == 0) { return true; } else { switch (errno) { case EBADF: case ECONNRESET: return true; default: LOG_ERR(LS_WARNING) << Ó; return false; } } } virtual uint32 GetRequestedEvents() { return enabled_events_; } virtual void OnPreEvent(uint32 ff) { if ((ff & DE_CONNECT) != 0) state_ = CS_CONNECTED; if ((ff & DE_CLOSE) != 0) state_ = CS_CLOSED; } virtual void OnEvent(uint32 ff, int err) { if ((ff & DE_READ) != 0) { enabled_events_ &= ~DE_READ; SignalReadEvent(this); } if ((ff & DE_WRITE) != 0) { enabled_events_ &= ~DE_WRITE; SignalWriteEvent(this); } if ((ff & DE_CONNECT) != 0) { enabled_events_ &= ~DE_CONNECT; SignalConnectEvent(this); } if ((ff & DE_ACCEPT) != 0) { enabled_events_ &= ~DE_ACCEPT; SignalReadEvent(this); } if ((ff & DE_CLOSE) != 0) { enabled_events_ = 0; SignalCloseEvent(this, err); } } virtual int Close() { if (s_ == INVALID_SOCKET) return 0; ss_->Remove(this); return PhysicalSocket::Close(); } }; class FileDispatcher: public Dispatcher, public AsyncFile { public: FileDispatcher(int fd, PhysicalSocketServer *ss) : ss_(ss), fd_(fd) { set_readable(true); ss_->Add(this); fcntl(fd_, F_SETFL, fcntl(fd_, F_GETFL, 0) | O_NONBLOCK); } virtual ~FileDispatcher() { ss_->Remove(this); } SocketServer* socketserver() { return ss_; } virtual int GetDescriptor() { return fd_; } virtual bool IsDescriptorClosed() { return false; } virtual uint32 GetRequestedEvents() { return flags_; } virtual void OnPreEvent(uint32 ff) { } virtual void OnEvent(uint32 ff, int err) { if ((ff & DE_READ) != 0) SignalReadEvent(this); if ((ff & DE_WRITE) != 0) SignalWriteEvent(this); if ((ff & DE_CLOSE) != 0) SignalCloseEvent(this, err); } virtual bool readable() { return (flags_ & DE_READ) != 0; } virtual void set_readable(bool value) { flags_ = value ? (flags_ | DE_READ) : (flags_ & ~DE_READ); } virtual bool writable() { return (flags_ & DE_WRITE) != 0; } virtual void set_writable(bool value) { flags_ = value ? (flags_ | DE_WRITE) : (flags_ & ~DE_WRITE); } private: PhysicalSocketServer* ss_; int fd_; int flags_; }; AsyncFile* PhysicalSocketServer::CreateFile(int fd) { return new FileDispatcher(fd, this); } static uint32 FlagsToEvents(uint32 events) { uint32 ffFD = FD_CLOSE; if (events & DE_READ) ffFD |= FD_READ; if (events & DE_WRITE) ffFD |= FD_WRITE; if (events & DE_CONNECT) ffFD |= FD_CONNECT; if (events & DE_ACCEPT) ffFD |= FD_ACCEPT; return ffFD; } class EventDispatcher : public Dispatcher { public: EventDispatcher(PhysicalSocketServer *ss) : ss_(ss) { hev_ = WSACreateEvent(); if (hev_) { ss_->Add(this); } } ~EventDispatcher() { if (hev_ != NULL) { ss_->Remove(this); WSACloseEvent(hev_); hev_ = NULL; } } virtual void Signal() { if (hev_ != NULL) WSASetEvent(hev_); } virtual uint32 GetRequestedEvents() { return 0; } virtual void OnPreEvent(uint32 ff) { WSAResetEvent(hev_); } virtual void OnEvent(uint32 ff, int err) { } virtual WSAEVENT GetWSAEvent() { return hev_; } virtual SOCKET GetSocket() { return INVALID_SOCKET; } virtual bool CheckSignalClose() { return false; } private: PhysicalSocketServer* ss_; WSAEVENT hev_; }; class SocketDispatcher : public Dispatcher, public PhysicalSocket { public: static int next_id_; int id_; bool signal_close_; int signal_err_; SocketDispatcher(PhysicalSocketServer* ss) : PhysicalSocket(ss), id_(0), signal_close_(false) { } SocketDispatcher(SOCKET s, PhysicalSocketServer* ss) : PhysicalSocket(ss, s), id_(0), signal_close_(false) { } virtual ~SocketDispatcher() { Close(); } bool Initialize() { ASSERT(s_ != INVALID_SOCKET); u_long argp = 1; ioctlsocket(s_, FIONBIO, &argp); ss_->Add(this); return true; } virtual bool Create(int type) { if (!PhysicalSocket::Create(type)) return false; if (!Initialize()) return false; do { id_ = ++next_id_; } while (id_ == 0); return true; } virtual int Close() { if (s_ == INVALID_SOCKET) return 0; id_ = 0; signal_close_ = false; ss_->Remove(this); return PhysicalSocket::Close(); } virtual uint32 GetRequestedEvents() { return enabled_events_; } virtual void OnPreEvent(uint32 ff) { if ((ff & DE_CONNECT) != 0) state_ = CS_CONNECTED; } virtual void OnEvent(uint32 ff, int err) { int cache_id = id_; if ((ff & DE_READ) != 0) { enabled_events_ &= ~DE_READ; SignalReadEvent(this); } if (((ff & DE_WRITE) != 0) && (id_ == cache_id)) { enabled_events_ &= ~DE_WRITE; SignalWriteEvent(this); } if (((ff & DE_CONNECT) != 0) && (id_ == cache_id)) { if (ff != DE_CONNECT) LOG(LS_VERBOSE) << Ó << ff; enabled_events_ &= ~DE_CONNECT; dbg_addr_ = Ó; dbg_addr_.append(GetRemoteAddress().ToString()); SignalConnectEvent(this); } if (((ff & DE_ACCEPT) != 0) && (id_ == cache_id)) { enabled_events_ &= ~DE_ACCEPT; SignalReadEvent(this); } if (((ff & DE_CLOSE) != 0) && (id_ == cache_id)) { signal_close_ = true; signal_err_ = err; } } virtual WSAEVENT GetWSAEvent() { return WSA_INVALID_EVENT; } virtual SOCKET GetSocket() { return s_; } virtual bool CheckSignalClose() { if (!signal_close_) return false; char ch; if (recv(s_, &ch, 1, MSG_PEEK) > 0) return false; state_ = CS_CLOSED; signal_close_ = false; SignalCloseEvent(this, signal_err_); return true; } }; int SocketDispatcher::next_id_ = 0; class Signaler : public EventDispatcher { public: Signaler(PhysicalSocketServer* ss, bool* pf) : EventDispatcher(ss), pf_(pf) { } virtual ~Signaler() { } void OnEvent(uint32 ff, int err) { if (pf_) *pf_ = false; } private: bool *pf_; }; PhysicalSocketServer::PhysicalSocketServer() : fWait_(false), last_tick_tracked_(0), last_tick_dispatch_count_(0) { signal_wakeup_ = new Signaler(this, &fWait_); socket_ev_ = WSACreateEvent(); } PhysicalSocketServer::~PhysicalSocketServer() { WSACloseEvent(socket_ev_); signal_dispatcher_.reset(); delete signal_wakeup_; ASSERT(dispatchers_.empty()); } void PhysicalSocketServer::WakeUp() { signal_wakeup_->Signal(); } Socket* PhysicalSocketServer::CreateSocket(int type) { PhysicalSocket* socket = new PhysicalSocket(this); if (socket->Create(type)) { return socket; } else { delete socket; return 0; } } AsyncSocket* PhysicalSocketServer::CreateAsyncSocket(int type) { SocketDispatcher* dispatcher = new SocketDispatcher(this); if (dispatcher->Create(type)) { return dispatcher; } else { delete dispatcher; return 0; } } AsyncSocket* PhysicalSocketServer::WrapSocket(SOCKET s) { SocketDispatcher* dispatcher = new SocketDispatcher(s, this); if (dispatcher->Initialize()) { return dispatcher; } else { delete dispatcher; return 0; } } void PhysicalSocketServer::Add(Dispatcher *pdispatcher) { CritScope cs(&crit_); DispatcherList::iterator pos = std::find(dispatchers_.begin(), dispatchers_.end(), pdispatcher); if (pos != dispatchers_.end()) return; dispatchers_.push_back(pdispatcher); } void PhysicalSocketServer::Remove(Dispatcher *pdispatcher) { CritScope cs(&crit_); DispatcherList::iterator pos = std::find(dispatchers_.begin(), dispatchers_.end(), pdispatcher); ASSERT(pos != dispatchers_.end()); size_t index = pos - dispatchers_.begin(); dispatchers_.erase(pos); for (IteratorList::iterator it = iterators_.begin(); it != iterators_.end(); ++it) { if (index < **it) { --**it; } } } bool PhysicalSocketServer::Wait(int cmsWait, bool process_io) { struct timeval *ptvWait = NULL; struct timeval tvWait; struct timeval tvStop; if (cmsWait != kForever) { tvWait.tv_sec = cmsWait / 1000; tvWait.tv_usec = (cmsWait % 1000) * 1000; ptvWait = &tvWait; gettimeofday(&tvStop, NULL); tvStop.tv_sec += tvWait.tv_sec; tvStop.tv_usec += tvWait.tv_usec; if (tvStop.tv_usec >= 1000000) { tvStop.tv_usec -= 1000000; tvStop.tv_sec += 1; } } fd_set fdsRead; FD_ZERO(&fdsRead); fd_set fdsWrite; FD_ZERO(&fdsWrite); fWait_ = true; while (fWait_) { int fdmax = -1; { CritScope cr(&crit_); for (size_t i = 0; i < dispatchers_.size(); ++i) { Dispatcher *pdispatcher = dispatchers_[i]; ASSERT(pdispatcher); if (!process_io && (pdispatcher != signal_wakeup_)) continue; int fd = pdispatcher->GetDescriptor(); if (fd > fdmax) fdmax = fd; uint32 ff = pdispatcher->GetRequestedEvents(); if (ff & (DE_READ | DE_ACCEPT)) FD_SET(fd, &fdsRead); if (ff & (DE_WRITE | DE_CONNECT)) FD_SET(fd, &fdsWrite); } } int n = select(fdmax + 1, &fdsRead, &fdsWrite, NULL, ptvWait); if (n < 0) { if (errno != EINTR) { LOG_E(LS_ERROR, EN, errno) << Ó; return false; } } else if (n == 0) { return true; } else { CritScope cr(&crit_); for (size_t i = 0; i < dispatchers_.size(); ++i) { Dispatcher *pdispatcher = dispatchers_[i]; int fd = pdispatcher->GetDescriptor(); uint32 ff = 0; int errcode = 0; if (FD_ISSET(fd, &fdsRead) || FD_ISSET(fd, &fdsWrite)) { socklen_t len = sizeof(errcode); ::getsockopt(fd, SOL_SOCKET, SO_ERROR, &errcode, &len); } if (FD_ISSET(fd, &fdsRead)) { FD_CLR(fd, &fdsRead); if (pdispatcher->GetRequestedEvents() & DE_ACCEPT) { ff |= DE_ACCEPT; } else if (errcode || pdispatcher->IsDescriptorClosed()) { ff |= DE_CLOSE; } else { ff |= DE_READ; } } if (FD_ISSET(fd, &fdsWrite)) { FD_CLR(fd, &fdsWrite); if (pdispatcher->GetRequestedEvents() & DE_CONNECT) { if (!errcode) { ff |= DE_CONNECT; } else { ff |= DE_CLOSE; } } else { ff |= DE_WRITE; } } if (ff != 0) { pdispatcher->OnPreEvent(ff); pdispatcher->OnEvent(ff, errcode); } } } if (cmsWait != kForever) { ptvWait->tv_sec = 0; ptvWait->tv_usec = 0; struct timeval tvT; gettimeofday(&tvT, NULL); if ((tvStop.tv_sec > tvT.tv_sec) || ((tvStop.tv_sec == tvT.tv_sec) && (tvStop.tv_usec > tvT.tv_usec) argument
/external/chromium/third_party/libjingle/source/talk/session/phone/
H A Dmediasessionclient.cc47 const std::string kInline = "inline:";
52 typedef std::vector<CryptoParams> CryptoParamsVec;
86 std::map<uint32, Call *>::iterator it;
88 std::map<uint32, Call *>::iterator it = calls_.begin();
99 bool CreateCryptoParams(int tag, const std::string& cipher, CryptoParams *out) {
100 std::string key;
112 bool AddCryptoParams(const std::string& cipher_suite, CryptoParamsVec *out) {
391 std::map<uint32, Call *>::iterator it = calls_.find(call->id());
401 std::map<std
617 FindWithDefault(const std::map<std::string, std::string>& map, const std::string& key, const int def) argument
[all...]
/external/clang/test/CodeGenCXX/
H A Dmangle.cpp1 // RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-apple-darwin9 -fblocks -std=c++11 | FileCheck %s
167 namespace std { namespace
172 template bool std::operator==(const ::A<char>&, const ::A<char>&);
/external/clang/test/Index/
H A Drecursive-cxx-member-calls.cpp3 namespace std { namespace
69 typedef std::pair < IdentifierInfo, const char *>actualtype;
73 typedef std::pair < IdentifierInfo, const char *>actualtype;
200 // CHECK-tokens: Identifier: "std" [3:11 - 3:14] Namespace=std:3:11 (Definition)
201 // CHECK-tokens: Punctuation: "{" [3:15 - 3:16] Namespace=std:3:11 (Definition)
217 // CHECK-tokens: Punctuation: ";" [4:64 - 4:65] Namespace=std:3:11 (Definition)
218 // CHECK-tokens: Punctuation: "}" [5:1 - 5:2] Namespace=std:3:11 (Definition)
682 // CHECK-tokens: Identifier: "std" [69:13 - 69:16] NamespaceRef=std
[all...]

Completed in 473 milliseconds

123456789